style='width: 300px') %]</td>
</tr>
- <tr id='shipto_row' [%- IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[%- END %]>
+ <tr>
<th align="right">[% 'Shipping Address' | $T8 %]</th>
- <td>[% L.select_tag('order.shipto_id',
- SELF.order.${SELF.cv}.shipto,
- default=SELF.order.shipto_id,
- title_key='displayable_id',
- value_key='shipto_id',
- with_empty=1,
- style='width: 300px') %]</td>
+ <td>
+ <span id='shipto_selection' [%- IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[%- END %]>
+ [% shiptos = [ { shipto_id => "", displayable_id => LxERP.t8("No/individual shipping address") } ] ;
+ FOREACH s = SELF.order.${SELF.cv}.shipto ;
+ shiptos.push(s) ;
+ END ;
+ L.select_tag('order.shipto_id',
+ shiptos,
+ default=SELF.order.shipto_id,
+ title_key='displayable_id',
+ value_key='shipto_id',
+ with_empty=0,
+ style='width: 300px') %]
+ </span>
+ [% L.button_tag("kivi.Order.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
+ </td>
</tr>
[%- PROCESS order/tabs/_business_info_row.html SELF=SELF %]
</td>
</tr>
+[%- IF SELF.all_languages.size %]
+ <tr>
+ <th align="right">[% 'Language' | $T8 %]</th>
+ <td>
+ [% L.select_tag('order.language_id', SELF.all_languages, default=SELF.order.language_id, title_key='description', with_empty=1, style='width:300px') %]
+ </td>
+ </tr>
+[%- END %]
+
[%- IF SELF.all_departments.size %]
<tr>
<th align="right">[% 'Department' | $T8 %]</th>
<tr>
<th align="right">[% 'Transaction description' | $T8 %]</th>
- <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, style='width: 300px') %]</td>
+ <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', style='width: 300px') %]</td>
</tr>
<tr>
<td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
</tr>
+ <tr>
+ <th width="70%" align="right" nowrap>[% 'Tax point' | $T8 %]</th>
+ <td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %]</td>
+ </tr>
+
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
- [%- SET reqdate_txt = 'Reqdate' -%]
+ [%- SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' -%]
[%- ELSIF SELF.type == "sales_quotation" -%]
- [%- SET reqdate_txt = 'Valid until' -%]
+ [%- SET reqdate_txt = 'Valid until'; SET reqdate_class = '' -%]
[%- ELSE -%]
- [%- SET reqdate_txt = 'Required by' -%]
+ [%- SET reqdate_txt = 'Required by'; SET reqdate_class = 'recalc' -%]
[%- END -%]
<tr>
<th width="70%" align="right" nowrap>[% reqdate_txt | $T8 %]</th>
- <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date) %]</td>
+ <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class=reqdate_class) %]</td>
</tr>
[%- IF SELF.type == "sales_quotation" -%]
</tr>
<tr>
<th width="70%" align="right" nowrap>[% 'Expected billing date' | $T8 %]</th>
- <td>[%- L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_sa_date) %]</td>
+ <td>[%- L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date) %]</td>
</tr>
[%- END %]
[%- PROCESS order/tabs/_item_input.html SELF=SELF %]
- [% L.button_tag('kivi.Order.show_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
+ [% L.button_tag('kivi.Order.open_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
<table width="100%">
<tr>