summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-01 21:50:10 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-01 21:50:10 +0000
commite5f8255e73273411a2a8cd72c5a8697b8fa0c3ec (patch)
treee49352c36c7df4c96dc230c64000bb478a67f3ab /LedgerSMB
parentf6762a3469fbce0e233c958990ba6a5096540e0a (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.pm5
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);
}
}