Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / ar / ar_transactions_bottom.html
index ad631f3..e24771b 100644 (file)
@@ -1,11 +1,29 @@
-[% USE T8 %][% USE HTML %] <form method="post" action="dispatcher.pl?M=ar">
+[% 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="A_ar_transaction" value="[%- 'AR Transaction' | $T8 %]">
-  <input class="submit" type="submit" name="A_sales_invoice" value="[%- 'Sales Invoice' | $T8 %]">
+  [% 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">
+  [% L.hidden_tag("callback", callback) %]
  </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") } ] ;
+     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 %]