X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1663057f67e6dc72fd492d52e5a97b659ec90f63..fb5b97ff8fd166a4a3a2cf29663c1dda2a9d98a7:/SL/DB/Part.pm diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 7fd35d80e..2535efca9 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -130,6 +130,11 @@ sub new_assortment { $class->new(%params, part_type => 'assortment'); } +sub last_modification { + my ($self) = @_; + return $self->mtime or $self->itime; +}; + sub orphaned { my ($self) = @_; die 'not an accessor' if @_ > 1; @@ -212,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) {