@@ -47,24 +70,10 @@
[% 'Vendor' | $T8 %]
- [%- INCLUDE 'generic/multibox.html'
- id = 'vendor',
- name = 'vendor',
- style = 'width: 250px',
- class = 'initial_focus',
- DATA = ALL_VENDORS,
- id_sub = 'vc_keys',
- label_key = 'name',
- select = vc_select,
- limit = vclimit,
- allow_textbox = 1,
- onChange = "document.getElementById('update_button').click();" -%]
-
+ [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus",
+ show_details="1") %]
+ [% P.hidden_tag("previous_vendor_id", vendor_id) %]
-
-
-
-
[%- IF ALL_CONTACTS.size %]
@@ -100,42 +109,37 @@
[%- END %]
[% 'Record in' | $T8 %]
- [% selectAP %]
-
+ [% P.chart.picker("AP_chart_id", AP_chart_id, style="width:250px;", type="AP", "data-validate"="required") %]
[% 'Steuersatz' | $T8 %]
- [%- INCLUDE 'generic/multibox.html'
- name = 'taxzone_id'
- style = 'width: 250px'
- DATA = ALL_TAXZONES
- id_key = 'id'
- readonly = (id ? 1 : 0)
- label_key = 'description' -%]
+ [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) , default = taxzone_id, title_key = 'description', disabled = (id ? 1 : 0), style='width: 250px', onchange = "kivi.io.update_taxzone()") %]
+ [%- IF id %]
+
+ [%- END %]
[%- IF id %]
[%- END %]
-[%- IF all_departments %]
+[%- IF ALL_DEPARTMENTS.as_list.size %]
[% 'Department' | $T8 %]
-
- [%- INCLUDE 'generic/multibox.html'
- name = 'department_id',
- style = 'width: 250px',
- DATA = all_departments,
- id_key = 'id',
- label_sub = 'department_labels',
- show_empty = 1 -%]
-
+ [% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", style="width: 250px") %]
[%- END %]
[%- IF currencies %]
[% 'Currency' | $T8 %]
- [% currencies %]
+
+ [%- IF readonly %]
+ [% HTML.escape(currency) %]
+ [% L.hidden_tag("currency", currency) %]
+ [%- ELSE %]
+ [% currencies %]
+ [%- END %]
+
[%- END %]
@@ -144,14 +148,20 @@
[% 'Exchangerate' | $T8 %]
- [%- IF forex %]
- [% LxERP.format_amount(exchangerate, 2) %]
+ [%- 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 %]
[%- END %]
+
+ [% 'Transaction description' | $T8 %]
+ [% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]
+
[% 'Project Number' | $T8 %]
-
- [%- INCLUDE 'generic/multibox.html'
- name = 'globalproject_id',
- DATA = ALL_PROJECTS,
- id_key = 'id',
- label_key = 'projectnumber',
- show_empty = 1,
- onChange = "document.getElementById('update_button').click();" -%]
-
+ [% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();") %]