X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c301c2b3be223fe384bea2d899c6a08de54c21de..e83fcf3aa3394efdf2293ea60d5510fcfbf41b52:/bin/mozilla/gl.pl diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index c39facd0b..5f65720b9 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -1365,7 +1365,9 @@ sub post_transaction { die "guru meditation error: Can only assign amount to one bank account booking" if scalar @{ $payment } > 1; # credit/debit * -1 matches the sign for bt.amount and bt.invoice_amount - die "Can only assign the full bank amount to a single general ledger booking" unless $bt->amount == $payment->[0]->amount * -1; + die "Can only assign the full (partial) bank amount to a single general ledger booking" + unless $bt->not_assigned_amount == $payment->[0]->amount * -1; + $bt->update_attributes(invoice_amount => $bt->invoice_amount + ($payment->[0]->amount * -1)); # create record_link