From: Jan Büren Date: Thu, 7 Apr 2022 08:31:14 +0000 (+0200) Subject: Vorschläge für Kontoauszüge verbessern, fall: remote_account_number X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~58 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1b032ef45d886922f1fe347ec234c9b0c8c50efd;p=kivitendo-erp.git Vorschläge für Kontoauszüge verbessern, fall: remote_account_number Treffer sauberer setzen, ist überhaupt eine nicht leere Kontonummer vorhanden? --- diff --git a/SL/DB/BankTransaction.pm b/SL/DB/BankTransaction.pm index e8c98cb64..8617a8146 100644 --- a/SL/DB/BankTransaction.pm +++ b/SL/DB/BankTransaction.pm @@ -99,6 +99,17 @@ sub get_agreement_with_invoice { $bank_code = $invoice->vendor->bank_code if ! $invoice->is_sales; $iban = $invoice->vendor->iban if ! $invoice->is_sales; $account_number = $invoice->vendor->account_number if ! $invoice->is_sales; + + # check only valid remote_account_number (with some content) + if ($self->remote_account_number) { + if ($bank_code eq $self->remote_bank_code && $account_number eq $self->remote_account_number) { + $agreement += $points{remote_account_number}; + $rule_matches .= 'remote_account_number(' . $points{'remote_account_number'} . ') '; + } elsif ($iban eq $self->remote_account_number) { # elsif -> do not add twice + $agreement += $points{remote_account_number}; + $rule_matches .= 'remote_account_number(' . $points{'remote_account_number'} . ') '; + } + } if ( $bank_code eq $self->remote_bank_code && $account_number eq $self->remote_account_number ) { $agreement += $points{remote_account_number}; $rule_matches .= 'remote_account_number(' . $points{'remote_account_number'} . ') ';