From b269674b6b0e99818c3643d4fc3271a8ce83b8c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 23 Jul 2017 21:25:08 +0200 Subject: [PATCH] BankTransaction: Fall SEPA-Export. Weitere Code-QS und TODO Anmerkung --- SL/DB/BankTransaction.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/DB/BankTransaction.pm b/SL/DB/BankTransaction.pm index 26c38e51b..6ad0348c7 100644 --- a/SL/DB/BankTransaction.pm +++ b/SL/DB/BankTransaction.pm @@ -209,7 +209,7 @@ sub get_agreement_with_invoice { }; }; -# # if there is exactly one non-executed sepa_export_item for the invoice + # if there is exactly one non-executed sepa_export_item for the invoice if ( my $seis = $invoice->find_sepa_export_items({ executed => 0 }) ) { if (scalar @$seis == 1) { my $sei = $seis->[0]; @@ -219,7 +219,7 @@ sub get_agreement_with_invoice { my $arap = $invoice->is_sales ? 'ar' : 'ap'; if (abs($self->amount) == ($sei->amount) && $invoice->id == $sei->arap_id) { - $agreement += $points{sepa_export_item}; + $agreement += $points{sepa_export_item}; $rule_matches .= 'sepa_export_item(' . $points{'sepa_export_item'} . ') '; } } else { @@ -227,6 +227,8 @@ sub get_agreement_with_invoice { # zero: do nothing, no sepa_export_item exists, no match # more than one: does this ever apply? Currently you can't create sepa # exports for invoices that already have a non-executed sepa_export + # TODO: Catch the more than one case. User is allowed to split + # payments for one invoice item in one sepa export. } } -- 2.20.1