Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 948630a7

Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt

  • ID 948630a700a3f1bf4bd765bddd8e37852d6136bf
  • Vorgänger c3e97712
  • Nachfolger f5a79b3b

Neues Design 2019 Standard-Code templates/webpages/order/tabs/_price_sources_dialog.html

Unterschiede anzeigen:

templates/webpages/order/tabs/_price_sources_dialog.html
11 11
[% IF (FORM.type == "purchase_order" || FORM.type == "request_quotation") %]
12 12
  [% SET price_editable = AUTH.assert('purchase_edit_prices', 1) %]
13 13
[% END %]
14
  <h2>[% 'Prices' | $T8 %]</h2>
15 14

  
16
  <table>
17
   <tr class='listheading'>
18
    <th></th>
19
    <th>[% 'Price Source' | $T8 %]</th>
20
    <th>[% 'Price' | $T8 %]</th>
21
    <th>[% 'Best Price' | $T8 %]</th>
22
    <th>[% 'Details' | $T8 %]</th>
23
   </tr>
24
   <tr class='listrow'>
25
[%- IF price_source.record_item.active_price_source %]
26
    <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
27
[%- ELSE %]
28
    <td><b>[% 'Selected' | $T8 %]</b></td>
29
[%- END %]
30
    <td>[% 'None (PriceSource)' | $T8 %]</td>
31
    <td>-</td>
32
    <td></td>
33
    <td></td>
34
   </tr>
35
   [%- FOREACH price IN price_source.available_prices %]
36
    <tr class='listrow'>
37
[%- IF price_source.record_item.active_price_source != price.source %]
38
     <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
39
[%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %]
40
     <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %]</td>
41
[%- ELSE %]
42
    <td><b>[% 'Selected' | $T8 %]</b></td>
43
[% END %]
44
     <td>[% price.source_description | html %]</td>
45
     <td>[% price.price_as_number %]</td>
46
[% IF price.source == best_price.source %]
47
     <td align='center'>&#x2022;</td>
48
[% ELSE %]
49
     <td></td>
50
[% END %]
51
     <td>[% price.description | html %]</td>
15
<h2>[% 'Prices' | $T8 %]</h2>
16

  
17

  
18
<table class="tbl-list">
19
  <thead>
20
    <tr>
21
      <th></th>
22
      <th>[% 'Price Source' | $T8 %]</th>
23
      <th>[% 'Price' | $T8 %]</th>
24
      <th>[% 'Best Price' | $T8 %]</th>
25
      <th>[% 'Details' | $T8 %]</th>
52 26
    </tr>
53
   [%- END %]
54
  </table>
27
  </thead>
28
  <tbody>
29
    <tr>
30
      [% IF price_source.record_item.active_price_source %]
31
        <td><!-- PENDENT: a.buttons komplett ueberpruefen und L.button_tag() deaktivieren oder loeschen (3 Stueck hier, siehe weiter unten) -->
32
        <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '', '[% LxERP.t8('None (PriceSource)') %]' , '', [% price_editable %])">[% LxERP.t8('Select') %] </a>
33
        [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]
34
        </td>
35
      [% ELSE %]
36
        <td><b>[% 'Selected' | $T8 %]</b></td>
37
      [% END %]
38
      <td>[% 'None (PriceSource)' | $T8 %]</td>
39
      <td>-</td>
40
      <td></td>
41
      <td></td>
42
    </tr>
43
    [% FOREACH price IN price_source.available_prices %]
44
    <tr>
45
      [% IF price_source.record_item.active_price_source != price.source %]
46
        <td>
47
          <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price, -2) %]', [% price_editable %])">[% LxERP.t8('Select') %] </a>
48
          [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', ) %]
49
        </td>
50
      [% ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %]
51
        <td>
52
          <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price, -2) %]', [% price_editable %])">[% LxERP.t8('Update Price') %] </a>
53
          [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %]
54
        </td>
55
      [% ELSE %]
56
        <td><b>[% 'Selected' | $T8 %]</b></td>
57
      [% END %]
58
      <td>[% price.source_description | html %]</td>
59
      <td>[% price.price_as_number %]</td>
60
      [% IF price.source == best_price.source %]
61
        <td>&#x2022;</td>
62
      [% ELSE %]
63
        <td></td>
64
      [% END %]
65
      <td>[% price.description | html %]</td>
66
    </tr>
67
    [% END %]
68
  </tbody>
69
</table>
55 70

  
56
  <h2>[% 'Discounts' | $T8 %]</h2>
57 71

  
58
  <table>
59
   <tr class='listheading'>
60
    <th></th>
61
    <th>[% 'Price Source' | $T8 %]</th>
62
    <th>[% 'Discount' | $T8 %]</th>
63
    <th>[% 'Best Discount' | $T8 %]</th>
64
    <th>[% 'Details' | $T8 %]</th>
65
   </tr>
66
   <tr class='listrow'>
67
[%- IF price_source.record_item.active_discount_source %]
68
    <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
69
[%- ELSE %]
70
    <td><b>[% 'Selected' | $T8 %]</b></td>
71
[%- END %]
72
    <td>[% 'None (PriceSource Discount)' | $T8 %]</td>
73
    <td>-</td>
74
    <td></td>
75
    <td></td>
76
   </tr>
77
   [%- FOREACH price IN price_source.available_discounts %]
78
    <tr class='listrow'>
79
[%- IF price_source.record_item.active_discount_source != price.source %]
80
     <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
81
[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
82
     <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent  _ '\', ' _ price_editable _ ')', LxERP.t8('Update Discount')) %]</td>
83
[%- ELSE %]
84
    <td><b>[% 'Selected' | $T8 %]</b></td>
85
[% END %]
86
     <td>[% price.source_description | html %]</td>
87
     <td>[% price.discount_as_percent %] %</td>
88
[% IF price.source == best_discount.source %]
89
     <td align='center'>&#x2022;</td>
90
[% ELSE %]
91
     <td></td>
92
[% END %]
93
     <td>[% price.description | html %]</td>
72
<h2>[% 'Discounts' | $T8 %]</h2>
73

  
74

  
75
<table class="tbl-list">
76
  <thead>
77
    <tr>
78
      <th></th>
79
      <th>[% 'Price Source' | $T8 %]</th>
80
      <th>[% 'Discount' | $T8 %]</th>
81
      <th>[% 'Best Discount' | $T8 %]</th>
82
      <th>[% 'Details' | $T8 %]</th>
94 83
    </tr>
95
   [%- END %]
96
  </table>
84
  </thead>
85
  <tbody>
86
    <tr>
87
      [% IF price_source.record_item.active_discount_source %]
88
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
89
      [% ELSE %]
90
        <td><b>[% 'Selected' | $T8 %]</b></td>
91
      [% END %]
92
      <td>[% 'None (PriceSource Discount)' | $T8 %]</td>
93
      <td>-</td>
94
      <td></td>
95
      <td></td>
96
    </tr>
97
    [% FOREACH price IN price_source.available_discounts %]
98
    <tr >
99
      [% IF price_source.record_item.active_discount_source != price.source %]
100
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
101
      [% ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
102
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Update Discount')) %]</td>
103
      [% ELSE %]
104
        <td><b>[% 'Selected' | $T8 %]</b></td>
105
      [% END %]
106
      <td>[% price.source_description | html %]</td>
107
      <td>[% price.discount_as_percent %] %</td>
108
      [% IF price.source == best_discount.source %]
109
        <td>&#x2022;</td>
110
      [% ELSE %]
111
        <td></td>
112
      [% END %]
113
      <td>[% price.description | html %]</td>
114
    </tr>
115
    [% END %]
116
  </tbody>
117
</table>
118

  

Auch abrufbar als: Unified diff