[%- USE T8 %]
-[% USE HTML %]<body>
- <script type="text/javascript" src="js/checkbox_utils.js"></script>
+[% USE HTML %]
+[% USE L %][%- USE LxERP -%]
+<h1>[% title %]</h1>
+
+[% SET all_active = 1 %][% FOREACH row = DUNNINGS %][% IF !row.active %][% SET all_active = 0 %][% LAST %][% END %][% END %]
+[% SET all_email = 1 %][% FOREACH row = DUNNINGS %][% IF !row.email %][% SET all_email = 0 %][% LAST %][% END %][% END %]
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/dunning.js"></script>
- <div class="listtop" width="100%">[% title %]</div>
-
<p>[% 'The columns "Dunning Duedate", "Total Fees" and "Interest" show data for the previous dunning created for this invoice.' | $T8 %]</p>
<form name="Form" method="post" action="dn.pl">
- <table width="100%">
+ <table width="100%" id="dunning_invoice_list">
<th class="listheading" colspan="2">[% 'Current / Next Level' | $T8 %]</th>
<th class="listheading">
- <input type="checkbox" name="selectall_active" id="selectall_active" onclick="checkbox_check_all('selectall_active', 'active_', 1, [% rowcount %]);">
+ [% L.checkbox_tag('selectall_active', checkall='INPUT[name*=active_]', checked=all_active) %]
<label for="selectall_active">[% 'Active?' | $T8 %]</label>
</th>
<th class="listheading">
- <input type="checkbox" name="selectall_email" id="selectall_email" onclick="checkbox_check_all('selectall_email', 'email_', 1, [% rowcount %]);">
+ [% L.checkbox_tag('selectall_email', checkall='INPUT[name*=email_]', checked=all_email) %]
<label for="selectall_email">[% 'eMail?' | $T8 %]</label>
</th>
<th class="listheading">[% 'Customername' | $T8 %]</th>
+ <th class="listheading">[% 'Language' | $T8 %]</th>
<th class="listheading">[% 'Invno.' | $T8 %]</th>
<th class="listheading">[% 'Invdate' | $T8 %]</th>
<th class="listheading">[% 'Inv. Duedate' | $T8 %]</th>
<th class="listheading">[% 'Dunning Duedate' | $T8 %]</th>
<th class="listheading">[% 'Total Fees' | $T8 %]</th>
<th class="listheading">[% 'Interest' | $T8 %]</th>
+ [% IF l_include_direct_debit %]
+ <th class="listheading">[% 'direct debit' | $T8 %]</th>
+ [% END %]
<!-- Ausgabe der einzelnen Zeilen -->
[% FOREACH row = DUNNINGS %]
- <tr class="listrow[% loop.count % 2 %]">
+ <tr class="listrow[% loop.count % 2 %][% IF row.direct_debit %] direct_debit[% END %]">
<td>
<input type="hidden" name="inv_id_[% loop.count %]" size="2" value="[% HTML.escape(row.id) %]">
<td><input type="checkbox" name="active_[% loop.count %]" value="1" [% IF row.active %]checked[% END %]></td>
<td><input type="checkbox" name="email_[% loop.count %]" value="1" [% IF row.email %]checked[% END %]></td>
<td><input type="hidden" name="customername_[% loop.count %]" size="6" value="[% HTML.escape(row.customername) %]">[% HTML.escape(row.customername) %]</td>
+ <td><input type="hidden" name="language_id_[% loop.count %]" size="6" value="[% HTML.escape(row.language_id) %]">[% HTML.escape(row.language) %]</td>
<td>
<input type="hidden" name="invnumber_[% loop.count %]" size="6" value="[% HTML.escape(row.invnumber) %]">
- <a href="is.pl?action=edit&type=invoice&id=[% row.id | url %]">[% HTML.escape(row.invnumber) %]</a>
+ <a href="[% IF row.invoice %]is[% ELSE %]ar[% END %].pl?action=edit&type=invoice&id=[% row.id | url %]">[% HTML.escape(row.invnumber) %]</a>
</td>
<td><input type="hidden" name="invdate_[% loop.count %]" size="6" value="[% HTML.escape(row.transdate) %]">[% HTML.escape(row.transdate) %]</td>
<td><input type="hidden" name="inv_duedate_[% loop.count %]" size="6" value="[% HTML.escape(row.duedate) %]">[% HTML.escape(row.duedate) %]</td>
<td align="right"><input type="hidden" name="amount_[% loop.count %]" size="6" value="[% HTML.escape(row.amount) %]">[% HTML.escape(row.amount) %]</td>
<td align="right"><input type="hidden" name="open_amount_[% loop.count %]" size="6" value="[% HTML.escape(row.open_amount) %]">[% HTML.escape(row.open_amount) %]</td>
- <td>[% HTML.escape(row.next_duedate) %]</td>
+ <td>[% HTML.escape(row.dunning_duedate) %]</td>
<td align="right"><input type="hidden" name="fee_[% loop.count %]" size="6" value="[% HTML.escape(row.fee) %]">[% HTML.escape(row.fee) %]</td>
<td align="right"><input type="hidden" name="interest_[% loop.count %]" size="6" value="[% HTML.escape(row.interest) %]">[% HTML.escape(row.interest) %]</td>
+ [% IF l_include_direct_debit %]
+ <td>
+ [% IF row.direct_debit %][% LxERP.t8("yes") %][% ELSE %][% LxERP.t8("no") %][% END %]
+ </td>
+ [% END %]
</tr>
[% END %]
</table>
<hr size=3 noshade>
+ <input type="checkbox" id='force_lang' name="force_lang" size="6" value="1">
+ [% 'Override invoice language' | $T8 %]
[% PRINT_OPTIONS %]
<br>
[% UNLESS DEBUG_DUNNING %]onclick="this.disabled=true; this.value='[% 'The dunning process started' | $T8 %]'; document.Form.submit()"[% END %]>
</form>
-</body>
-</html>
+ <script type='text/javascript'>
+ $(function() {
+ $("select[name='language_id']").prop('disabled', $('#force_lang').prop('checked'));
+ $('#force_lang').checkall('select[name="language_id"]', 'disabled');
+ });
+ </script>