]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/part/_assembly.html
date error in mapping
[mfinanz.git] / templates / webpages / part / _assembly.html
index e4d15c7fd408acb0db6e3c805c437ded97de57ac..e10ec738b2032d216de00f19a6a7eb3f3fad55b7 100644 (file)
@@ -10,6 +10,7 @@
 
 [% L.hidden_tag('assembly_id', SELF.part.id) %]
 
+<div style="overflow-y: auto; height:65vh;">
 <table id="assembly_items">
  <thead>
    <tr class="listheading">
@@ -28,6 +29,7 @@
      <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
      <th class="listheading" nowrap width="5" >[%- 'BOM'          | $T8 %] </th>
      <th class="listheading" nowrap width="5" >[%- 'Line Total'   | $T8 %] </th>
+     <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>
      <th id="sellprice_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("sellprice")' >[%- 'Sellprice'       | $T8 %]</a></th>
      <th id="lastcost_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("lastcost")'   >[%- 'Lastcost'       | $T8 %]</a></th>
      <th id="_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Part.reorder_items("partsgroup")'         >[%- 'Partsgroup'       | $T8 %]</a></th>
  <td></td>
  [% END %]
  <td></td>
+ <td></td>
  <td align="right">[% 'Totals' | $T8 %]:</td>
  <td></td>
  <td id="items_sellprice_sum" class="numeric">[%- LxERP.format_amount(items_sellprice_sum, 2, 0) %]</td>
  <td id="items_lastcost_sum"  class="numeric">[%- LxERP.format_amount(items_lastcost_sum,  2, 0) %]</td>
+ <td></td>
+</tr>
+<tr>
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
+ <td></td>
+ <td></td>
+ [% END %]
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td align="right">[% 'Margepercent' | $T8 %]:</td>
+ <td></td>
+ <td class="numeric">
+ [% IF items_sellprice_sum > 0 %]
+   [%- LxERP.format_amount(100 - (items_lastcost_sum / items_sellprice_sum * 100), 2, 0) %]
+ [% END %]
+ </td>
+</tr>
+<tr>
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
+ <td></td>
+ <td></td>
+ [% END %]
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td align="right">[% 'Margetotal' | $T8 %]:</td>
+ <td></td>
  <td id="items_sum_diff"      class="numeric">[%- LxERP.format_amount(items_sum_diff,      2, 0) %]</td>
 </tr>
 <tr>
  <td></td>
  <td></td>
  <td></td>
+ <td></td>
  <td align="right">[% L.button_tag("kivi.Part.set_assembly_sellprice()", LxERP.t8("Set sellprice")) %]</td>
  <td></td>
 </tr>
 </tbody>
 </table>
-
+</div>
 [% L.sortable_element('#assembly_rows') %]
 
 <div>