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/AA.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'LedgerSMB/AA.pm') diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 2edcc44a..4f14fda8 100644 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -321,7 +321,12 @@ sub post_transaction { ); $dbh->prepare($query)->execute(@queryargs) || $form->dberror($query); + if (defined $form->{approved}) { + $query = qq| UPDATE $table SET approved = ? WHERE id = ?|; + $dbh->prepare($query)->execute($form->{approved}, $form->{id}) || + $form->dberror($query); + } @queries = $form->run_custom_queries( $table, 'INSERT' ); # update exchangerate -- cgit v1.2.3