- <td></td>
- <td colspan=3>
- <table width=100%>
- <tr>
- <th align=left nowrap>[% 'Credit Limit' | $T8 %]</th>
- <td>[% LxERP.format_amount(creditlimit, 0) %][% L.hidden_tag('creditlimit', LxERP.format_amount(creditlimit, 0)) %]</td>
- <th align=left nowrap>[% 'Remaining' | $T8 %]</th>
- <td class="plus[% creditlimit < 0 ? 0 : 1 %]">[% LxERP.format_amount(creditremaining, 0) %][% L.hidden_tag('creditremaining', LxERP.format_amount(creditremaining, 0)) %]</td>
- </tr>
- </table>
+ <th align="right" valign="top">[% LxERP.t8("Dunning status") %]</th>
+ <td valign="top">
+ [% IF invoice_obj.dunning_config_id %]
+ <span class="dunned_invoice">[% LxERP.t8("This invoice's dunning level: #1", invoice_obj.dunning_config.dunning_description) %]</span>
+ [% IF max_dunning_level %]<br>[% END %]
+ [% END %]
+ [% IF max_dunning_level %]
+ <span class="customer_dunning_level">
+ [% LxERP.t8("Customer's current maximum dunning level: #1", max_dunning_level) %]
+ <br>
+ [% LxERP.t8("Dunned open amount: #1", LxERP.format_amount(dunning_amount, 2)) %]
+ </span>
+ [% END %]
+ </td>
+ </tr>
+[%- END %]
+ <tr>
+ <th align="right" valign="top">[% LxERP.t8("Credit Limit") %]</th>
+ <td>
+ [% LxERP.format_amount(creditlimit, 0) %][% L.hidden_tag('creditlimit', LxERP.format_amount(creditlimit, 0)) %];
+ [% LxERP.t8("Remaining") %]
+ <span class="plus[% creditremaining < 0 ? 0 : 1 %]">[% LxERP.format_amount(creditremaining, 0) %][% L.hidden_tag('creditremaining', LxERP.format_amount(creditremaining, 0)) %]</span>
+ </td>
+ </tr>
+[%- IF invoice_obj.sepa_exports.as_list.size %]
+ <tr>
+ <th align="right">[% LxERP.t8("SEPA exports") %]</th>
+ <td>
+ [% FOREACH export = invoice_obj.sepa_exports.as_list %]
+ <a href="sepa.pl?action=bank_transfer_edit&vc=customer&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
+ [% UNLESS loop.last %], [% END %]
+ [% END %]