$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);
$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});
}
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++;
$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') {