+[%- USE L %]
+[%- USE HTML %]
+[%- USE T8 %]
+[%- USE LxERP %]
+<body onload=[% onload %]>
+
+<form method=post action=cp.pl>
+
+[% L.hidden_tag('defaultcurrency', defaultcurrency) %]
+[% L.hidden_tag('closedto', closedto) %]
+[% L.hidden_tag('vc', vc) %]
+[% L.hidden_tag('type', type) %]
+[% L.hidden_tag('formname', type) %]
+[% L.hidden_tag('queued', queued) %]
+[% L.hidden_tag('arap', arap) %]
+[% L.hidden_tag('ARAP', ARAP) %]
+[% L.hidden_tag('openinvoices', openinvoices) %]
+
+<h1>[% is_receipt ? LxERP.t8('Receipt') : LxERP.t8('Payment') %]</h1>
+
+<table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right>[% is_customer ? LxERP.t8('Customer') : LxERP.t8('Vendor') %]</th>
+ <td>[% vccontent %]</td>
+ [% IF vc == 'customer' %]
+ [% L.hidden_tag('selectcustomer', selectcustomer) %]
+ [% L.hidden_tag('customer_id', customer_id) %]
+ [% L.hidden_tag('oldcustomer', oldcustomer) %]
+ [% ELSE %]
+ [% L.hidden_tag('selectvendor', selectvendor) %]
+ [% L.hidden_tag('vendor_id', vendor_id) %]
+ [% L.hidden_tag('oldvendor', oldvendor) %]
+ [% END %]
+ </tr>
+ <tr>
+ <th align=right>[% 'Invoice Number' | $T8 %]</th>
+ <td><input name="invnumber" size="35"</td>
+ </tr>
+ <tr valign=top>
+ <th align=right nowrap>[% 'Address' | $T8 %]</th>
+ <td colspan=2>
+ <table>
+ <tr>
+ <td>[% street | html %][% L.hidden_tag('street', street) %]</td>
+ </tr>
+ <tr>
+ <td>[% zipcode | html %][% L.hidden_tag('zipcode', zipcode) %]</td>
+ </tr>
+ <tr>
+ <td>[% city | html %][% L.hidden_tag('city', city) %]</td>
+ </tr>
+ <tr>
+ <td>[% country | html %][% L.hidden_tag('country', country) %]</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th align=right>[% 'Memo' | $T8 %]</th>
+ <td colspan=2><input name="memo" size=30 value="[% memo | html %]"></td>
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right nowrap>[% 'Account' | $T8 %]</th>
+ <td colspan=3><select name=account>[% selectaccount %]</select>
+ <input type=hidden name=selectaccount value="[% selectaccount %]">
+ </td>
+ </tr>
+ <tr>
+ <th align=right nowrap>[% 'Date' | $T8 %]</th>
+ <td>[% L.date_tag('datepaid', datepaid) %]</td>
+ </tr>
+ <tr>
+ <th align=right nowrap>[% 'Currency' | $T8 %]</th>
+ <td><select name=currency>[% selectcurrency %]</select></td>
+ <input type=hidden name=selectcurrency value="[% selectcurrency | html %]">
+ <input type=hidden name=oldcurrency value="[% oldcurrency | html %]">
+ </tr>
+[% IF currency != defaultcurrency %]
+ <tr>
+ <th align=right nowrap>[% 'Exchangerate' | $T8 %]</th>
+[% IF forex %]
+ <td colspan=3>[% LxERP.format_amount(exchangerate) %][% L.hidden_tag('exchangerate', LxERP.format_amount(exchangerate)) %]</td>
+[%- ELSE %]
+ <td colspan=3>[% L.input_tag('exchangerate', LxERP.format_amount(exchangerate), size=10) %]</td>
+[%- END %]
+ </tr>
+[% END %]
+ <tr>
+ <th align=right nowrap>[% 'Source' | $T8 %]</th>
+ <td colspan=3><input name=source value="[% source | html %]" size=10></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap>[% 'Amount' | $T8 %]</th>
+ <td colspan="3">[% LxERP.format_amount(amount, 2) %]</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+[% IF openinvoices_other_currencies %]
+ <input type="hidden" name="openinvoices_other_currencies" value="[% openinvoices_other_currencies | html %]">
+ <b>[% 'Note' | $T8 %]:
+ [%- IF is_customer %]
+ [% LxERP.t8('There are #1 more open invoices for this customer with other currencies.', openinvoices_other_currencies) %]
+ [%- ELSE %]
+ [% LxERP.t8('There are #1 more open invoices from this vendor with other currencies.', openinvoices_other_currencies) %]
+ [%- END %]</b>
+[% END %]