diff options
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/AA.pm | 5 | ||||
-rwxr-xr-x | LedgerSMB/CP.pm | 9 | ||||
-rwxr-xr-x | LedgerSMB/IR.pm | 5 | ||||
-rwxr-xr-x | LedgerSMB/IS.pm | 5 |
4 files changed, 23 insertions, 1 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 5bfd0ac1..22c490dc 100755 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -580,7 +580,10 @@ sub post_transaction { } } } - + if ($invamount->is_nan) { + $dbh->rollback; + return; + } # save printed and queued $form->save_status($dbh); 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}, diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index 899b7939..9c6839d3 100755 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -773,6 +773,11 @@ sub post_invoice { $form->{name} =~ s/--$form->{vendor_id}//; $form->add_shipto( $dbh, $form->{id} ); + if ($invamount->is_nan) { + $dbh->rollback; + return; + } + my %audittrail = ( tablename => 'ap', reference => $form->{invnumber}, diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index 6fc6ba81..4a462b9a 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -1515,6 +1515,11 @@ sub post_invoice { $form->{name} =~ s/--$form->{customer_id}//; $form->add_shipto( $dbh, $form->{id} ); + if ($invamount->is_nan) { + $dbh->rollback; + return; + } + # save printed, emailed and queued $form->save_status($dbh); |