[%- USE HTML %]
[%- USE L %]
[%- USE T8 %]
-[%- USE LxERP %]
+[%- USE LxERP %][%- USE P -%]
<form method=post name="arledger" action="[% script %]">
[% L.hidden_tag('follow_up_trans_type_1', 'ar_transaction') %]
[% L.hidden_tag('follow_up_trans_info_1', follow_up_trans_info) %]
[% L.hidden_tag('follow_up_rowcount', 1) %]
+<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
<h1>[% title | html %]</h1>
<ul>
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
[%- IF id %]
+ [% IF AUTH.assert('record_links', 1) %]
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
+ [%- END %]
<li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
[%- END %]
</ul>
<th align="right" nowrap>[% 'Customer' | $T8 %]</th>
<td colspan=3>
[%- IF selectcustomer %]
- <select id='customer' name="customer" onchange="document.getElementById('update_button').click();" class="initial_focus">[% selectcustomer %]</select>
+ <select id='customer' name="customer" onchange="document.getElementById('update_button').click();"[% IF initial_focus == 'customer'%] class="initial_focus"[% END %]>[% selectcustomer %]</select>
[%- ELSE %]
- <input id='customer' name=customer value="[% customer | html %]" size=35 class="initial_focus">
+ <input id='customer' name=customer value="[% customer | html %]" size=35[% IF initial_focus == 'customer'%] class="initial_focus"[% END %]>
[%- END %]
<input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')"></td>
[% L.hidden_tag('selectcustomer', selectcustomer) %]
</tr>
[%- END %]
<tr>
- <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("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 %]
</td>
</tr>
+[%- END %]
<tr>
<th align=right>[% 'Currency' | $T8 %]</th>
<td><select name=currency>[% selectcurrency %]</select></td>
[% L.hidden_tag('forex', forex) %]
[% IF show_exch %]
<th align=right>[% 'Exchangerate' | $T8 %]</th>
- <td>[%- IF forex %][% L.hidden_tag('exchangerate', LxERP.format_amount(exchangerate, 2)) %][% LxERP.format_amount(exchangerate, 2) %][%- ELSE %][% L.input_tag('exchangerate', LxERP.format_amount(exchangerate, 2), size=10) %][%- END %]</td>
+ <td>[%- IF forex %][% L.hidden_tag('exchangerate', LxERP.format_amount(exchangerate, 5)) %][% LxERP.format_amount(exchangerate, 5) %][%- ELSE %][% L.input_tag('exchangerate', LxERP.format_amount(exchangerate, 5), size=10) %][%- END %]</td>
[% END %]
</tr>
- [% department_html %]
- [%- IF selectdepartment %]
- <tr>
- <th align="right" nowrap>[% 'Department' | $T8 %]</th>
- <td colspan=3><select name=department>[% selectdepartment %]</select>
- <input type=hidden name=selectdepartment value="[% selectdepartment | html %]">
- </td>
- </tr>
- [%- END %]
+ [% IF ALL_DEPARTMENTS %]
+ <tr>
+ <th align="right" nowrap>[% 'Department' | $T8 %]</th>
+ <td colspan=3>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
+ </tr>
+ [% END %]
<tr>
<td align=right>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
<th align="left" nowrap><label for="taxincluded">[% 'Tax Included' | $T8 %]</label></th>
</tr>
<tr>
<th align=right nowrap>[% 'Project Number' | $T8 %]</th>
- <td>[% L.select_tag('globalproject_id', ALL_PROJECTS, title_key = 'projectnumber', default = globalproject_id, with_empty = 1) %]</td>
+ <td>[% L.select_tag('globalproject_id', ALL_PROJECTS, title_key = 'projectnumber', default = globalproject_id, with_empty = 1, onChange = "document.getElementById('update_button').click();") %]</td>
</tr>
</table>
</td>
</td>
</tr>
<tr>
- <td>[% ARselected %]</td>
+ <td>[% P.chart_picker("AR_chart_id", AR_chart_id, style="width: 400px", type="AR") %]</td>
<th align=left>[% LxERP.format_amount(invtotal, 2) | html %]</th>
<input type=hidden name=oldinvtotal value='[% oldinvtotal %]'>