Revision 4648393b
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
| templates/design40_webpages/part/_parent_variant_inventory.html | ||
|---|---|---|
| [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%][%- USE T8 -%]
 | ||
|  | ||
| <div id="parent_vairant_inventory_data">
 | ||
| </div>
 | ||
|  | ||
| <script type='text/javascript'>
 | ||
| $(function() {
 | ||
|   $('.tabwidget').on('tabsbeforeactivate', function(event, ui){
 | ||
|     if (ui.newPanel.attr('id') == 'partent_variant_inventory') {
 | ||
|       $.ajax({
 | ||
|         url: 'controller.pl?action=Part/parent_variant_inventory&id=[% SELF.part.id %]',
 | ||
|         success: function (html) {
 | ||
|           $("#parent_vairant_inventory_data").html(html);
 | ||
|         },
 | ||
|       });
 | ||
|     }
 | ||
|     return 1;
 | ||
|    });
 | ||
| });
 | ||
| </script>
 | ||
| templates/design40_webpages/part/_parent_variant_inventory_data.html | ||
|---|---|---|
| [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%][%- USE T8 -%]
 | ||
|  | ||
| [%- SET dec = 2 %]
 | ||
| [%- SET show_warehouse_subtotals = 1 %]
 | ||
|  | ||
| [%- SET variant_partnumber_to_stock_info = SELF.part.get_simple_stock_parent_variant_sql %]
 | ||
| <div id="stock_levels" class="wrapper">
 | ||
|   <h3>[% 'Stock levels' | $T8 %]</h3>
 | ||
|   [%- IF variant_partnumber_to_stock_info.size %]
 | ||
|   <a href="wh.pl?action=report&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'Stock levels' | $T8 %]</a>:
 | ||
|   <table class="tbl-list wi-moderate">
 | ||
|     <thead>
 | ||
|       <tr>
 | ||
|         <th>[% 'Partnumber'  | $T8 %]</th>
 | ||
|         <th>[% 'Warehouse'   | $T8 %]</th>
 | ||
|         <th>[% 'Bin'         | $T8 %]</th>
 | ||
|         <th>[% 'Qty'         | $T8 %]</th>
 | ||
|         <th>[% 'Unit'        | $T8 %]</th>
 | ||
|         <th>[% 'Stock value' | $T8 %]</th>
 | ||
|       </tr>
 | ||
|     </thead>
 | ||
|     <tbody>
 | ||
|       [% FOREACH variant = SELF.part.variants %]
 | ||
|         [% SET partnumber = variant.partnumber %]
 | ||
|         [% FOREACH stock = variant_partnumber_to_stock_info.$partnumber %]
 | ||
|           <tr>
 | ||
|             <td>[% IF loop.first %][% variant.presenter.part %][% END %]</td>
 | ||
|             <td>[% HTML.escape(stock.warehouse_description) %]</td>
 | ||
|             <td>[% IF stock.order_link %]<a target="_blank" href="[% stock.order_link %]">[% END %]
 | ||
|                 [% HTML.escape(stock.bin_description)        %]
 | ||
|                 [% IF stock.order_link %]</a>[% END %]
 | ||
|             </td>
 | ||
|             <td class='numeric'>[% LxERP.format_amount(stock.qty, dec)       %]</td>
 | ||
|             <td                >[% HTML.escape(stock.unit)                   %]</td>
 | ||
|             <td class='numeric'>[% LxERP.format_amount(stock.stock_value, 2) %]</td>
 | ||
|           </tr>
 | ||
|           [% IF show_warehouse_subtotals AND stock.wh_lead != stock.warehouse_description %]
 | ||
|           <tr class='listheading'>
 | ||
|             <td></td>
 | ||
|             <th><b>[% HTML.escape(stock.warehouse_description) %]</b></th>
 | ||
|             <td></td>
 | ||
|             <td class='numeric'><b>[% LxERP.format_amount(stock.wh_run_qty, dec) %]</b></td>
 | ||
|             <td></td>
 | ||
|             <td class='numeric'><b>[% LxERP.format_amount(stock.wh_run_stock_value, dec) %]</b></td>
 | ||
|           </tr>
 | ||
|           [% END %]
 | ||
|           [% IF loop.last %]
 | ||
|           <tr class='listheading'>
 | ||
|             <th><b>[% 'Total' | $T8 %]</b></th>
 | ||
|             <td></td>
 | ||
|             <td></td>
 | ||
|             <td class='numeric'><b>[% LxERP.format_amount(stock.run_qty, dec)         %]</b></td>
 | ||
|             <td></td>
 | ||
|             <td class='numeric'><b>[% LxERP.format_amount(stock.run_stock_value, dec) %]</b></td>
 | ||
|           </tr>
 | ||
|           [% END %]
 | ||
|         [% END %]
 | ||
|       [% END %]
 | ||
|     </tbody>
 | ||
|     <tfoot>
 | ||
|       <tr class='listheading'>
 | ||
|         <th><b>[% 'Parent Variant' | $T8 %] [% 'Total' | $T8 %]</b></th>
 | ||
|         <td></td>
 | ||
|         <td></td>
 | ||
|         <td class='numeric'><b>[% LxERP.format_amount(stock.total_qty, dec) %]</b></td>
 | ||
|         <td></td>
 | ||
|         <td class='numeric'><b>[% LxERP.format_amount(stock.total_stock_value, dec) %]</b></td>
 | ||
|       </tr>
 | ||
|     </tfoot>
 | ||
|   </table>
 | ||
|   [% ELSE %]
 | ||
|   <p>[% 'No transactions yet.' | $T8 %]</p>
 | ||
|   [% END %]
 | ||
| </div>
 | ||
|  | ||
| [% IF AUTH.assert('warehouse_management', 1) %]
 | ||
| <div class="wrapper">
 | ||
|   <h3>[% 'Journal of Last 10 Transfers for each Variant' | $T8 %]</h3>
 | ||
|   <a href="wh.pl?action=journal&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'WHJournal' | $T8 %]</a>:
 | ||
|   <table class="tbl-list">
 | ||
|     <thead>
 | ||
|       <tr>
 | ||
|         <th>[% 'Partnumber'     | $T8 %]</th>
 | ||
|         <th>[% 'Date'           | $T8 %]</th>
 | ||
|         <th>[% 'Trans Type'     | $T8 %]</th>
 | ||
|         <th>[% 'Warehouse From' | $T8 %]</th>
 | ||
|         <th>[% 'Qty'            | $T8 %]</th>
 | ||
|         <th>[% 'Unit'           | $T8 %]</th>
 | ||
|         <th>[% 'Warehouse To'   | $T8 %]</th>
 | ||
|         <th>[% 'Charge Number'  | $T8 %]</th>
 | ||
|         <th>[% 'Comment'        | $T8 %]</th>
 | ||
|       </tr>
 | ||
|     </thead>
 | ||
|     <tbody>
 | ||
|       [% FOREACH variant = SELF.part.variants %]
 | ||
|         [% SET journal = variant.get_mini_journal %]
 | ||
|         [% IF journal.size %]
 | ||
|           [% FOREACH row = journal %]
 | ||
|           <tr>
 | ||
|             <td>[% IF loop.first %][% variant.presenter.part %][% END %]</td>
 | ||
|             <td>[% row.base.itime_as_date  %]</td>
 | ||
|             <td>[% row.base.trans_type.description | $T8 %]</td>
 | ||
|             <td>[% row.out ? row.out.bin.full_description : '-' | html %]</td>
 | ||
|             <td class='numeric'>[% row.in ? row.in.qty_as_number : LxERP.format_amount(-1 * row.out.qty, 2) %]</td>
 | ||
|             <td>[% row.base.part.unit | html %]</td>
 | ||
|             <td>[% row.in ? row.in.bin.full_description : '-' | html %]</td>
 | ||
|             <td>[% row.base.chargenumber | html %]</td>
 | ||
|             <td>[% row.base.comment | html %]</td>
 | ||
|           </tr>
 | ||
|           [% END %]
 | ||
|         [% ELSE %]
 | ||
|           <tr>
 | ||
|             <td>[% variant.presenter.part %]</td>
 | ||
|             <td colspan="8" class='center'>[% 'No transactions yet.' | $T8 %]</td>
 | ||
|           </tr>
 | ||
|         [% END %]
 | ||
|       [% END %]
 | ||
|       <tbody>
 | ||
|   </table>
 | ||
| </div>
 | ||
| [% END # assert warehouse_management %]
 | ||
Auch abrufbar als: Unified diff
Varianten: FIX: Reiter für Variaten Lagerbestände-/Bewegungen