Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5911c5be

Von Tamino Steinert vor 6 Tagen hinzugefügt

  • ID 5911c5be0103b760d2f81ad483e32f07b4e4e41c
  • Vorgänger 6b17e62c
  • Nachfolger 3153715e

Varianten: FIX: Reiter für Variaten Lagerbestände-/Bewegungen

vergessene Dateien hinzugefügt

Unterschiede anzeigen:

templates/design40_webpages/part/_parent_variant_inventory.html
1
[%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%][%- USE T8 -%]
2

  
3
<div id="parent_vairant_inventory_data">
4
</div>
5

  
6
<script type='text/javascript'>
7
$(function() {
8
  $('.tabwidget').on('tabsbeforeactivate', function(event, ui){
9
    if (ui.newPanel.attr('id') == 'partent_variant_inventory') {
10
      $.ajax({
11
        url: 'controller.pl?action=Part/parent_variant_inventory&id=[% SELF.part.id %]',
12
        success: function (html) {
13
          $("#parent_vairant_inventory_data").html(html);
14
        },
15
      });
16
    }
17
    return 1;
18
   });
19
});
20
</script>
templates/design40_webpages/part/_parent_variant_inventory_data.html
1
[%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%][%- USE T8 -%]
2

  
3
[%- SET dec = 2 %]
4
[%- SET show_warehouse_subtotals = 1 %]
5

  
6
[%- SET variant_partnumber_to_stock_info = SELF.part.get_simple_stock_parent_variant_sql %]
7
<div id="stock_levels" class="wrapper">
8
  <h3>[% 'Stock levels' | $T8 %]</h3>
9
  [%- IF variant_partnumber_to_stock_info.size %]
10
  <a href="wh.pl?action=report&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'Stock levels' | $T8 %]</a>:
11
  <table class="tbl-list wi-moderate">
12
    <thead>
13
      <tr>
14
        <th>[% 'Partnumber'  | $T8 %]</th>
15
        <th>[% 'Warehouse'   | $T8 %]</th>
16
        <th>[% 'Bin'         | $T8 %]</th>
17
        <th>[% 'Qty'         | $T8 %]</th>
18
        <th>[% 'Unit'        | $T8 %]</th>
19
        <th>[% 'Stock value' | $T8 %]</th>
20
      </tr>
21
    </thead>
22
    <tbody>
23
      [% FOREACH variant = SELF.part.variants %]
24
        [% SET partnumber = variant.partnumber %]
25
        [% FOREACH stock = variant_partnumber_to_stock_info.$partnumber %]
26
          <tr>
27
            <td>[% IF loop.first %][% variant.presenter.part %][% END %]</td>
28
            <td>[% HTML.escape(stock.warehouse_description) %]</td>
29
            <td>[% IF stock.order_link %]<a target="_blank" href="[% stock.order_link %]">[% END %]
30
                [% HTML.escape(stock.bin_description)        %]
31
                [% IF stock.order_link %]</a>[% END %]
32
            </td>
33
            <td class='numeric'>[% LxERP.format_amount(stock.qty, dec)       %]</td>
34
            <td                >[% HTML.escape(stock.unit)                   %]</td>
35
            <td class='numeric'>[% LxERP.format_amount(stock.stock_value, 2) %]</td>
36
          </tr>
37
          [% IF show_warehouse_subtotals AND stock.wh_lead != stock.warehouse_description %]
38
          <tr class='listheading'>
39
            <td></td>
40
            <th><b>[% HTML.escape(stock.warehouse_description) %]</b></th>
41
            <td></td>
42
            <td class='numeric'><b>[% LxERP.format_amount(stock.wh_run_qty, dec) %]</b></td>
43
            <td></td>
44
            <td class='numeric'><b>[% LxERP.format_amount(stock.wh_run_stock_value, dec) %]</b></td>
45
          </tr>
46
          [% END %]
47
          [% IF loop.last %]
48
          <tr class='listheading'>
49
            <th><b>[% 'Total' | $T8 %]</b></th>
50
            <td></td>
51
            <td></td>
52
            <td class='numeric'><b>[% LxERP.format_amount(stock.run_qty, dec)         %]</b></td>
53
            <td></td>
54
            <td class='numeric'><b>[% LxERP.format_amount(stock.run_stock_value, dec) %]</b></td>
55
          </tr>
56
          [% END %]
57
        [% END %]
58
      [% END %]
59
    </tbody>
60
    <tfoot>
61
      <tr class='listheading'>
62
        <th><b>[% 'Parent Variant' | $T8 %] [% 'Total' | $T8 %]</b></th>
63
        <td></td>
64
        <td></td>
65
        <td class='numeric'><b>[% LxERP.format_amount(stock.total_qty, dec) %]</b></td>
66
        <td></td>
67
        <td class='numeric'><b>[% LxERP.format_amount(stock.total_stock_value, dec) %]</b></td>
68
      </tr>
69
    </tfoot>
70
  </table>
71
  [% ELSE %]
72
  <p>[% 'No transactions yet.' | $T8 %]</p>
73
  [% END %]
74
</div>
75

  
76
[% IF AUTH.assert('warehouse_management', 1) %]
77
<div class="wrapper">
78
  <h3>[% 'Journal of Last 10 Transfers for each Variant' | $T8 %]</h3>
79
  <a href="wh.pl?action=journal&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'WHJournal' | $T8 %]</a>:
80
  <table class="tbl-list">
81
    <thead>
82
      <tr>
83
        <th>[% 'Partnumber'     | $T8 %]</th>
84
        <th>[% 'Date'           | $T8 %]</th>
85
        <th>[% 'Trans Type'     | $T8 %]</th>
86
        <th>[% 'Warehouse From' | $T8 %]</th>
87
        <th>[% 'Qty'            | $T8 %]</th>
88
        <th>[% 'Unit'           | $T8 %]</th>
89
        <th>[% 'Warehouse To'   | $T8 %]</th>
90
        <th>[% 'Charge Number'  | $T8 %]</th>
91
        <th>[% 'Comment'        | $T8 %]</th>
92
      </tr>
93
    </thead>
94
    <tbody>
95
      [% FOREACH variant = SELF.part.variants %]
96
        [% SET journal = variant.get_mini_journal %]
97
        [% IF journal.size %]
98
          [% FOREACH row = journal %]
99
          <tr>
100
            <td>[% IF loop.first %][% variant.presenter.part %][% END %]</td>
101
            <td>[% row.base.itime_as_date  %]</td>
102
            <td>[% row.base.trans_type.description | $T8 %]</td>
103
            <td>[% row.out ? row.out.bin.full_description : '-' | html %]</td>
104
            <td class='numeric'>[% row.in ? row.in.qty_as_number : LxERP.format_amount(-1 * row.out.qty, 2) %]</td>
105
            <td>[% row.base.part.unit | html %]</td>
106
            <td>[% row.in ? row.in.bin.full_description : '-' | html %]</td>
107
            <td>[% row.base.chargenumber | html %]</td>
108
            <td>[% row.base.comment | html %]</td>
109
          </tr>
110
          [% END %]
111
        [% ELSE %]
112
          <tr>
113
            <td>[% variant.presenter.part %]</td>
114
            <td colspan="8" class='center'>[% 'No transactions yet.' | $T8 %]</td>
115
          </tr>
116
        [% END %]
117
      [% END %]
118
      <tbody>
119
  </table>
120
</div>
121
[% END # assert warehouse_management %]

Auch abrufbar als: Unified diff