From: Bernd Bleßmann Date: Mon, 6 Jan 2014 13:53:53 +0000 (+0100) Subject: Mahnungsnummern in den Druckvorlagen immer verfügbar machen. X-Git-Tag: release-3.1.0beta1~22^2~55^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2e0c894192225e2b3fa81f527ab6974acdd57715;p=kivitendo-erp.git Mahnungsnummern in den Druckvorlagen immer verfügbar machen. 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. --- 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') {