summaryrefslogtreecommitdiff
path: root/LedgerSMB/CP.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/CP.pm')
-rwxr-xr-xLedgerSMB/CP.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm
index 18ab0bde..abcf2fdd 100755
--- a/LedgerSMB/CP.pm
+++ b/LedgerSMB/CP.pm
@@ -518,6 +518,10 @@ sub post_payment {
$sth->execute( $amount, $form->{datepaid}, $form->{"id_$i"} )
|| $form->dberror( $query, 'CP.pm', 530 );
+ if ($amount->is_nan) {
+ $dbh->rollback;
+ return;
+ }
%audittrail = (
tablename => $form->{arap},
reference => $form->{source},
@@ -793,6 +797,11 @@ sub post_payments {
$sth->execute( $amount, $form->{datepaid}, $form->{"id_$i"} )
|| $form->dberror( $query, 'CP.pm', 796 );
+ if ($amount->is_nan) {
+ $dbh->rollback;
+ return;
+ }
+
%audittrail = (
tablename => $form->{arap},
reference => $form->{source},