From 6e13bacefd8e71242dec64a3185215980e749bcf Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 19 Jun 2007 06:37:26 +0000 Subject: 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 --- LedgerSMB/IR.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'LedgerSMB/IR.pm') diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index 714acf61..4812b9f8 100644 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -295,6 +295,12 @@ sub post_invoice { $project_id, $form->{"serialnumber_$i"}, $form->{"notes_$i"}, $invoice_id ) || $form->dberror($query); + if (defined $form->{approved}) { + + $query = qq| UPDATE ap SET approved = ? WHERE id = ?|; + $dbh->prepare($query)->execute($form->{approved}, $form->{id}) + || $form->dberror($query); + } if ( $form->{"inventory_accno_id_$i"} ) { -- cgit v1.2.3