epic-s6ts
[kivitendo-erp.git] / templates / webpages / dunning / edit_config.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP -%][%- USE L -%]
4 <h1>[% title %]</h1>
5
6  <script type="text/javascript" src="js/common.js"></script>
7  <script type="text/javascript" src="js/dunning.js"></script>
8
9  <form method="post" action="dn.pl" name="Form" id="form">
10   <table>
11
12    <tr>
13     <th class="listheading">[% 'Dunning Level' | $T8 %]</th>
14     <th class="listheading">[% 'Dunning Description' | $T8 %]</th>
15     <th class="listheading">[% 'Active?' | $T8 %]</th>
16     <th class="listheading">[% 'eMail Send?' | $T8 %]</th>
17 <!--     <th class="listheading">[% 'Auto Send?' | $T8 %]</th>  -->
18     <th class="listheading">[% 'Create invoice?' | $T8 %]</th>
19     <th class="listheading">[% 'Include original Invoices?' | $T8 %]</th>
20     <th class="listheading">[% 'Fristsetzung' | $T8 %]</th>
21     <th class="listheading">[% 'Duedate +Days' | $T8 %]</th>
22     <th class="listheading">[% 'Fee' | $T8 %]</th>
23     <th class="listheading">[% 'Interest Rate' | $T8 %]</th>
24     <th class="listheading">[% 'Template' | $T8 %]</th>
25    </tr>
26
27    [% SET odd = '1' %][% USE DUNNING_it = Iterator(DUNNING) %][% FOREACH row = DUNNING_it %]
28     <tr valign="top" class="listrow[% IF odd %]1[% SET odd = '0' %][% ELSE %]0[% SET odd = '1' %][% END %]">
29      <td>
30       <input type="hidden" name="dunning_level_[% DUNNING_it.count %]" value="[% DUNNING_it.count %]">
31       <input type="hidden" name="id_[% DUNNING_it.count %]" value="[% HTML.escape(row.id) %]">
32       [% DUNNING_it.count %]
33      </td>
34
35      <td><input name="dunning_description_[% DUNNING_it.count %]" value="[% HTML.escape(row.dunning_description) %]"></td>
36      <td><input type="checkbox" name="active_[% DUNNING_it.count %]" value="1" [% IF row.active %]checked[% END %]></td>
37
38      <td>
39       <input type="checkbox" name="email_[% DUNNING_it.count %]" value="1" [% IF row.email %]checked[% END %]>
40       <button type="button" onclick="set_email_window('email_subject_[% DUNNING_it.count %]', 'email_body_[% DUNNING_it.count %]', 'email_attachment_[% DUNNING_it.count %]')">
41        [% 'L' | $T8 %]</button>
42       <input type="hidden" name="email_body_[% DUNNING_it.count %]" value="[% HTML.escape(row.email_body) %]">
43       <input type="hidden" name="email_subject_[% DUNNING_it.count %]" value="[% HTML.escape(row.email_subject) %]">
44       <input type="hidden" name="email_attachment_[% DUNNING_it.count %]" value="[% HTML.escape(row.email_attachment) %]">
45      </td>
46
47 <!--      <td><input type="checkbox" name="auto_[% DUNNING_it.count %]" value="1" [% IF row.auto %]checked[% END %]></td> -->
48      <td><input type="checkbox" name="create_invoices_for_fees_[% DUNNING_it.count %]" value="1" [% IF row.create_invoices_for_fees %]checked[% END %]></td>
49      <td><input type="checkbox" name="print_original_invoice_[% DUNNING_it.count %]" value="1" [% IF row.print_original_invoice %]checked[% END %]></td>
50      <td><input name="payment_terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.payment_terms) %]"></td>
51      <td><input name="terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.terms) %]"></td>
52      <td><input name="fee_[% DUNNING_it.count %]" size="5" value="[% HTML.escape(row.fee) %]"></td>
53      <td><input name="interest_rate_[% DUNNING_it.count %]" size="4" value="[% HTML.escape(row.interest_rate) %]">%</td>
54      <td><input name="template_[% DUNNING_it.count %]" value="[% HTML.escape(row.template) %]"></td>
55     </tr>
56     [% IF DUNNING_it.last %][% SET rowcount = DUNNING_it.size + 1 %][% END %]
57    [% END %]
58
59    [%- UNLESS rowcount %][% SET rowcount = '1' %][% END -%]
60    <tr valign="top" class="listrow[% IF odd %]1[% ELSE %]0[% END %]">
61     <td>
62      <input type="hidden" name="dunning_level_[% rowcount %]" value="[% rowcount %]">
63      <input type="hidden" name="id_[% rowcount %]">
64      [% rowcount %]
65     </td>
66
67     <td><input name="dunning_description_[% rowcount %]"></td>
68     <td><input type="checkbox" name="active_[% rowcount %]" value="1" checked></td>
69
70     <td>
71      <input type="checkbox" name="email_[% rowcount %]" value="1" checked>
72      <button type="button" onclick="set_email_window('email_subject_[% rowcount %]', 'email_body_[% rowcount %]', 'email_attachment_[% rowcount %]')">
73       [% 'L' | $T8 %]</button>
74      <input type="hidden" name="email_body_[% rowcount %]">
75      <input type="hidden" name="email_subject_[% rowcount %]">
76      <input type="hidden" name="email_attachment_[% rowcount %]">
77     </td>
78
79 <!--     <td><input type="checkbox" name="auto_[% rowcount %]" value="1" checked></td> -->
80     <td><input type="checkbox" name="create_invoices_for_fees_[% rowcount %]" value="1" checked></td>
81     <td><input type="checkbox" name="print_original_invoice_[% DUNNING_it.count %]" value="1" [% IF row.print_original_invoice %]checked[% END %]></td>
82     <td><input name="payment_terms_[% rowcount %]" size="3"></td>
83     <td><input name="terms_[% rowcount %]" size="3"></td>
84     <td><input name="fee_[% rowcount %]" size="5"></td>
85     <td><input name="interest_rate_[% rowcount %]" size="4">%</td>
86     <td><input name="template_[% rowcount %]"></td>
87    </tr>
88   </table>
89
90   <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
91
92   <hr size="3" noshade>
93
94   <p>[% 'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' | $T8 %]</p>
95
96   <table>
97    <tr>
98     <th align="right">[% 'Account for fees' | $T8 %]</th>
99     <td>
100      <select name="AR_amount_fee">
101       [% FOREACH row = SELECT_AR_AMOUNT %]<option value="[% HTML.escape(row.id) %]" [% IF row.AR_amount_fee_selected %]selected[% END %]>[% HTML.escape(row.accno) %]--[% HTML.escape(row.description) %]</option>
102       [% END %]
103      </select>
104     </td>
105    </tr>
106
107    <tr>
108     <th align="right">[% 'Account for interest' | $T8 %]</th>
109     <td>
110      <select name="AR_amount_interest">
111       [% FOREACH row = SELECT_AR_AMOUNT %]<option value="[% HTML.escape(row.id) %]" [% IF row.AR_amount_interest_selected %]selected[% END %]>[% HTML.escape(row.accno) %]--[% HTML.escape(row.description) %]</option>
112       [% END %]
113      </select>
114     </td>
115    </tr>
116
117    <tr>
118     <th align="right">[% 'Record in' | $T8 %]</th>
119     <td>
120      <select name="AR">
121       [% FOREACH row = SELECT_AR %]<option value="[% HTML.escape(row.id) %]" [% IF row.AR_selected %]selected[% END %]>[% HTML.escape(row.accno) %]--[% HTML.escape(row.description) %]</option>
122       [% END %]
123      </select>
124     </td>
125    </tr>
126    <tr>
127     <th align="right">[% 'Dunning Creator' | $T8 %]</th>
128     <td>[% L.select_tag('dunning_creator', [ [ 'current_employee', LxERP.t8('Current Employee') ],[ 'invoice_employee', LxERP.t8('Employee from the original invoice') ]  ], default=dunning_creator) %]
129     </td>
130    </tr>
131   </table>
132
133   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
134  </form>