Massenerstellen von Rechnungen aus LS: sumbit direkt von der Aktion machen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 20 Nov 2020 15:45:18 +0000 (16:45 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 20 Nov 2020 16:22:46 +0000 (17:22 +0100)
Das submit, das die Umwandlung der Rechnungen startet, kann direkt über die
ActionBar angegeben werden. Damit fällt die js-Funktion ganz weg.

SL/Controller/MassInvoiceCreatePrint.pm
js/kivi.MassInvoiceCreatePrint.js

index b0c2e5c..c85d0e6 100644 (file)
@@ -377,7 +377,7 @@ sub setup_list_sales_delivery_orders_action_bar {
         ],
         action => [
           t8("Create and print invoices for all selected delivery orders"),
-          call      => [ 'kivi.MassInvoiceCreatePrint.submitMassCreationForm' ],
+          submit    => [ 'form', { action => 'MassInvoiceCreatePrint/create_invoices' } ],
           disabled  => !$params{num_rows} ? $::locale->text('The report doesn\'t contain entries.') : undef,
           only_if   => $params{show_creation_buttons},
           checks    => [ 'kivi.MassInvoiceCreatePrint.checkDeliveryOrderSelection' ],
index 6926082..4a9ba9f 100644 (file)
@@ -20,11 +20,6 @@ namespace('kivi.MassInvoiceCreatePrint', function(ns) {
     return false;
   };
 
-  this.submitMassCreationForm = function() {
-    kivi.submit_form_with_action('form', 'MassInvoiceCreatePrint/create_invoices');
-    return false;
-  };
-
   this.createPrintAllInitialize = function() {
     kivi.popup_dialog({
       id: 'create_print_all_dialog',