@@ -103,12 +105,9 @@
[% 'Vendor' | $T8 %]
- [% IF ( selectvendor ) %]
- [% selectvendor %]
- [% ELSE %]
-
- [% END %]
-
+ [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", show_details="1",
+ style="width: 330px", class=(initial_focus == 'vendor_id' ? "initial_focus" : "")) %]
+ [% L.hidden_tag("previous_vendor_id", vendor_id) %]
@@ -120,7 +119,6 @@
[% creditremaining | html %]
-
[%- IF invoice_obj.sepa_exports.as_list.size %]
[% LxERP.t8("SEPA exports") %]
@@ -132,29 +130,41 @@
[%- END %]
-
[% 'Currency' | $T8 %]
- [% selectcurrency %]
-
+
+ [%- IF readonly %]
+ [% HTML.escape(currency) %]
+ [% L.hidden_tag("currency", currency) %]
+ [%- ELSE %]
+ [% L.select_tag("currency", currencies, default=currency, value_key="name", title_key="name") %]
+ [%- END %]
+
[% IF ( defaultcurrency && (currency != defaultcurrency) ) %]
[% 'Exchangerate' | $T8 %]
- [% IF ( forex ) %]
- [% exchangerate | html %]
- [% ELSE %]
-
- [% END %]
+
+ [%- IF readonly %]
+ [% LxERP.format_amount(exchangerate, 5) %]
+ [% L.hidden_tag("exchangerate", LxERP.format_amount(exchangerate, 5)) %]
+ [%- ELSE %]
+
+ [%- END %]
+ [% IF record_forex %][% 'record exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
+ [% L.hidden_tag("record_forex", record_forex) %]
[% END %]
-
[% IF ALL_DEPARTMENTS %]
[% 'Department' | $T8 %]
- [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]
+ [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = "width:334px") %]
[% END %]
+
+ [% 'Transaction description' | $T8 %]
+ [% L.input_tag("transaction_description", transaction_description, style="width:330px", "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]
+
[% 'Tax Included' | $T8 %]
@@ -170,24 +180,32 @@
[% 'Invoice Number' | $T8 %]
-
+ [% L.input_tag("invnumber", invnumber, size="11", readonly=readonly) %]
[% 'Order Number' | $T8 %]
-
+ [% L.input_tag("ordnumber", ordnumber, size="11", readonly=readonly) %]
[% 'Invoice Date' | $T8 %]
- [% L.date_tag('transdate', transdate) %]
+ [% L.date_tag('transdate', transdate, onchange='kivi.SalesPurchase.set_duedate_on_reference_date_change("transdate")') %]
[% 'Due Date' | $T8 %]
[% L.date_tag('duedate', duedate) %]
+
+ [% LxERP.t8('Tax point') %]
+ [% L.date_tag('tax_point', tax_point, id='tax_point') %]
+
+
+ [% 'Delivery Date' | $T8 %]
+ [% L.date_tag('deliverydate', deliverydate) %]
+
[% 'Project Number' | $T8 %]
- [% L.select_tag('globalproject_id', ALL_PROJECTS, with_empty = 1, default = globalproject_id, value_key = 'id', title_key = 'projectnumber', onChange = "document.getElementById('update_button').click();") %]
+ [% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();") %]
@@ -211,25 +229,32 @@
[% FOREACH i IN [1..rowcount] %]
- [% selected_accno_full = "selected_accno_full_"_ i %]
- [% L.select_tag('AP_amount_'_ i, ALL_CHARTS_AP_amount, value_title_sub = \AP_amount_value_title_sub, onchange = 'setTaxkey(this, '_ i _')', default = $selected_accno_full) %]
-
-
+ [% SET selected_chart_id = "AP_amount_chart_id_"_ i %]
+ [% P.chart.picker("AP_amount_chart_id_" _ i, $selected_chart_id, style="width: 400px", type="AP_amount", invalid=0, disabled=readonly, class=(initial_focus == 'row_' _ i ? "initial_focus" : "")) %]
+ [% L.hidden_tag("previous_AP_amount_chart_id_" _ i, $selected_chart_id) %]
-
+
- [% temp = "tax_"_ i %][% $temp | html %]
+ [% temp_r = "tax_reverse_"_ i %]
+ [% IF ($temp_r) %]
+ [% $temp_r | html %]
+
+ [% temp_c = "tax_charge_"_ i %][% $temp_c | html %]
+ [% ELSE %]
+ [% temp = "tax_"_ i %][% $temp | html %]
+ [% END %]
[% temp = 'selected_taxchart_'_ i %]
- [% L.select_tag('taxchart_'_ i, ALL_TAXCHARTS, value_title_sub = \taxchart_value_title_sub, default = $temp) %]
+ [% taxcharts = 'taxcharts_' _ i %]
+ [% L.select_tag('taxchart_'_ i, $taxcharts, value_title_sub = \taxchart_value_title_sub, default = $temp, style="width: 250px") %]
[% temp = "project_id_"_ i %]
- [% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = loop.last ? globalproject_id : $temp, value_key = 'id', title_key = 'projectnumber') %]
+ [% P.project.picker(temp, loop.last ? globalproject_id : $temp) %]
[% END %]
@@ -241,7 +266,7 @@
- [% L.select_tag('APselected', ALL_CHARTS_AP, value_title_sub = \APselected_value_title_sub, default = APselected) %]
+ [% P.chart.picker('AP_chart_id', AP_chart_id, style="width: 400px", type="AP") %]
[% invtotal | html %]
@@ -251,23 +276,29 @@
-
-
- [% 'Notes' | $T8 %]
-
-
-
-
- [% 'Notes for vendor' | $T8 %]
-
-
-
-
-
+
+
+ [% 'Notes' | $T8 %]
+ [% 'Internal Notes' | $T8 %]
+ [% 'Payment Terms' | $T8 %]
+
+
+
+ [% L.textarea_tag("notes", notes, wrap="soft", rows=textarea_rows, cols=50, readonly=readonly) %]
+
+
+ [% L.textarea_tag("intnotes", intnotes, wrap="soft", rows=textarea_rows, cols=50, readonly=readonly) %]
+
+
+ [% L.select_tag('payment_id', payment_terms, default=payment_id, title_key='description', with_empty=1, style="width: 250px", onchange="kivi.SalesPurchase.set_duedate_on_reference_date_change('transdate')") %]
+
+
+
+ [% UNLESS no_payment_bookings %]
[% 'Payments' | $T8 %]
@@ -322,12 +353,12 @@
[% temp = "paid_"_ i %]
-
+
[% IF( changeable ) %]
-
+
[% ELSE %]
[% $temp | html %]
-
+ [% defaultcurrency %]
[% END %]
@@ -341,24 +372,30 @@
[% temp = "exchangerate_"_ i %]
[% temp_forex = "forex_"_ i %]
+ [% SET defaultcurrency_paid = 'defaultcurrency_paid_' _ i %]
+ [% SET record_forex = 'record_forex_' _ i %]
+ [% SET fx_transaction = 'fx_transaction_' _ i %]
[% IF( $temp_forex || !changeable ) %]
- [% $temp | html %]
+ [% $temp | html %] = [% LxERP.format_amount($defaultcurrency_paid,2) %] [% defaultcurrency %]
+ [% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
+
[% ELSE %]
[% END %]
-
+
[% END %]
- [% temp = "AP_paid_"_ i %]
+ [% temp = "AP_paid_"_ i %]
+ [% readonly = "AP_paid_readonly_desc_"_ i %]
[% IF( changeable ) %]
[% L.select_tag(temp, ALL_CHARTS_AP_paid, value_title_sub = \AP_paid_value_title_sub, default = ($temp || accno_arap)) %]
[% ELSE %]
- [% $temp | html %]
+ [% $readonly | html %]
[% END %]
@@ -366,7 +403,7 @@
[% temp = "paid_project_id_"_ i %]
[% IF( changeable ) %]
- [% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = $temp, value_key = 'id', title_key = 'projectnumber') %]
+ [% P.project.picker(temp, $temp) %]
[% ELSE %]
[% temp = "label"_ temp %]
@@ -380,15 +417,23 @@
[% 'Total' | $T8 %]
- [% LxERP.format_amount(totalpaid, 2) | html %]
+ [% LxERP.format_amount(totalpaid, 2) | html %] [% currency %]
+ [% IF ( !defaultcurrency || (currency != defaultcurrency) ) %]
+
+ [% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]
+
+
+ [% END %]
+
[% 'Missing amount' | $T8 %]
- [% LxERP.format_amount(paid_missing, 2) | html %]
+ [% LxERP.format_amount(paid_missing, 2) | html %] [% currency %]
+ [% END %]