Merge branch 'test' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / do / form_header.html
index 06ef6da..bee0ee6 100644 (file)
   <input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]">
   <input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]">
   <input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]">
-[%- FOREACH row = HIDDENS %]
-   [% L.hidden_tag(row.name, row.value) %]
-[%- END %]
+  <input type="hidden" name="tax_point" id="tax_point" value="[% HTML.escape(tax_point) %]">
 
   <p>
    <table width="100%">
           [% P.hidden_tag(vc_id, $vc_id) %]
           [% HTML.escape(VC_OBJ.name) %]
          [% ELSE %]
-          [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %]
+          [% P.customer_vendor.picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %]
          [% END %]
          [% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
          [% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %]
          <th align="right">[% 'Contact Person' | $T8 %]</th>
          <td>
           [%- IF delivered %]
-          <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
-          [%- IF cp_id == row.cp_id %]
-          [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
-          [%- END %]
+            [% L.hidden_tag("cp_id", cp_id) %]
+            [% HTML.escape(CONTACT_OBJ.full_name) %][% IF CONTACT_OBJ.cp_abteilung %] ([% HTML.escape(CONTACT_OBJ.cp_abteilung) %])[% END %]
           [%- ELSE %]
             [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %]
           [%- END %]
          </td>
         </tr>
 
+        [%- IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %]
+        <tr>
+          <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
+          <td>
+            [% L.select_tag('billing_address_id', VC_OBJ.additional_billing_addresses,
+                            with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %]
+          </td>
+        </tr>
+        [%- END %]
+
         [%- IF business %]
         <tr>
          <th align="right">[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th>
         [%- END %]
        </tr>
 
+       [%- IF ALL_LANGUAGES.size %]
+       <tr>
+        <th align="right" nowrap>[% 'Language' | $T8 %]</th>
+        <td colspan="3">
+         [% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width: 250px' )%]
+        </td>
+       </tr>
+       [%- END %]
+
        [%- IF ALL_DEPARTMENTS.size %]
        <tr>
         <th align="right" nowrap>[% 'Department' | $T8 %]</th>
 
        <tr>
         <th align="right">[% 'Transaction description' | $T8 %]</th>
-        <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
+        <td colspan="3">[% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %]</td>
        </tr>
 
       </table>
 
        <tr>
         <th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
-        <td><input name="donumber" id="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
+        <td>
+[%- IF !is_customer || INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
+          [% L.input_tag("donumber", donumber, size="11", readonly=delivered) %]
+[%- ELSIF id %]
+          [% HTML.escape(donumber) %]
+          [% L.hidden_tag("donumber", donumber) %]
+[%- ELSE %]
+          [% LxERP.t8("will be set upon saving") %]
+[%- END %]
+        </td>
        </tr>
 
        <tr>