summaryrefslogtreecommitdiff
path: root/LedgerSMB/IS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/IS.pm')
-rwxr-xr-xLedgerSMB/IS.pm5
1 files changed, 5 insertions, 0 deletions
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);