diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 21:50:10 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 21:50:10 +0000 |
commit | e5f8255e73273411a2a8cd72c5a8697b8fa0c3ec (patch) | |
tree | e49352c36c7df4c96dc230c64000bb478a67f3ab /LedgerSMB | |
parent | f6762a3469fbce0e233c958990ba6a5096540e0a (diff) |
Fixing tax selection for creating new customers in old code
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1491 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/CT.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LedgerSMB/CT.pm b/LedgerSMB/CT.pm index e9497b57..b51f48bf 100644 --- a/LedgerSMB/CT.pm +++ b/LedgerSMB/CT.pm @@ -329,12 +329,13 @@ sub save_customer { if ( $form->{"tax_$item"} ) { $query = qq| INSERT INTO customertax (customer_id, chart_id) - VALUES (?, (SELECT id + VALUES (currval('entity_credit_account_id_seq'), + (SELECT id FROM chart WHERE accno = ?))|; $sth = $dbh->prepare($query); - $sth->execute( $form->{id}, $item ) + $sth->execute( $item ) || $form->dberror($query); } } |