]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/part/_customerprices.html
date error in mapping
[mfinanz.git] / templates / webpages / part / _customerprices.html
index d7c74bceac5c3e02434ec0fe277d8989c899fc11..2f7b54de903928d5afc1816dac353a8bc9831d0c 100644 (file)
@@ -1,6 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[%- USE HTML %]
+[%- USE P %]
 [%- USE LxERP %]
   <tr>
   </tr>
@@ -8,18 +8,22 @@
     <td>
       <table id="customerprice_table">
         <thead>
+         <tr>
           <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
           <th class="listheading">[% 'position'     | $T8 %]</th>
           <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
           <th class="listheading" style='width:12em'>[% 'Customer Number'      | $T8 %]</th>
           <th class="listheading">[% 'Customer'             | $T8 %]</th>
           <th class="listheading">[% 'Customer Part Number' | $T8 %]</th>
+          <th class="listheading">[% 'Part Description'     | $T8 %]</th>
+          <th class="listheading">[% 'Long Description'     | $T8 %]</th>
           <th class="listheading">[% 'Customer Price'       | $T8 %]</th>
           <th class="listheading">[% 'Updated'              | $T8 %]</th>
+         </tr>
         </thead>
         <tbody id="customerprice_rows">
         [% SET listrow = 0 %]
-        [%- FOREACH customerprice = SELF.part.customerprices %]
+        [%- FOREACH customerprice = SELF.part.customerprices_sorted %]
         [% listrow = listrow + 1 %]
         [% PROCESS 'part/_customerprice_row.html' customerprice=customerprice listrow=listrow %]
         [%- END %]
@@ -30,7 +34,7 @@
          <td></td>
          <td></td>
          <td align="right">[% 'Customer' | $T8 %]</td>
-         <td rowspan="2">[% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input") %]</td>
+         <td rowspan="2">[% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input", action={commit_one='kivi.Part.add_customerprice_row'}) %]</td>
          <td rowspan="2" align="right">[% L.button_tag('kivi.Part.add_customerprice_row()', LxERP.t8('Add')) %]</td>
         </tr>
        </tbody>
     </td>
   </tr>
   [% L.sortable_element('#customerprice_rows') %]
-
-  <script type="text/javascript">
-  $(function() {
-
-    $('#customerprice_rows').on('sortstop', function(event, ui) {
-      kivi.Part.customerprice_renumber_positions();
-    });
-
-  })
-  </script>