projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b611e9e
)
BankTransaction: save_bt keinen bezahlten rechnungen akzeptieren
author
Jan Büren
<jan@kivitendo.de>
Sat, 23 Mar 2019 13:28:54 +0000
(14:28 +0100)
committer
Jan Büren
<jan@kivitendo.de>
Sat, 23 Mar 2019 13:28:54 +0000
(14:28 +0100)
SL/Controller/BankTransaction.pm
patch
|
blob
|
history
diff --git
a/SL/Controller/BankTransaction.pm
b/SL/Controller/BankTransaction.pm
index
a937451
..
9793b33
100644
(file)
--- a/
SL/Controller/BankTransaction.pm
+++ b/
SL/Controller/BankTransaction.pm
@@
-616,6
+616,9
@@
sub save_single_bank_transaction {
my $memo = ($data{memos} // [])->[$n_invoices];
$n_invoices++ ;
+ # safety check invoice open
+ croak("Invoice closed. Cannot proceed.") unless ($invoice->open_amount);
+
if ( ($payment_sent && $bank_transaction->not_assigned_amount >= 0)
|| ($payment_received && $bank_transaction->not_assigned_amount <= 0)) {
return {