Revision 4d250272
Von Jan Büren vor fast 6 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
40 | 40 |
my $record_links = SL::DB::Manager::RecordLink->get_all(where => [ from_table => 'bank_transactions', from_id => $self->id ]); |
41 | 41 |
|
42 | 42 |
foreach my $record_link (@{ $record_links }) { |
43 |
push @linked_invoices, SL::DB::Manager::Invoice->find_by(id => $record_link->to_id)->invnumber if $record_link->to_table eq 'ar';
|
|
44 |
push @linked_invoices, SL::DB::Manager::PurchaseInvoice->find_by(id => $record_link->to_id)->invnumber if $record_link->to_table eq 'ap';
|
|
45 |
push @linked_invoices, SL::DB::Manager::GLTransaction->find_by(id => $record_link->to_id)->reference if $record_link->to_table eq 'gl';
|
|
43 |
push @linked_invoices, SL::DB::Manager::Invoice->find_by(id => $record_link->to_id) if $record_link->to_table eq 'ar'; |
|
44 |
push @linked_invoices, SL::DB::Manager::PurchaseInvoice->find_by(id => $record_link->to_id) if $record_link->to_table eq 'ap'; |
|
45 |
push @linked_invoices, SL::DB::Manager::GLTransaction->find_by(id => $record_link->to_id) if $record_link->to_table eq 'gl'; |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
return [ @linked_invoices ]; |
... | ... | |
331 | 331 |
|
332 | 332 |
=item C<linked_invoices> |
333 | 333 |
|
334 |
Returns an array of record names (invoice number or gl reference)
|
|
334 |
Returns an array of record objects (invoices, debit, credit or gl objects)
|
|
335 | 335 |
which are linked for this bank transaction. |
336 | 336 |
|
337 | 337 |
Returns an empty array ref if no links are found. |
Auch abrufbar als: Unified diff
SL::DB::BankTransactions(linked_invoices): Returns an array of record objects
Anstatt nur die Namen der Belege werden jetzt die Beleg-Objekte
zurückgegeben. Einziger Aufruf der Methode beim ReportGenerator in
Controller::BankTransactions. Die Stelle entsprechend angepasst