From b66cfc9fa6a4bf832ec495c7b598f00864f5f2e1 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 1 Sep 2007 07:36:27 +0000 Subject: Preventing AR-Transaction screen from calculating sales tax since it doesn't have enough info to do so safely. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1485 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/IS.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'LedgerSMB/IS.pm') diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index a45e0000..6fc6ba81 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -854,9 +854,10 @@ sub post_invoice { &reverse_invoice( $dbh, $form ); } else { - $query = qq|INSERT INTO ar (id) VALUES (?)|; + $query = qq|INSERT INTO ar (id, customer_id) VALUES (?, ?)|; $sth = $dbh->prepare($query); - $sth->execute( $form->{id} ) || $form->dberror($query); + $sth->execute( $form->{id}, $form->{customer_id} ) + || $form->dberror($query); } } @@ -867,10 +868,11 @@ sub post_invoice { if ( !$form->{id} ) { $query = qq| - INSERT INTO ar (invnumber, employee_id) - VALUES ('$uid', ?)|; + INSERT INTO ar (invnumber, customer_id, employee_id) + VALUES ('$uid', ?, ?)|; $sth = $dbh->prepare($query); - $sth->execute( $form->{employee_id} ) || $form->dberror($query); + $sth->execute( $form->{customer_id}, $form->{employee_id} ) + || $form->dberror($query); $query = qq|SELECT id FROM ar WHERE invnumber = '$uid'|; $sth = $dbh->prepare($query); -- cgit v1.2.3