From 2e0c894192225e2b3fa81f527ab6974acdd57715 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 6 Jan 2014 14:53:53 +0100 Subject: [PATCH] =?utf8?q?Mahnungsnummern=20in=20den=20Druckvorlagen=20imm?= =?utf8?q?er=20verf=C3=BCgbar=20machen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Zudem wird dir Mahnungsnummer dem Dateinnamen für den Download angehängt, sofern nur eine Mahnung gedruckt wird. Werden mehrere Mahnungen gedruckt, wird auch beim Erzeugen der Mahnungen das aktuelle Datum angehängt. Behebt #2398. --- SL/DN.pm | 3 ++- bin/mozilla/dn.pl | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index c38733e19..ebfa4f374 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -327,12 +327,13 @@ sub save_dunning { $form->{DUNNING_PDFS_EMAIL} = []; + $form->{dunning_id} = $dunning_id; + $self->create_invoice_for_fees($myconfig, $form, $dbh, $dunning_id); $self->print_invoice_for_fees($myconfig, $form, $dunning_id, $dbh); $self->print_dunning($myconfig, $form, $dunning_id, $dbh); - $form->{dunning_id} = $dunning_id; if ($send_email) { $self->send_email($myconfig, $form, $dunning_id, $dbh); diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 01658ab10..9cac44e3a 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -251,7 +251,8 @@ sub save_dunning { $form->{language_id} = $saved_language_id; - if($form->{DUNNING_PDFS}) { + if (scalar @{ $form->{DUNNING_PDFS} }) { + $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1; DN->melt_pdfs(\%myconfig, $form, $form->{copies}); } @@ -498,6 +499,7 @@ sub print_multiple { if (!$form->{force_lang}) { $form->{language_id} = $language_ids[$i]; } + $form->{dunning_id} = $dunning_id; DN->print_invoice_for_fees(\%myconfig, $form, $dunning_id); DN->print_dunning(\%myconfig, $form, $dunning_id); $i++; @@ -505,7 +507,7 @@ sub print_multiple { $form->{language_id} = $saved_language_id; if (scalar @{ $form->{DUNNING_PDFS} }) { - $form->{dunning_id} = strftime("%Y%m%d", localtime time); + $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1; DN->melt_pdfs(\%myconfig, $form, $form->{copies}); if ($form->{media} eq 'printer') { -- 2.20.1