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/GL.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'LedgerSMB/GL.pm') diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm index 322e08b1..98be9cbe 100644 --- a/LedgerSMB/GL.pm +++ b/LedgerSMB/GL.pm @@ -130,6 +130,12 @@ sub post_transaction { department_id = ? WHERE id = ?|; + if (defined $form->{approved}) { + + $query = qq| UPDATE gl SET approved = ? WHERE id = ?|; + $dbh->prepare($query)->execute($form->{approved}, $form->{id}) + || $form->dberror($query); + } $sth = $dbh->prepare($query); $sth->execute( $form->{transdate}, $department_id, $form->{id} ) || $form->dberror($query); -- cgit v1.2.3