Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 99676e8f

Von Hans P. Schlaepfer vor etwa 4 Jahren hinzugefügt

  • ID 99676e8f1bdbf385eb692065a1b20c7b34765566
  • Vorgänger a9804fd3
  • Nachfolger 71719a8b

Neues Design 2019 Standard-Code templates/webpages/part/_assortment.html

Unterschiede anzeigen:

templates/webpages/part/_assortment.html
4 4
[% USE L %]
5 5
[% USE P %]
6 6

  
7
<div id="assortment" name="assortment">
8

  
9
<h2>[% 'Assortment items' | $T8 %]</h2>
7
<div id="assortment" class="wrapper">
10 8

  
11 9
[% L.hidden_tag('assortment_id', SELF.part.id) %]
12 10

  
13
<table id="assortment_items">
14
 <thead>
15
   <tr class="listheading">
16
     <th class="listheading" style='display:none'></th>
17
     [% IF SELF.orphaned %]
18
     <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
19
     [% END %]
20
     <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
11
<table id="assortment_items" class="tbl-list">
12
  <caption>[% 'Assortment items' | $T8 %]</caption>
13
  <thead>
14
    <tr>
15
      <th style="display:none"></th>
16
      [% IF SELF.orphaned %]
17
        <th style="text-align:center"><img src="image/close.png" alt="[% LxERP.t8('delete item') %]"></th>
18
      [% END %]
19
      <th>[% 'Position' | $T8 %] </th>
20
      [% IF SELF.orphaned %]
21
        <th style="text-align:center"><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]"></th>
22
      [% END %]
23
      <th id="partnumber_header_id" >
24
        <a href='javascript:kivi.Part.reorder_items("partnumber")'>[% 'Partnumber' | $T8 %]</a>
25
      </th>
26
      <th id="partdescription_header_id">
27
        <a href='javascript:kivi.Part.reorder_items("description")'>[% 'Description' | $T8 %]</a>
28
      </th>
29
      <th id="qty_header_id">
30
        <a href='javascript:kivi.Part.reorder_items("qty")'>[% 'Qty' | $T8 %]</a>
31
      </th>
32
      <th>[% 'Unit'         | $T8 %] </th>
33
      <th>[% 'Charge'       | $T8 %] </th>
34
      <th>[% 'Line Total'   | $T8 %] </th>
35
      <th id="sellprice_header_id" class="right">
36
        <a href='javascript:kivi.Part.reorder_items("sellprice")'> [% 'Sellprice' | $T8 %]</a>
37
      </th>
38
      <th id="lastcost_header_id" class="right">
39
        <a href='javascript:kivi.Part.reorder_items("lastcost")'> [% 'Lastcost' | $T8 %]</a>
40
      </th>
41
      <th id="_header_id" class="right">
42
        <a href='javascript:kivi.Part.reorder_items("partsgroup")'> [% 'Partsgroup' | $T8 %]</a>
43
      </th>
44
    </tr>
45
  </thead>
46
  <tbody id="assortment_rows">
47
    [% assortment_html %]
48
  </tbody>
49
  <tfoot id="assortment_input">
50
    <tr>
51
      [% IF SELF.orphaned %]
52
        <td></td>
53
        <td></td>
54
        <td></td>
55
        <td colspan="4">
56
          [% P.part.picker('add_items[+].parts_id', '', class='wi-lightwide', multiple=1, id='assortment_picker', action={set_multi_items='kivi.Part.set_multi_assortment_items'}, placeholder=LxERP.t8('Search & add article')) %]
57
          [% L.button_tag("kivi.Part.add_assortment_item()", LxERP.t8("Add")) %]
58
          [% L.hidden_tag('add_items[].qty_as_number', 1) %]
59
        </td>
60
      [% ELSE %]
61
        <td></td>
62
        <td></td>
63
        <td></td>
64
        <td></td>
65
        <td></td>
66
        <td></td>
67
      [% END %]
68
      <td></td>
69
      <td></td>
70
      <td class="numeric" id="items_sellprice_sum">[% LxERP.format_amount(items_sellprice_sum, 2, 0) %]</td>
71
      <td class="numeric" id="items_lastcost_sum" >[% LxERP.format_amount(items_lastcost_sum,  2, 0) %]</td>
72
      <td class="numeric" id="items_sum_diff"     >[% LxERP.format_amount(items_sum_diff,      2, 0) %]</td>
73
    </tr>
74
    <tr class="blank">
21 75
     [% IF SELF.orphaned %]
22
     <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
76
       <td></td>
77
       <td></td>
23 78
     [% END %]
24
     <th id="partnumber_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Part.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
25
     <th id="partdescription_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Part.reorder_items("description")' >[%- 'Description' | $T8 %]</a></th>
26
     <th id="qty_header_id"         class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Part.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
27
     <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
28
     <th class="listheading" nowrap width="5" >[%- 'Charge'       | $T8 %] </th>
29
     <th class="listheading" nowrap width="5" >[%- 'Line Total'   | $T8 %] </th>
30
     <th id="sellprice_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("sellprice")'> [%- 'Sellprice'   | $T8 %]</a></th>
31
     <th id="lastcost_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("lastcost")'> [%- 'Lastcost'      | $T8 %]</a></th>
32
     <th id="_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Part.reorder_items("partsgroup")'> [%- 'Partsgroup'       | $T8 %]</a></th>
33
   </tr>
34
 </thead>
35
<tbody id="assortment_rows">
36
  [% assortment_html %]
37
</tbody>
38
<tbody id="assortment_input">
39
<tr>
40
 [% IF SELF.orphaned %]
41
 <td></td>
42
 <td></td>
43
 <td align="right">[% 'Part' | $T8 %]:</td>
44
 <td>[% P.part.picker('add_items[+].parts_id', '', style='width: 300px', multiple=1, id='assortment_picker', action={set_multi_items='kivi.Part.set_multi_assortment_items'}) %]</td>
45
 <td>[%- L.button_tag("kivi.Part.add_assortment_item()", LxERP.t8("Add")) %]</td>
46
 <td>[% L.button_tag('$("#assortment_picker").data("part_picker").open_dialog()', LxERP.t8('Add multiple items')) %]</td>
47
 <td>[% L.hidden_tag('add_items[].qty_as_number', 1) %]</td>
48
 [% ELSE %]
49
 <td></td>
50
 <td></td>
51
 <td></td>
52
 <td></td>
53
 <td></td>
54
 <td></td>
55
 [% END %]
56
 <td></td>
57
 <td align="right">[% 'Totals' | $T8 %]:</td>
58
 <th id="items_sellprice_sum" class="numeric">[%- LxERP.format_amount(items_sellprice_sum, 2, 0) %]</td>
59
 <th id="items_lastcost_sum"  class="numeric">[%- LxERP.format_amount(items_lastcost_sum,  2, 0) %]</td>
60
 <th id="items_sum_diff"      class="numeric">[%- LxERP.format_amount(items_sum_diff,      2, 0) %]</td>
61
</tr>
62
<tr>
63
 [% IF SELF.orphaned %]
64
 <td></td>
65
 <td></td>
66
 [% END %]
67
 <td></td>
68
 <td></td>
69
 <td></td>
70
 <td></td>
71
 <td></td>
72
 <td></td>
73
 <td></td>
74
 <td align="right">[% L.button_tag("kivi.Part.set_assortment_sellprice()", LxERP.t8("Set sellprice")) %]</td>
75
 <td align="right">[% L.button_tag("kivi.Part.set_assortment_lastcost()",  LxERP.t8("Set lastcost"))  %]</td>
76
 <td></td>
77
</tr>
78
</tbody>
79
</table>
79
     <td></td>
80
     <td colspan="2">[% L.button_tag('$("#assortment_picker").data("part_picker").open_dialog()', LxERP.t8('Add multiple items'), class='neutral') %]</td>
81
     <!-- <td></td> -->
82
     <td></td>
83
     <td></td>
84
     <td></td>
85
     <td></td>
86
     <td class="right">[% L.button_tag("kivi.Part.set_assortment_sellprice()", LxERP.t8("Set sellprice")) %]</td>
87
     <td class="right">[% L.button_tag("kivi.Part.set_assortment_lastcost()",  LxERP.t8("Set lastcost"))  %]</td>
88
     <td></td>
89
    </tr>
90
  </tfoot>
91

  
92
</table><!-- /#assortment.wrapper -->
80 93

  
81 94
[% L.sortable_element('#assortment_rows') %]
82 95

  
......
84 97

  
85 98
<script type="text/javascript">
86 99
  $(function() {
87
    $("#assortment").on( "focusout", ".recalc", function( event )  {
100
    $('#assortment').on( 'focusout', '.recalc', function( event )  {
88 101
      kivi.Part.assortment_recalc();
89 102
    });
90 103

  
91
    $("#assortment").on( "change", ":checkbox", function( event )  {
104
    $('#assortment').on( 'change', ':checkbox', function( event )  {
92 105
      kivi.Part.assortment_recalc();
93 106
    });
94 107

  

Auch abrufbar als: Unified diff