return $self->redirect_to(action => 'list_invoices');
}
- $self->download_or_print_documents(printer_id => $::form->{printer_id}, invoices => \@invoices);
+ $self->download_or_print_documents(printer_id => $::form->{printer_id}, invoices => \@invoices, bothsided => $::form->{bothsided});
}
sub action_create_print_all_start {
});
@pdf_file_names = $self->create_pdfs(%pdf_params);
- my $merged_pdf = $self->merge_pdfs(file_names => \@pdf_file_names);
+ my $merged_pdf = $self->merge_pdfs(file_names => \@pdf_file_names, bothsided => $params{bothsided});
unlink @pdf_file_names;
if (!$params{printer_id}) {
$('#print_options').dialog('close');
$('#printer_id').val($('#print_options_printer_id').val());
+ $('#bothsided').val($('#print_options_bothsided').prop('checked') ? 1 : 0);
$('#action').val('MassInvoiceCreatePrint/print');
$('#report_form').submit();
[% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
[% L.hidden_tag("printer_id") %]
+ [% L.hidden_tag("bothsided") %]
</form>
<form method="post" action="ar.pl" id="create_new_form">
[% IF ALL_PRINTERS.size %]
<div id="print_options" class="hidden">
+ <p>
+ [% LxERP.t8("Print both sided") %]:
+ [% L.checkbox_tag('', id="print_options_bothsided") %]
+ </p>
<p>
[% LxERP.t8("Print destination") %]:
[% SET printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;
[% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
[% L.hidden_tag("printer_id") %]
+ [% L.hidden_tag("bothsided") %]
</form>
[% IF SELF.printers.size %]
<div id="print_options" class="hidden">
+ <p>
+ [% LxERP.t8("Print both sided") %]:
+ [% L.checkbox_tag('', id="print_options_bothsided") %]
+ </p>
<p>
[% LxERP.t8("Print destination") %]:
[% SET printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;