S:C:CustomerVendorTurnover: Sortierung der Belege absteigend nach Datum
[kivitendo-erp.git] / templates / webpages / gl / form_header.html
index 2a34a69..644ff96 100644 (file)
@@ -4,6 +4,8 @@
 [%- USE L %]
 <h1>[% title | html %]</h1>
 
+[%- INCLUDE 'common/flash.html' %]
+
 <script type="text/javascript">
   <!--
   function copy_debit_to_credit() {
@@ -16,7 +18,7 @@
 <script type="text/javascript" src="js/follow_up.js"></script>
 <script type="text/javascript" src="js/kivi.Draft.js"></script>
 
-<form method=post name="gl" action=gl.pl>
+<form method="post" name="gl" action="gl.pl" id="form">
 
 [% FOREACH name IN [ 'id', 'closedto', 'locked', 'storno', 'storno_id', 'previous_id', 'previous_gldate' ] %]
 [% L.hidden_tag(name, $name) %]
   <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 INSTANCE_CONF.get_doc_storage %]
+  <li><a href="controller.pl?action=File/list&file_type=document&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+  <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
+[%- END %]
 [%- END %]
  </ul>
  <div id="ui-tabs-basic-data">
           <td align=left>
             <table>
               <tr>
-                <th align=right width=50% nowrap>[% 'Date' | $T8 %]</th>
-                <td>[% L.date_tag('transdate', transdate, readonly=readonly) %]</td>
+                <th align=right width=50% nowrap>[% 'Transdate' | $T8 %]</th>
+                <td align=left>[% L.date_tag('transdate', transdate, readonly=readonly) %]</td>
               </tr>
             </table>
           </td>
         </tr>
 [%- IF id %]
         <tr>
-          <th align=right>[% 'Belegnummer' | $T8 %]</th>
+          <th align=right>[% 'ID' | $T8 %]</th>
           <td>[% L.input_tag('id', id,  size=20, readonly=readonly) %]</td>
           <td align=left>
           <table>
               <tr>
-                <th align=right width=50%>[% 'Buchungsdatum' | $T8 %]</th>
-                <td align=left>[% L.date_tag('gldate', gldate, readonly=1) %]</td>
+                <th align=right width=50%>[% 'Gldate' | $T8 %]</th>
+                [%-# hidden img to keep alignment -%]
+                <td align=left>[% L.date_tag('gldate', gldate, readonly=1) %]<img class="ui-datepicker-trigger" src="image/calendar.png" alt="..." title="..." style='visibility:hidden'></td>
               </tr>
             </table>
           </td>
         </tr>
 [%- END %]
 
-[%- IF ALL_DEPARTMENTS %]
+        [% SET departments_style = "";
+           SET departments_style = "style='visibility:hidden'" IF ALL_DEPARTMENTS.size == 0 %]
         <tr>
-          <th align=right nowrap>[% 'Department' | $T8 %]</th>
-          <td>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
+          <th [%- departments_style -%]align=right nowrap>[% 'Department' | $T8 %]</th>
+          <td [%- departments_style -%]>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
+          <td align=left>
+            <table>
+              <tr>
+                <th align=right width=50% nowrap>[% 'Delivery Date' | $T8 %]</th>
+                <td align=left>[% L.date_tag('deliverydate', deliverydate) %]</td>
+              </tr>
+            </table>
         </tr>
-[%- END %]
 
         <tr>
           <th align=right width=1%>[% 'Description' | $T8 %]</th>