summaryrefslogtreecommitdiff
path: root/LedgerSMB/IS.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-19 06:37:26 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-19 06:37:26 +0000
commit6e13bacefd8e71242dec64a3185215980e749bcf (patch)
treeb4258d138caec0d94f5df0e3cdc93afec35a9d68 /LedgerSMB/IS.pm
parent8c444ae5ee9f2a1eced0ae05efc6defc028ab503 (diff)
Voucher creation support added to API
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1284 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/IS.pm')
-rw-r--r--LedgerSMB/IS.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm
index f737e5d3..dfbb465d 100644
--- a/LedgerSMB/IS.pm
+++ b/LedgerSMB/IS.pm
@@ -1096,6 +1096,12 @@ sub post_invoice {
$project_id, $form->{"serialnumber_$i"},
$form->{"notes_$i"}, $invoice_id
) || $form->dberror($query);
+ if (defined $form->{approved}) {
+
+ $query = qq| UPDATE ar SET approved = ? WHERE id = ?|;
+ $dbh->prepare($query)->execute($form->{approved}, $form->{id})
+ || $form->dberror($query);
+ }
# add invoice_id
$form->{acc_trans}{lineitems}[$ndx]->{invoice_id} = $invoice_id;