X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f171e7ac72b29da5dae511cc3cdaf446bcae1b32..d557935a1484e5ebbb15f0eabe107d74e192ff0b:/SL/BackgroundJob/CreatePeriodicInvoices.pm diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 3b19811df..477702551 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -98,7 +98,7 @@ sub _generate_time_period_variables { next_year => [ $period_start_date->clone->truncate(to => 'year')->add( years => 1), sub { $_[0]->year } ], period_start_date => [ $period_start_date->clone->truncate(to => 'month'), sub { $::locale->format_date(\%::myconfig, $_[0]) } ], - period_end_date => [ $period_end_date ->clone->truncate(to => 'month'), sub { $::locale->format_date(\%::myconfig, $_[0]) } ], + period_end_date => [ $period_end_date, sub { $::locale->format_date(\%::myconfig, $_[0]) } ], }; return $vars; @@ -151,6 +151,7 @@ sub _create_periodic_invoice { $invoice->assign_attributes(deliverydate => $period_start_date, intnotes => $intnotes, + employee => $order->employee, # new_from sets employee to import user ); map { _replace_vars($invoice, $time_period_vars, $_) } qw(notes intnotes transaction_description);