summaryrefslogtreecommitdiff
path: root/LedgerSMB/OP.pm
diff options
context:
space:
mode:
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