Revision 338ffe02
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
221 | 221 |
}; |
222 | 222 |
|
223 | 223 |
# if there is exactly one non-executed sepa_export_item for the invoice |
224 |
if ( my $seis = $invoice->{sepa_export_item} ) {
|
|
225 |
if (scalar @$seis == 1) {
|
|
224 |
if ( my $seis = $invoice->find_sepa_export_items({ executed => 0 }) ) {
|
|
225 |
if (scalar @$seis == 1) { |
|
226 | 226 |
my $sei = $seis->[0]; |
227 | 227 |
|
228 |
if ( abs(abs($self->amount) - abs($sei->amount)) < 0.01 ) { |
|
228 |
# test for amount and id matching only, sepa transfer date and bank |
|
229 |
# transaction date needn't match |
|
230 |
my $arap = $invoice->is_sales ? 'ar' : 'ap'; |
|
231 |
|
|
232 |
if (abs($self->amount) == ($sei->amount) && $invoice->id == $sei->arap_id) { |
|
229 | 233 |
$agreement += $points{sepa_export_item}; |
230 | 234 |
$rule_matches .= 'sepa_export_item(' . $points{'sepa_export_item'} . ') '; |
231 | 235 |
} |
Auch abrufbar als: Unified diff
Optimierung SEPA-Erkennung #277
23 : 11 England gegen Pfalz, überzeugt mich