Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 05a66574

Von Werner Hahn vor fast 2 Jahren hinzugefügt

  • ID 05a665740911bf77b2e1ef15674189eff875f68c
  • Vorgänger 2bb06207
  • Nachfolger 53d4e486

Design 4.0: Part Reiter Lager/Bestände templates hinzugefügt/angepasst

Unterschiede anzeigen:

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

  
3
[%- IF AUTH.assert('warehouse_management', 1) -%]
4
<div class="wrapper">
5
[% 'Actions' | $T8 %]:
6
 <span><a href="controller.pl?action=Inventory/stock_in&part_id=[% HTML.escape(SELF.part.id)%]&select_default_bin=1">[% 'Stock' | $T8 %]</a></span>
7
 <span><a href="wh.pl?trans_type=transfer&action=transfer_warehouse_selection&parts_id=[% HTML.escape(SELF.part.id) %]">[% 'Transfer' | $T8 %]</a></span>
8
 <span><a href="wh.pl?action=transfer_warehouse_selection&trans_type=removal&parts_id=[% HTML.escape(SELF.part.id) %]">[% 'Removal' | $T8 %]</a></span>
9
</div>
10
[%- END -%]
11

  
12
<div id="inventory_data">
13
</div>
14

  
15
<script type='text/javascript'>
16
$(function() {
17
  $('.tabwidget').on('tabsbeforeactivate', function(event, ui){
18
    if (ui.newPanel.attr('id') == 'inventory') {
19
      $.ajax({
20
        url: 'controller.pl?action=Part/inventory&id=[% SELF.part.id %]',
21
        success: function (html) {
22
          $("#inventory_data").html(html);
23
        },
24
      });
25
    }
26
    return 1;
27
   });
28
});
29
</script>
templates/design40_webpages/part/_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
<div id="stock_levels" class="wrapper">
7

  
8
<h3>[% 'Stock levels' | $T8 %]</h3>
9

  
10
[%- IF SELF.stock_amounts.size %]
11
<a href="wh.pl?action=report&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'Stock levels' | $T8 %]</a>:
12
<table class="tbl-list wi-moderate">
13
 <thead>
14
  <tr>
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 stock = SELF.stock_amounts %]
24
  <tr>
25
   <td                >[% HTML.escape(stock.warehouse_description)  %]</td>
26
   <td                >[% IF stock.order_link %]<a target="_blank" href="[% stock.order_link %]">[% END %]
27
                       [% HTML.escape(stock.bin_description)        %]
28
                       [% IF stock.order_link %]</a>[% END %]
29
   </td>
30
   <td class='numeric'>[% LxERP.format_amount(stock.qty, dec)       %]</td>
31
   <td                >[% HTML.escape(stock.unit)                   %]</td>
32
   <td class='numeric'>[% LxERP.format_amount(stock.stock_value, 2) %]</td>
33
  </tr>
34
  [% IF show_warehouse_subtotals AND stock.wh_lead != stock.warehouse_description %]
35
  <tr class='listheading'>
36
   <th                >[% HTML.escape(stock.warehouse_description)           %]</th>
37
   <td></td>
38
   <td class='numeric bold'>[% LxERP.format_amount(stock.wh_run_qty, dec)         %]</td>
39
   <td></td>
40
   <td class='numeric bold'>[% LxERP.format_amount(stock.wh_run_stock_value, dec) %]</td>
41
  </tr>
42
  [% END %]
43
  [% IF loop.last %]
44
  <tr class='listheading'>
45
   <th>[% 'Total' | $T8 %]</th>
46
   <td></td>
47
   <td class='numeric bold'>[% LxERP.format_amount(stock.run_qty, dec)         %]</td>
48
   <td></td>
49
   <td class='numeric bold'>[% LxERP.format_amount(stock.run_stock_value, dec) %]</td>
50
  </tr>
51
  [% END %]
52
 [% END %]
53
 </tbody>
54
</table>
55
[% ELSE %]
56
  <p>[% 'No transactions yet.' | $T8 %]</p>
57
[% END %]
58
</div>
59

  
60
[% IF AUTH.assert('warehouse_management', 1) %]
61
<div class="wrapper">
62
<h3>[% 'Journal of Last 10 Transfers' | $T8 %]</h3>
63
<a href="wh.pl?action=journal&partnumber=[% HTML.escape(SELF.part.partnumber) %]">[% 'WHJournal' | $T8 %]</a>:
64
[%- IF SELF.journal.size %]
65
<table class="tbl-list">
66
  <thead>
67
    <tr>
68
      <th>[% 'Date'           | $T8 %]</th>
69
      <th>[% 'Trans Type'     | $T8 %]</th>
70
      <th>[% 'Warehouse From' | $T8 %]</th>
71
      <th>[% 'Qty'            | $T8 %]</th>
72
      <th>[% 'Unit'           | $T8 %]</th>
73
      <th>[% 'Warehouse To'   | $T8 %]</th>
74
      <th>[% 'Charge Number'  | $T8 %]</th>
75
      <th>[% 'Comment'        | $T8 %]</th>
76
    </tr>
77
  </thead>
78
  <tbody>
79
    [% FOREACH row = SELF.journal %]
80
    <tr>
81
      <td>[% row.base.itime_as_date  %]</td>
82
      <td>[% row.base.trans_type.description | $T8 %]</td>
83
      <td>[% row.out ? row.out.bin.full_description : '-' | html %]</td>
84
      <td class='numeric'>[% row.in ? row.in.qty_as_number : LxERP.format_amount(-1 * row.out.qty, 2) %]</td>
85
      <td>[% row.base.part.unit | html %]</td>
86
      <td>[% row.in ? row.in.bin.full_description : '-' | html %]</td>
87
      <td>[% row.base.chargenumber | html %]</td>
88
      <td>[% row.base.comment | html %]</td>
89
    </tr>
90
    [% END %]
91
  <tbody>
92
</table>
93
[%- ELSE %]
94
<p>[% 'No transactions yet.' | $T8 %]</p>
95
[%- END %]
96
</div>
97
[% END # assert warehouse_management %]

Auch abrufbar als: Unified diff