X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/14d905e5a6bdc95c13bf7575deb5f79f6e34fb2c..ffd2ad0a68e4e61d0888a477a78508c651367d57:/SL/Controller/Inventory.pm diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index 539f34a9e..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; } @@ -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,