4 [% SET style="width: 400px" %]
7 <form name="Form" action="oe.pl" method="post">
12 <th align="right">[% LxERP.t8('Status') %]</th>
13 <td>[% L.checkbox_tag("active", checked => active, label => LxERP.t8('Active')) %]</td>
19 [% L.checkbox_tag('terminated', label => LxERP.t8('terminated'), checked => terminated) %]
24 <th align="right" valign="top">[%- LxERP.t8('Billing Periodicity') %]</th>
26 [% L.select_tag("periodicity", [ [ "m", LxERP.t8("monthly") ], [ "q", LxERP.t8("every third month") ], [ "b", LxERP.t8("semiannually") ], [ "y", LxERP.t8("yearly") ] ], default=periodicity, style=style) %]
31 <th align="right" valign="top">[%- LxERP.t8('Order value periodicity') %]</th>
33 [% L.select_tag("order_value_periodicity",
34 [ [ "p", LxERP.t8("same as periodicity") ], [ "m", LxERP.t8("monthly") ], [ "q", LxERP.t8("every third month") ], [ "b", LxERP.t8("semiannually") ], [ "y", LxERP.t8("yearly") ],
35 [ "2", LxERP.t8("2 years") ], [ "3", LxERP.t8("3 years") ], [ "4", LxERP.t8("4 years") ], [ "5", LxERP.t8("5 years") ], ],
36 default=order_value_periodicity, style=style) %]
41 <th align="right">[%- LxERP.t8('Start date') %]</th>
43 [% L.date_tag("start_date_as_date", start_date_as_date) %]
48 <th align="right">[%- LxERP.t8('End date') %]<sup>(1)</sup></th>
50 [% L.date_tag("end_date_as_date", end_date_as_date) %]
55 <th align="right">[%- LxERP.t8('Create first invoice on') %]<sup>(2)</sup></th>
57 [% L.date_tag("first_billing_date_as_date", first_billing_date_as_date) %]
62 <th align="right">[% LxERP.t8('Extend automatically by n months') %]</th>
64 [% L.input_tag("extend_automatically_by", extend_automatically_by, size => 10) %]
69 <th align="right">[%- LxERP.t8('Record in') %]</th>
71 [% L.select_tag("ar_chart_id", AR, title_key => 'description', default => ar_chart_id, style=style) %]
76 <th align="right">[%- LxERP.t8('direct debit') %]</th>
77 <td valign="top">[% L.checkbox_tag("direct_debit", checked=direct_debit) %]</td>
80 <tr class="rule-before">
81 <th align="right">[%- LxERP.t8('Print automatically') %]</th>
83 [% L.checkbox_tag("print", onclick => "toggle_printer_id_ctrl()", checked => print) %]
88 <th align="right">[%- LxERP.t8('Printer') %]</th>
90 [% L.select_tag("printer_id", ALL_PRINTERS, title_key = 'printer_description', default = printer_id, disabled = !print, style=style) %]
95 <th align="right">[%- LxERP.t8('Copies') %]</th>
96 <td valign="top">[% L.input_tag("copies", copies, size => 6, disabled => !print) %]</td>
99 <tr class="rule-before">
100 <th align="right">[%- LxERP.t8("Send invoice via email") %]</th>
101 <td>[% L.checkbox_tag("send_email", onclick => "toggle_send_email_ctrl()", checked=send_email) %]</td>
105 <th align="right">[%- LxERP.t8("Contact to send to") %]</th>
106 <td>[% L.select_tag("email_recipient_contact_id", ALL_CONTACTS, title_key="full_name_dep", value_key="cp_id", default=email_recipient_contact_id, with_empty=1, disabled=!send_email, style=style) %]</td>
110 <th align="right">[%- LxERP.t8("Other recipients") %]<sup>3</sup></th>
111 <td>[% L.input_tag("email_recipient_address", email_recipient_address, disabled=!send_email, style=style) %]</td>
115 <th align="right">[%- LxERP.t8("Sender") %]<sup>4</sup></th>
116 <td>[% L.input_tag("email_sender", email_sender, disabled=!send_email, style=style) %]</td>
120 <th align="right">[%- LxERP.t8("Subject") %]</th>
121 <td>[% L.input_tag("email_subject", email_subject, disabled=!send_email, style=style) %]</td>
125 <th align="right" valign="top">[%- LxERP.t8("Message") %]</th>
126 <td valign="top">[% L.textarea_tag("email_body", email_body, disabled=!send_email, rows=8, style=style) %]</td>
133 <p>(1): [%- LxERP.t8('The end date is the last day for which invoices will possibly be created.') %]</p>
134 <p>(2): [% LxERP.t8("If missing then the start date will be used.") %]</p>
135 <p>(3): [% LxERP.t8("Multiple addresses can be entered separated by commas.") %]</p>
136 <p>(4): [% LxERP.t8("If left empty the default sender from the kivitendo configuration will be used (key 'email_from' in section 'periodic_invoices'; current value: #1).", HTML.escape(LXCONFIG.periodic_invoices.email_from)) %]</p>
138 [% L.hidden_tag('action', 'save_periodic_invoices_config') %]
141 [% L.submit_tag('', LxERP.t8('Close')) %]
142 [% L.submit_tag('', LxERP.t8('Cancel'), onclick => "self.close(); return false;") %]
146 <script type="text/javascript">
148 function toggle_printer_id_ctrl() {
149 var disabled = !$('#print').prop('checked');
150 $('#printer_id').prop('disabled', disabled);
151 $('#copies').prop('disabled', disabled);
154 function toggle_send_email_ctrl() {
155 var disabled = !$('#send_email').prop('checked');
156 $('#email_recipient_contact_id').prop('disabled', disabled);
157 $('#email_recipient_address').prop('disabled', disabled);
158 $('#email_sender').prop('disabled', disabled);
159 $('#email_subject').prop('disabled', disabled);
160 $('#email_body').prop('disabled', disabled);