Revision b269674b
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
209 | 209 |
}; |
210 | 210 |
}; |
211 | 211 |
|
212 |
# # if there is exactly one non-executed sepa_export_item for the invoice
|
|
212 |
# if there is exactly one non-executed sepa_export_item for the invoice |
|
213 | 213 |
if ( my $seis = $invoice->find_sepa_export_items({ executed => 0 }) ) { |
214 | 214 |
if (scalar @$seis == 1) { |
215 | 215 |
my $sei = $seis->[0]; |
... | ... | |
219 | 219 |
my $arap = $invoice->is_sales ? 'ar' : 'ap'; |
220 | 220 |
|
221 | 221 |
if (abs($self->amount) == ($sei->amount) && $invoice->id == $sei->arap_id) { |
222 |
$agreement += $points{sepa_export_item}; |
|
222 |
$agreement += $points{sepa_export_item};
|
|
223 | 223 |
$rule_matches .= 'sepa_export_item(' . $points{'sepa_export_item'} . ') '; |
224 | 224 |
} |
225 | 225 |
} else { |
... | ... | |
227 | 227 |
# zero: do nothing, no sepa_export_item exists, no match |
228 | 228 |
# more than one: does this ever apply? Currently you can't create sepa |
229 | 229 |
# exports for invoices that already have a non-executed sepa_export |
230 |
# TODO: Catch the more than one case. User is allowed to split |
|
231 |
# payments for one invoice item in one sepa export. |
|
230 | 232 |
} |
231 | 233 |
} |
232 | 234 |
|
Auch abrufbar als: Unified diff
BankTransaction: Fall SEPA-Export. Weitere Code-QS und TODO Anmerkung