Verkaufsrechnung bearbeiten - ALL_DEPARTMENTS wie andere Belegemasken
[kivitendo-erp.git] / templates / webpages / ap / form_header.html
index f65b301..169a5e0 100644 (file)
@@ -28,7 +28,6 @@
 <form method="post" action="[% script | html %]">
 
 <input type="hidden" name="selectvendor" value="[% selectvendor | html %]">
-<input type="hidden" name="selectdepartment" value="[% selectdepartment | html %]">
 <input type="hidden" name="selectcurrency" value="[% selectcurrency | html %]">
 
 <input type="hidden" name="oldvendor" value="[% oldvendor | html %]">
@@ -39,6 +38,7 @@
 <input type="hidden" name="creditremaining" value="[% creditremaining | html %]">
 
 <input type="hidden" name="forex" value="[% forex | html %]">
+<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
 
 <input type="hidden" name="id" value="[% id | html %]">
 <input type="hidden" name="sort" value="[% sort | html %]">
   <p>[% saved_message | html %]</p>
 [% END %]
 
-<div class="tabwidget">
+<div id="ap_tabs" class="tabwidget">
  <ul>
   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
+[%- IF INSTANCE_CONF.get_webdav %]
+  <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
+[%- END %]
 [%- IF id %]
+  [%- 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 %]
   <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
 [%- END %]
  </ul>
                 </td>
               </tr>
 
+[%- IF invoice_obj.sepa_exports.as_list.size %]
+              <tr>
+                <th align="right">[% LxERP.t8("SEPA exports") %]</th>
+                <td>
+                 [% FOREACH export = invoice_obj.sepa_exports.as_list %]
+                  <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
+                  [% UNLESS loop.last %], [% END %]
+                 [% END %]
+                </td>
+              </tr>
+[%- END %]
+
               <tr>
                 <th align="right" nowrap>[% 'Currency' | $T8 %]</th>
                 <td><select name="currency">[% selectcurrency %]</select></td>
 
               </tr>
 
-              [% IF ( selectdepartment ) %]
+              [% IF ALL_DEPARTMENTS %]
                 <tr>
                   <th align="right" nowrap>[% 'Department' | $T8 %]</th>
-                  <td colspan="3">
-                    <select name="department">[% selectdepartment %]</select>
-                  </td>
+                  <td colspan=3>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
                 </tr>
               [% END %]
 
               <tr>
                 <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
                 <td>
-                  [% L.select_tag('globalproject_id', ALL_PROJECTS, with_empty = 1, default = globalproject_id, value_key = 'id', title_key = 'projectnumber') %]
+                  [% L.select_tag('globalproject_id', ALL_PROJECTS, with_empty = 1, default = globalproject_id, value_key = 'id', title_key = 'projectnumber', onChange = "document.getElementById('update_button').click();") %]
                 </td>
               </tr>
             </table>
   </tr>
 </table>
 </div>
+[% PROCESS 'webdav/_list.html' %]
+<div id="ui-tabs-1">
+ [% LxERP.t8('Loading...') %]
 </div>
+</div>
+
+<hr size="3" noshade>
 
 <script type='text/javascript'>
  $('#ap_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });