-[%- USE T8 %]
-[% USE HTML %] <form method="post" action="ar.pl">
+[% USE T8 %][% USE HTML %][%- USE LxERP -%][%- USE L -%]
- <input name="callback" type="hidden" value="[% callback %]">
-
- [% 'Create new' | $T8 %]<br>
-
- <input class="submit" type="submit" name="action" value="[% 'AR Transaction' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Sales Invoice' | $T8 %]">
+ [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
+ [% L.hidden_tag("printer_id") %]
+ </form>
+ <form method="post" action="ar.pl" id="create_new_form">
+ [% L.hidden_tag("callback", callback) %]
</form>
-</body>
-</html>
+[% IF ALL_PRINTERS.size %]
+ <div id="print_options" class="hidden">
+ <p>
+ [% LxERP.t8("Print destination") %]:
+ [% SET printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;
+ CALL printers.import(ALL_PRINTERS);
+ L.select_tag("", printers, id="print_options_printer_id", title_key="description", default=printer_id) %]
+ </p>
+
+ <p>
+ [% L.button_tag("kivi.MassInvoiceCreatePrint.massPrint()", LxERP.t8('Print')) %]
+ </p>
+ </div>
+[% END %]