<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/dunning.js"></script>
- <script type="text/javascript">
- <!--
- function enable_invoice_controls(enable) {
- document.Form.AR.disabled = !enable;
- document.Form.AR_amount_fee.disabled = !enable;
- document.Form.AR_amount_interest.disabled = !enable;
- }
- -->
- </script>
-
<div class="listtop" width="100%">[% title %]</div>
<form method="post" action="dn.pl" name="Form">
<th class="listheading"><translate>Dunning Level</translate></th>
<th class="listheading"><translate>Dunning Description</translate></th>
<th class="listheading"><translate>Active?</translate></th>
- <th class="listheading"><translate>Auto Send?</translate></th>
<th class="listheading"><translate>eMail Send?</translate></th>
+<!-- <th class="listheading"><translate>Auto Send?</translate></th> -->
+ <th class="listheading"><translate>Create invoice?</translate></th>
<th class="listheading"><translate>Fristsetzung</translate></th>
<th class="listheading"><translate>Duedate +Days</translate></th>
<th class="listheading"><translate>Fee</translate></th>
<input type="hidden" name="email_attachment_[% DUNNING_it.count %]" value="[% HTML.escape(row.email_attachment) %]">
</td>
- <td><input type="checkbox" name="auto_[% DUNNING_it.count %]" value="1" [% IF row.auto %]checked[% END %]></td>
+<!-- <td><input type="checkbox" name="auto_[% DUNNING_it.count %]" value="1" [% IF row.auto %]checked[% END %]></td> -->
+ <td><input type="checkbox" name="create_invoices_for_fees_[% DUNNING_it.count %]" value="1" [% IF row.create_invoices_for_fees %]checked[% END %]></td>
<td><input name="payment_terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.payment_terms) %]"></td>
<td><input name="terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.terms) %]"></td>
<td><input name="fee_[% DUNNING_it.count %]" size="5" value="[% HTML.escape(row.fee) %]"></td>
[% IF DUNNING_it.last %][% SET rowcount = DUNNING_it.size + 1 %][% END %]
[% END %]
+ [%- UNLESS rowcount %][% SET rowcount = '1' %][% END -%]
<tr valign="top" class="listrow[% IF odd %]1[% ELSE %]0[% END %]">
<td>
<input type="hidden" name="dunning_level_[% rowcount %]" value="[% rowcount %]">
<input type="hidden" name="email_attachment_[% rowcount %]">
</td>
- <td><input type="checkbox" name="auto_[% rowcount %]" value="1" checked></td>
+<!-- <td><input type="checkbox" name="auto_[% rowcount %]" value="1" checked></td> -->
+ <td><input type="checkbox" name="create_invoices_for_fees_[% rowcount %]" value="1" checked></td>
<td><input name="payment_terms_[% rowcount %]" size="3"></td>
<td><input name="terms_[% rowcount %]" size="3"></td>
<td><input name="fee_[% rowcount %]" size="5"></td>
<hr size="3" noshade>
- <p>
- <input type="checkbox" name="create_invoices_for_fees" id="create_invoices_for_fees"
- [% IF create_invoices_for_fees %]checked[% END %]
- value="1" onclick="enable_invoice_controls(this.checked);">
- <label for="create_invoices_for_fees"><translate>Automatically create customer invoices for fees and interests</translate></label>
- </p>
+ <p><translate>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.</translate></p>
<table>
<tr>
<th align="right"><translate>Account for fees</translate></th>
<td>
- <select name="AR_amount_fee" [% UNLESS create_invoices_for_fees %]disabled[% END %]>
+ <select name="AR_amount_fee">
[% 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>
[% END %]
</select>
<tr>
<th align="right"><translate>Account for interest</translate></th>
<td>
- <select name="AR_amount_interest" [% UNLESS create_invoices_for_fees %]disabled[% END %]>
+ <select name="AR_amount_interest">
[% 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>
[% END %]
</select>
<tr>
<th align="right"><translate>Record in</translate></th>
<td>
- <select name="AR" [% UNLESS create_invoices_for_fees %]disabled[% END %]>
+ <select name="AR">
[% 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>
[% END %]
</select>
<input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
- <input type="hidden" name="login" value="[% HTML.escape(login) %]">
- <input type="hidden" name="password" value="[% HTML.escape(password) %]">
-
<input class="submit" type="submit" name="action" value="<translate>Save</translate>">
</form>