Lieferdatum in Einkaufsrechnung erfassen können
[kivitendo-erp.git] / templates / webpages / ir / form_header.html
index f81b2cc..5b983c9 100644 (file)
@@ -9,7 +9,7 @@
 <script type="text/javascript" src="js/calculate_qty.js"></script>
 <script type="text/javascript" src="js/follow_up.js"></script>
 
-<form method="post" name="invoice" action="[% script %]">
+<form id='form' method="post" name="invoice" action="[% script %]">
 
 <p>[% saved_message %]</p>
 
@@ -17,7 +17,7 @@
 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
-<input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
+<input type="hidden" name="follow_up_trans_type_1" value="purchase_invoice">
 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
 <input type="hidden" name="follow_up_rowcount" value="1">
 <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 [%- END %]
 [%- IF id %]
+  [%- IF INSTANCE_CONF.get_doc_storage %]
+  <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+  <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&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=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
   [%- END %]
@@ -47,7 +51,7 @@
         <tr>
           <th align="right">[% 'Vendor' | $T8 %]</th>
           <td>
-           [% P.customer_vendor_picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus") %]
+           [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
            [% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
            [% P.hidden_tag("previous_vendor_id", vendor_id) %]
           </td>
           <th align="right">[% 'Employee' | $T8 %]</th>
           <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
         </tr>
-
-[%- IF is_type_credit_note %]
-        <tr>
-          <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
-        </tr>
-        <tr>
-          <th align="right">[% 'Credit Note Date' | $T8 %]</th>
-          <td>[% L.date_tag('invdate', invdate) %]</td>
-        </tr>
-[%- ELSE %]
         <tr>
           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
+          <td colspan="3">[% L.input_tag("invnumber", invnumber, size="11") %]</td>
         </tr>
         <tr>
           <th align="right">[% 'Invoice Date' | $T8 %]</th>
            <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
           </td>
         </tr>
-[%- END %]
-
+          <th align="right">[% 'Delivery Date' | $T8 %]</th>
+          <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
+        </tr>
         <tr>
           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
           <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
-          <td>[% P.project_picker('globalproject_id', globalproject_id) %]</td>
+          <td>[%- L.select_tag('globalproject_id', ALL_PROJECTS, title_key = 'projectnumber', default = globalproject_id, with_empty = '1', onChange = "document.getElementById('update_button').click();") %]</td>
         </tr>
       </table>
     </td>