Revision 723a1158
Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
use SL::TransNumber;
|
||
use SL::Util qw(trim);
|
||
use SL::DB;
|
||
use Carp;
|
||
|
||
use strict;
|
||
|
||
... | ... | |
my %accno_by_part = map { $_->{id} => $_ }
|
||
selectall_hashref_query($form, $dbh, <<SQL, @part_ids);
|
||
SELECT
|
||
p.id, p.inventory_accno_id AS is_part,
|
||
p.id, p.part_type,
|
||
bg.inventory_accno_id,
|
||
tc.income_accno_id AS income_accno_id,
|
||
tc.expense_accno_id AS expense_accno_id,
|
||
... | ... | |
while (my ($index => $part_id) = each %args) {
|
||
my $ref = $accno_by_part{$part_id} or next;
|
||
|
||
$ref->{"inventory_accno_id"} = undef unless $ref->{"is_part"};
|
||
$ref->{"inventory_accno_id"} = undef unless $ref->{"part_type"} eq 'part';
|
||
|
||
my %accounts;
|
||
for my $type (qw(inventory income expense)) {
|
Auch abrufbar als: Unified diff
inventory_accno_id aufräumen