summaryrefslogtreecommitdiff
path: root/LedgerSMB/OP.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/OP.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/OP.pm')
-rw-r--r--LedgerSMB/OP.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/LedgerSMB/OP.pm b/LedgerSMB/OP.pm
index 3a07f036..836ef92c 100644
--- a/LedgerSMB/OP.pm
+++ b/LedgerSMB/OP.pm
@@ -92,9 +92,13 @@ sub overpayment {
$query = qq|
INSERT INTO acc_trans (trans_id, chart_id, transdate, amount)
VALUES (?, (SELECT id FROM chart
- WHERE accno = ?), ?, ?)|;
+ WHERE accno = ?), ?, ?, ?)|;
+ if (not defined $form->{approved}){
+ $form->{approved} = 1;
+ }
$sth = $dbh->prepare($query);
- $sth->execute( $uid, $accno, $form->{datepaid}, $fxamount * $ml )
+ $sth->execute( $uid, $accno, $form->{datepaid}, $fxamount * $ml,
+ $form->{approved} )
|| $form->dberror($query);
# add payment