X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FInventory.pm;h=13246387265d7afcc1a5084cd2aa2bd196f07105;hb=b084886b68e6eb9e5d25605894641ce24ae23473;hp=04631a64b17f935ec36a1da52d18969c1c842069;hpb=118a8b622238dd7ca8b93e0c120d382d106c1b46;p=kivitendo-erp.git diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index 04631a64b..132463872 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -704,7 +704,7 @@ sub init_stocktaking_cutoff_date { my $now = DateTime->now_local; my $cutoff = DateTime->new(year => $now->year, month => 12, day => 31); if ($now->month < 1) { - $cutoff->substract(years => 1); + $cutoff->subtract(years => 1); } return $cutoff; } @@ -820,7 +820,7 @@ select unnest(ids) SQL my $objs = SL::DB::Manager::Inventory->get_all( - query => [ id => [ \"$query" ] ], + query => [ id => [ \"$query" ] ], # " make emacs happy with_objects => [ 'parts', 'trans_type', 'bin', 'bin.warehouse' ], # prevent lazy loading in template sort_by => 'itime DESC', ); @@ -953,7 +953,7 @@ sub _already_counted { my %bestbefore_filter; if ($::instance_conf->get_show_bestbefore) { - %bestbefore_filter = (bestbefore => $params{bestbefore}); + %bestbefore_filter = (bestbefore => ($params{bestbefore} || undef)); } SL::DB::Manager::Stocktaking->get_all(query => [and => [parts_id => $part->id,