From fb5b97ff8fd166a4a3a2cf29663c1dda2a9d98a7 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Sun, 7 Aug 2016 23:35:53 +0200 Subject: [PATCH] =?utf8?q?SL::DB::Chart=20inventory=5Faccno=5Fid=20Pr?= =?utf8?q?=C3=BCfung=20abgefangen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Stattdessen wird geprüft, ob es eine Ware ist. Bei Dienstleistungen und Erzeugnissen ware inventory_accno_id leer. --- SL/DB/Part.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index d19ec26e4..2535efca9 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -217,7 +217,7 @@ sub get_chart { if (!exists $charts->{$taxzone}->{$type}) { require SL::DB::Buchungsgruppe; my $bugru = SL::DB::Buchungsgruppe->load_cached($self->buchungsgruppen_id); - my $chart_id = ($type eq 'inventory') ? ($self->inventory_accno_id ? $bugru->inventory_accno_id : undef) + my $chart_id = ($type eq 'inventory') ? ($self->is_part ? $bugru->inventory_accno_id : undef) : $bugru->call_sub("${type}_accno_id", $taxzone); if ($chart_id) { -- 2.20.1