From f171e7ac72b29da5dae511cc3cdaf446bcae1b32 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 2 Jul 2014 09:19:55 +0200 Subject: [PATCH] =?utf8?q?Wiederkehrende=20Rechnungen:=20Variablen=20f?= =?utf8?q?=C3=BCr=20lange=20Monatsnamen=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ging im Commit »Wiederkehrende Rechnungen: Formatierung von Datumsdruckvariablen über freie Formatstrings« kaputt. Danach waren die Variablen <%current_month_long%> schlicht leer. --- SL/BackgroundJob/CreatePeriodicInvoices.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 18abf7c1a..3b19811df 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -89,6 +89,10 @@ sub _generate_time_period_variables { previous_month => [ $period_start_date->clone->truncate(to => 'month')->subtract(months => 1), sub { $_[0]->month } ], next_month => [ $period_start_date->clone->truncate(to => 'month')->add( months => 1), sub { $_[0]->month } ], + current_month_long => [ $period_start_date->clone->truncate(to => 'month'), sub { $month_names[ $_[0]->month ] } ], + previous_month_long => [ $period_start_date->clone->truncate(to => 'month')->subtract(months => 1), sub { $month_names[ $_[0]->month ] } ], + next_month_long => [ $period_start_date->clone->truncate(to => 'month')->add( months => 1), sub { $month_names[ $_[0]->month ] } ], + current_year => [ $period_start_date->clone->truncate(to => 'year'), sub { $_[0]->year } ], previous_year => [ $period_start_date->clone->truncate(to => 'year')->subtract(years => 1), sub { $_[0]->year } ], next_year => [ $period_start_date->clone->truncate(to => 'year')->add( years => 1), sub { $_[0]->year } ], @@ -97,8 +101,6 @@ sub _generate_time_period_variables { period_end_date => [ $period_end_date ->clone->truncate(to => 'month'), sub { $::locale->format_date(\%::myconfig, $_[0]) } ], }; - map { $vars->{"${_}_month_long"} = $month_names[ $vars->{"${_}_month"} ] } qw(current previous next); - return $vars; } -- 2.20.1