[%- END %]
[%- IF id %]
[%- IF INSTANCE_CONF.get_doc_storage %]
- <li><a href="controller.pl?action=File/list&file_type=document&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
- <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
+ <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% type %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+ <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% type %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
[%- END %]
[%- IF AUTH.assert('record_links', 1) %]
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
<td>
[% P.customer_vendor.picker("customer_id", customer_id, type="customer", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
[% L.button_tag("show_vc_details('customer')", LxERP.t8('Details (one letter abbreviation)')) %]
+ [% P.link_tag('controller.pl?action=CustomerVendor/edit&db=customer&id=' _ customer_id, LxERP.t8('Edit'), target="_blank", title=LxERP.t8('Open in new window')) %]
[% L.hidden_tag("previous_customer_id", customer_id) %]
[% L.hidden_tag("customer_pricegroup_id", customer_pricegroup_id) %]
</td>
[% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
</td>
</tr>
+
+[%- IF customer_obj.additional_billing_addresses.as_list.size %]
+ <tr>
+ <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
+ <td>
+ [% L.select_tag('billing_address_id', customer_obj.additional_billing_addresses,
+ with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %]
+ </td>
+ </tr>
+[%- END %]
+
<tr>
<td align="right">[% 'Credit Limit' | $T8 %]</td>
<td>
[%- IF is_type_credit_note %]
<tr>
<th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
- <td colspan="3"><input size='11' name="invnumber" id="invnumber" value="[% HTML.escape(invnumber) %]"></td>
+ <td colspan="3">
+[%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
+ [% L.input_tag("invnumber", invnumber, size="11") %]
+[%- ELSIF id %]
+ [% L.hidden_tag("invnumber", invnumber) %]
+ [% HTML.escape(invnumber) %]
+[%- ELSE %]
+ [% LxERP.t8("will be set upon posting") %]
+[%- END %]
+ </td>
</tr>
<tr>
<th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
[%- ELSE %]
<tr>
<th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
- <td colspan="3"><input size='11' name="invnumber" id="invnumber" value="[% HTML.escape(invnumber) %]"></td>
+ <td colspan="3">
+[%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
+ [% L.input_tag("invnumber", invnumber, size="11") %]
+[%- ELSIF id %]
+ [% L.hidden_tag("invnumber", invnumber) %]
+ [% HTML.escape(invnumber) %]
+[%- ELSE %]
+ [% LxERP.t8("will be set upon posting") %]
+[%- END %]
+ </td>
</tr>
<tr>
<th align="right">[% 'Invoice Date' | $T8 %]</th>