</td>
</tr>
+ [%- IF SELF.cv == "customer" %]
+ <tr id="billing_address_row"[% IF !SELF.order.customer.additional_billing_addresses.as_list.size %] style="display:none"[% END %]>
+ <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
+ <td>
+ [% L.select_tag('order.billing_address_id',
+ SELF.order.customer.additional_billing_addresses,
+ default=SELF.order.billing_address_id,
+ title_key='displayable_id',
+ value_key='id',
+ with_empty=1,
+ style='width: 300px') %]
+ </td>
+ </tr>
+ [%- END %]
+
[%- PROCESS order/tabs/_business_info_row.html SELF=SELF %]
<tr>
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<tr>
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
- <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
+ <td>
+ [%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
+ [% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]
+ [%- ELSIF SELF.order.id %]
+ [% HTML.escape(SELF.order.ordnumber) %]
+ [% L.hidden_tag("order.ordnumber", SELF.order.ordnumber) %]
+ [% ELSE %]
+ [% LxERP.t8("will be set upon saving") %]
+ [%- END %]
+ </td>
</tr>
[%- END -%]
[%- END -%]
<tr>
<th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
- [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
- <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
- [%- ELSE -%]
- <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
- [%- END -%]
+ <td>
+ [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
+ [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]
+ [%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
+ [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]
+ [%- ELSIF SELF.order.id %]
+ [% HTML.escape(SELF.order.quonumber) %]
+ [% L.hidden_tag("order.quonumber", SELF.order.quonumber) %]
+ [% ELSE %]
+ [% LxERP.t8("will be set upon saving") %]
+ [%- END %]
+ </td>
</tr>
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<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) %]</td>
+ <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>