Revision b008860a
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
720 | 720 |
|
721 | 721 |
$form->{AP} = [ @result ]; |
722 | 722 |
|
723 |
if ($form->{l_items} && scalar @{ $form->{AP} }) { |
|
724 |
my ($items_query, $items_sth); |
|
725 |
if ($form->{l_items}) { |
|
726 |
$items_query = |
|
727 |
qq|SELECT id |
|
728 |
FROM invoice |
|
729 |
WHERE trans_id = ? |
|
730 |
ORDER BY position|; |
|
731 |
|
|
732 |
$items_sth = prepare_query($form, $dbh, $items_query); |
|
733 |
} |
|
734 |
|
|
735 |
foreach my $ap (@{ $form->{AP} }) { |
|
736 |
do_statement($form, $items_sth, $items_query, $ap->{id}); |
|
737 |
$ap->{item_ids} = $dbh->selectcol_arrayref($items_sth); |
|
738 |
$ap->{item_ids} = undef if !@{$ap->{item_ids}}; |
|
739 |
} |
|
740 |
$items_sth->finish(); |
|
741 |
} |
|
742 |
|
|
723 | 743 |
$main::lxdebug->leave_sub(); |
724 | 744 |
} |
725 | 745 |
|
Auch abrufbar als: Unified diff
Belegberichte (Rechnungen) mit Positionsdetails