Revision 4a1b6455
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
js/kivi.MassInvoiceCreatePrint.js | ||
---|---|---|
12 | 12 |
alert(kivi.t8('No delivery orders have been selected.')); |
13 | 13 |
return false; |
14 | 14 |
}; |
15 |
|
|
15 | 16 |
this.checkInvoiceSelection = function() { |
16 | 17 |
if ($("[data-checkall=1]:checked").size() > 0) |
17 | 18 |
return true; |
... | ... | |
78 | 79 |
this.setup = function() { |
79 | 80 |
$('#create_button').click(kivi.MassInvoiceCreatePrint.submitMassCreationForm); |
80 | 81 |
$('#create_print_all_button').click(kivi.MassInvoiceCreatePrint.createPrintAllInitialize); |
81 |
$('#action_print').click(kivi.MassInvoiceCreatePrint.checkInvoiceSelection); |
|
82 |
}; |
|
83 |
|
|
84 |
ns.showMassPrintOptions = function() { |
|
85 |
$('#printer_options_printer_id').val($('#printer_id').val()); |
|
86 |
|
|
87 |
kivi.popup_dialog({ |
|
88 |
id: 'print_options', |
|
89 |
dialog: { |
|
90 |
title: kivi.t8('Print options'), |
|
91 |
width: 600, |
|
92 |
height: 200 |
|
93 |
} |
|
94 |
}); |
|
95 |
|
|
96 |
return true; |
|
97 |
}; |
|
98 |
|
|
99 |
ns.showMassPrintOptionsOrDownloadDirectly = function() { |
|
100 |
if (!kivi.MassInvoiceCreatePrint.checkInvoiceSelection()) |
|
101 |
return false; |
|
102 |
|
|
103 |
if ($('#print_options_printer_id').length === 0) |
|
104 |
return kivi.MassInvoiceCreatePrint.massPrint(); |
|
105 |
return kivi.MassInvoiceCreatePrint.showMassPrintOptions(); |
|
106 |
}; |
|
107 |
|
|
108 |
ns.massPrint = function() { |
|
109 |
$('#print_options').dialog('close'); |
|
110 |
|
|
111 |
$('#printer_id').val($('#print_options_printer_id').val()); |
|
112 |
$('#action').val('MassInvoiceCreatePrint/print'); |
|
113 |
|
|
114 |
$('#report_form').submit(); |
|
115 |
|
|
116 |
return true; |
|
82 | 117 |
}; |
83 | 118 |
}); |
84 | 119 |
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung in Berichtsfunktion in ar.pl