Revision ce4ec1a8
Von Sven Schöling vor mehr als 6 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
53 | 53 |
|
54 | 54 |
|
55 | 55 |
sub get_agreement_with_invoice { |
56 |
my ($self, $invoice) = @_; |
|
56 |
my ($self, $invoice, %params) = @_;
|
|
57 | 57 |
|
58 | 58 |
carp "get_agreement_with_invoice needs an invoice object as its first argument" |
59 | 59 |
unless ref($invoice) eq 'SL::DB::Invoice' or ref($invoice) eq 'SL::DB::PurchaseInvoice'; |
... | ... | |
221 | 221 |
} |
222 | 222 |
|
223 | 223 |
# if there is exactly one non-executed sepa_export_item for the invoice |
224 |
if ( my $seis = $invoice->find_sepa_export_items({ executed => 0 }) ) { |
|
224 |
my $seis = $params{sepa_export_items} |
|
225 |
? [ grep { $invoice->id == ($invoice->is_sales ? $_->ar_id : $_->ap_id) } @{ $params{sepa_export_items} } ] |
|
226 |
: $invoice->find_sepa_export_items({ executed => 0 }); |
|
227 |
if ($seis) { |
|
225 | 228 |
if (scalar @$seis == 1) { |
226 | 229 |
my $sei = $seis->[0]; |
227 | 230 |
|
Auch abrufbar als: Unified diff
BankTransaction::get_agreement_with_invoice - sepa_export_items optional übergeben