[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
-<body>
- <div class="listtop">[% FORM.title %]</div>
+ <h1>[% FORM.title %]</h1>
[%- INCLUDE 'common/flash.html' %]
</p>
[%- ELSE %]
- <table>
+ <table id="payment_term_list">
+ <thead>
<tr class="listheading">
- <th align="center"><img src="image/up.png"></th>
- <th align="center"><img src="image/down.png"></th>
+ <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
<th>[%- 'Description' | $T8 %]</th>
- <th>[%- 'Long Description' | $T8 %]</th>
+ <th>[%- 'Long Description (quotations & orders)' | $T8 %]</th>
+ <th>[%- 'Long Description (invoices)' | $T8 %]</th>
+ <th>[% 'Automatic date calculation' | $T8 %]</th>
<th align="right">[%- 'Netto Terms' | $T8 %]</th>
<th align="right">[%- 'Skonto Terms' | $T8 %]</th>
<th align="right">[%- 'Skonto' | $T8 %]</th>
+ <th align="right">[%- 'Obsolete' | $T8 %]</th>
</tr>
+ </thead>
+ <tbody>
[%- FOREACH payment_term = PAYMENT_TERMS %]
- <tr class="listrow[% loop.count % 2 %]">
- <td align="center">
- [%- UNLESS loop.first %]
- <a href="[% SELF.url_for(action => 'move_up', id => payment_term.id) %]"><img src="image/up.png" border="0"></a>
- [%- END %]
- </td>
- <td align="center">
- [%- UNLESS loop.last %]
- <a href="[% SELF.url_for(action => 'move_down', id => payment_term.id) %]"><img src="image/down.png" border="0"></a>
- [%- END %]
- </td>
+ <tr class="listrow[% loop.count % 2 %]" id="payment_term_id_[% payment_term.id %]">
+ <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
<td>
<a href="[% SELF.url_for(action => 'edit', id => payment_term.id) %]">
[%- HTML.escape(payment_term.description) %]
</a>
</td>
<td>[%- HTML.escape(payment_term.description_long) %]</td>
+ <td>[%- HTML.escape(payment_term.description_long_invoice) %]</td>
+ <td>[% IF payment_term.auto_calculation %][% LxERP.t8("yes") %][% ELSE %][% LxERP.t8("no") %][% END %]</td>
<td align="right">[%- HTML.escape(payment_term.terms_netto_as_number) %]</td>
<td align="right">[%- HTML.escape(payment_term.terms_skonto_as_number) %]</td>
- <td align="right">[%- HTML.escape(payment_term.percent_skonto_as_number) %] %</td>
+ <td align="right">[%- HTML.escape(payment_term.percent_skonto_as_percent) %] %</td>
+ <td align="right">[%- HTML.escape(payment_term.obsolete) %]</td>
</tr>
[%- END %]
+ </tbody>
</table>
[%- END %]
</p>
</form>
-</body>
-</html>
+ [% L.sortable_element('#payment_term_list tbody', url => 'controller.pl?action=PaymentTerm/reorder', with => 'payment_term_id') %]