8ee4952afa232ad045bc74b85cdd24674c2f05e1
[kivitendo-erp.git] / templates / webpages / oe / edit_periodic_invoices_config.html
1 [% USE HTML %]
2 [% USE LxERP %]
3 [% USE L %]
4 [% SET style="width: 400px" %]
5 <h1>[% title %]</h1>
6
7  <form name="Form" action="oe.pl" method="post">
8
9   <p>
10    <table border="0">
11     <tr>
12      <th align="right">[% LxERP.t8('Status') %]</th>
13      <td>[% L.checkbox_tag("active", checked => active, label => LxERP.t8('Active')) %]</td>
14     </tr>
15
16     <tr>
17      <td>&nbsp;</td>
18      <td>
19       [% L.checkbox_tag('terminated', label => LxERP.t8('terminated'), checked => terminated) %]
20      </td>
21     </tr>
22
23     <tr>
24      <th align="right" valign="top">[%- LxERP.t8('Billing Periodicity') %]</th>
25      <td valign="top">
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) %]
27      </td>
28     </tr>
29
30     <tr>
31      <th align="right" valign="top">[%- LxERP.t8('Order value periodicity') %]</th>
32      <td valign="top">
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) %]
37      </td>
38     </tr>
39
40     <tr>
41      <th align="right">[%- LxERP.t8('Start date') %]</th>
42      <td valign="top">
43       [% L.date_tag("start_date_as_date", start_date_as_date) %]
44      </td>
45     </tr>
46
47     <tr>
48      <th align="right">[%- LxERP.t8('End date') %]<sup>(1)</sup></th>
49      <td valign="top">
50       [% L.date_tag("end_date_as_date", end_date_as_date) %]
51      </td>
52     </tr>
53
54     <tr>
55      <th align="right">[%- LxERP.t8('Create first invoice on') %]<sup>(2)</sup></th>
56      <td valign="top">
57       [% L.date_tag("first_billing_date_as_date", first_billing_date_as_date) %]
58      </td>
59     </tr>
60
61     <tr>
62      <th align="right">[% LxERP.t8('Extend automatically by n months') %]</th>
63      <td valign="top">
64       [% L.input_tag("extend_automatically_by", extend_automatically_by, size => 10) %]
65      </td>
66     </tr>
67
68     <tr>
69      <th align="right">[%- LxERP.t8('Record in') %]</th>
70      <td valign="top">
71       [% L.select_tag("ar_chart_id", AR, title_key => 'description', default => ar_chart_id, style=style) %]
72      </td>
73     </tr>
74
75     <tr>
76      <th align="right">[%- LxERP.t8('direct debit') %]</th>
77      <td valign="top">[% L.checkbox_tag("direct_debit", checked=direct_debit) %]</td>
78     </tr>
79
80     <tr>
81      <th align="right">[%- LxERP.t8('Print automatically') %]</th>
82      <td valign="top">
83       [% L.checkbox_tag("print", onclick => "toggle_printer_id_ctrl()", checked => print) %]
84      </td>
85     </tr>
86
87     <tr>
88      <th align="right">[%- LxERP.t8('Printer') %]</th>
89      <td valign="top">
90       [% L.select_tag("printer_id", ALL_PRINTERS, title_key = 'printer_description', default = printer_id, disabled = !print, style=style) %]
91      </td>
92     </tr>
93
94     <tr>
95      <th align="right">[%- LxERP.t8('Copies') %]</th>
96      <td valign="top">[% L.input_tag("copies", copies, size => 6, disabled => !print) %]</td>
97     </tr>
98    </table>
99   </p>
100
101   <hr>
102
103   <p>(1): [%- LxERP.t8('The end date is the last day for which invoices will possibly be created.') %]</p>
104   <p>(2): [% LxERP.t8("If missing then the start date will be used.") %]</p>
105
106   [% L.hidden_tag('action', 'save_periodic_invoices_config') %]
107
108   <p>
109    [% L.submit_tag('', LxERP.t8('Close')) %]
110    [% L.submit_tag('', LxERP.t8('Cancel'), onclick => "self.close(); return false;") %]
111   </p>
112  </form>
113
114  <script type="text/javascript">
115   <!--
116     function toggle_printer_id_ctrl() {
117       var disabled = !$('#print').prop('checked');
118       $('#printer_id').prop('disabled', disabled);
119       $('#copies').prop('disabled', disabled);
120     }
121     -->
122  </script>