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)
- : $bugru->call_sub("${type}_accno_id_${taxzone}");
+ : $bugru->call_sub("${type}_accno_id", $taxzone);
if ($chart_id) {
my $chart = $all_charts->{$chart_id} // SL::DB::Chart->load_cached($chart_id)->load;
sub bin { require SL::DB::Bin; SL::DB::Manager::Bin ->find_by_or_create(id => $_[0]->{bin_id}) }
}
-sub long_description {
+sub displayable_name {
join ' ', grep $_, map $_[0]->$_, qw(partnumber description);
}
C<$params{is_sales}>) or expense (for falsish values of
C<$params{is_sales}>) account for the current part. It uses the part's
associated buchungsgruppe and uses the fields belonging to the tax
-zone given by C<$params{taxzone}> (range 0..3).
+zone given by C<$params{taxzone}>.
The information retrieved by the function is cached.
the three key words C<income>, C<expense> and C<inventory>.
This function uses the part's associated buchungsgruppe and uses the
-fields belonging to the tax zone given by C<$params{taxzone}> (range
-0..3).
+fields belonging to the tax zone given by C<$params{taxzone}>.
The information retrieved by the function is cached.