Revision 5f30e9f4
Von Hans P. Schlaepfer vor fast 4 Jahren hinzugefügt
templates/webpages/order/tabs/_price_sources_dialog.html | ||
---|---|---|
14 | 14 |
[% SET exfactor = price_source.record.exchangerate ? 1 / price_source.record.exchangerate : 1 %] |
15 | 15 |
[% SET exnoshow = price_source.record.currency_id==INSTANCE_CONF.get_currency_id %] |
16 | 16 |
[% SET places = exnoshow ? -2 : 5 %] |
17 |
<h2>[% 'Prices' | $T8 %]</h2> |
|
18 | 17 |
|
19 |
<table> |
|
20 |
<tr class='listheading'> |
|
21 |
<th></th> |
|
22 |
<th>[% 'Price Source' | $T8 %]</th> |
|
23 |
<th>[% 'Price' | $T8 %]</th> |
|
24 |
<th [%- IF exnoshow -%]style='display:none'[%- END %]> |
|
25 |
[% 'Price' | $T8 -%]/[%- price_source.record.currency.name %] |
|
26 |
</th> |
|
27 |
<th>[% 'Best Price' | $T8 %]</th> |
|
28 |
<th>[% 'Details' | $T8 %]</th> |
|
29 |
</tr> |
|
30 |
<tr class='listrow'> |
|
31 |
[%- IF price_source.record_item.active_price_source %] |
|
32 |
<td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td> |
|
33 |
[%- ELSE %] |
|
34 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
35 |
[%- END %] |
|
36 |
<td>[% 'None (PriceSource)' | $T8 %]</td> |
|
37 |
<td>-</td> |
|
38 |
<td [%- IF exnoshow -%]style='display:none'[%- END %]>-</td> |
|
39 |
<td></td> |
|
40 |
<td></td> |
|
41 |
</tr> |
|
42 |
[%- FOREACH price IN price_source.available_prices %] |
|
43 |
<tr class='listrow'> |
|
44 |
[%- IF price_source.record_item.active_price_source != price.source %] |
|
45 |
<td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price * exfactor, places) _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td> |
|
46 |
[%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %] |
|
47 |
<td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price * exfactor, places) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %]</td> |
|
48 |
[%- ELSE %] |
|
49 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
50 |
[% END %] |
|
51 |
<td>[% price.source_description | html %]</td> |
|
52 |
<td>[% price.price_as_number %]</td> |
|
53 |
<td [%- IF exnoshow -%]style='display:none'[%- END %]> |
|
54 |
[% LxERP.format_amount(price.price * exfactor, places) %] |
|
55 |
</td> |
|
56 |
[% IF price.source == best_price.source %] |
|
57 |
<td align='center'>•</td> |
|
58 |
[% ELSE %] |
|
59 |
<td></td> |
|
60 |
[% END %] |
|
61 |
<td>[% price.description | html %]</td> |
|
18 |
<h2>[% 'Prices' | $T8 %]</h2> |
|
19 |
|
|
20 |
|
|
21 |
<table class="tbl-list"> |
|
22 |
<thead> |
|
23 |
<tr> |
|
24 |
<th></th> |
|
25 |
<th>[% 'Price Source' | $T8 %]</th> |
|
26 |
<th>[% 'Price' | $T8 %]</th> |
|
27 |
<th [% IF exnoshow -%]style='display:none'[% END %]> |
|
28 |
[% 'Price' | $T8 -%]/[%- price_source.record.currency.name %] |
|
29 |
</th> |
|
30 |
<th>[% 'Best Price' | $T8 %]</th> |
|
31 |
<th>[% 'Details' | $T8 %]</th> |
|
32 |
</tr> |
|
33 |
</thead> |
|
34 |
<tbody> |
|
35 |
<tr> |
|
36 |
[% IF price_source.record_item.active_price_source %] |
|
37 |
<td><!-- PENDENT: a.buttons komplett ueberpruefen und L.button_tag() deaktivieren oder loeschen (3 Stueck hier, siehe weiter unten) --> |
|
38 |
<a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '', '[% LxERP.t8('None (PriceSource)') %]' , '', [% price_editable %])">[% LxERP.t8('Select') %] </a> |
|
39 |
[% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %] |
|
40 |
</td> |
|
41 |
[% ELSE %] |
|
42 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
43 |
[% END %] |
|
44 |
<td>[% 'None (PriceSource)' | $T8 %]</td> |
|
45 |
<td>-</td> |
|
46 |
<td [% IF exnoshow %]style='display:none'[% END %]>-</td> |
|
47 |
<td></td> |
|
48 |
<td></td> |
|
49 |
</tr> |
|
50 |
[% FOREACH price IN price_source.available_prices %] |
|
51 |
<tr> |
|
52 |
[% IF price_source.record_item.active_price_source != price.source %] |
|
53 |
<td> |
|
54 |
<a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price * exfactor, places) %]', [% price_editable %])">[% LxERP.t8('Select') %] </a> |
|
55 |
[% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price * exfactor, places) _ '\', ' _ price_editable _ ')', ) %] |
|
56 |
</td> |
|
57 |
[% ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %] |
|
58 |
<td> |
|
59 |
<a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price * exfactor, places) %]', [% price_editable %])">[% LxERP.t8('Update Price') %] </a> |
|
60 |
[% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price * exfactor, places) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %] |
|
61 |
</td> |
|
62 |
[% ELSE %] |
|
63 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
64 |
[% END %] |
|
65 |
<td>[% price.source_description | html %]</td> |
|
66 |
<td>[% price.price_as_number %]</td> |
|
67 |
<td [%- IF exnoshow -%]style='display:none'[%- END %]> |
|
68 |
[% LxERP.format_amount(price.price * exfactor, places) %] |
|
69 |
</td> |
|
70 |
[% IF price.source == best_price.source %] |
|
71 |
<td>•</td> |
|
72 |
[% ELSE %] |
|
73 |
<td></td> |
|
74 |
[% END %] |
|
75 |
<td>[% price.description | html %]</td> |
|
62 | 76 |
</tr> |
63 |
[%- END %] |
|
64 |
</table> |
|
77 |
[% END %] |
|
78 |
</tbody> |
|
79 |
</table> |
|
65 | 80 |
|
66 |
<h2>[% 'Discounts' | $T8 %]</h2> |
|
67 | 81 |
|
68 |
<table> |
|
69 |
<tr class='listheading'> |
|
70 |
<th></th> |
|
71 |
<th>[% 'Price Source' | $T8 %]</th> |
|
72 |
<th>[% 'Discount' | $T8 %]</th> |
|
73 |
<th>[% 'Best Discount' | $T8 %]</th> |
|
74 |
<th>[% 'Details' | $T8 %]</th> |
|
75 |
</tr> |
|
76 |
<tr class='listrow'> |
|
77 |
[%- IF price_source.record_item.active_discount_source %] |
|
78 |
<td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td> |
|
79 |
[%- ELSE %] |
|
80 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
81 |
[%- END %] |
|
82 |
<td>[% 'None (PriceSource Discount)' | $T8 %]</td> |
|
83 |
<td>-</td> |
|
84 |
<td></td> |
|
85 |
<td></td> |
|
86 |
</tr> |
|
87 |
[%- FOREACH price IN price_source.available_discounts %] |
|
88 |
<tr class='listrow'> |
|
89 |
[%- IF price_source.record_item.active_discount_source != price.source %] |
|
90 |
<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> |
|
91 |
[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %] |
|
92 |
<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> |
|
93 |
[%- ELSE %] |
|
94 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
95 |
[% END %] |
|
96 |
<td>[% price.source_description | html %]</td> |
|
97 |
<td>[% price.discount_as_percent %] %</td> |
|
98 |
[% IF price.source == best_discount.source %] |
|
99 |
<td align='center'>•</td> |
|
100 |
[% ELSE %] |
|
101 |
<td></td> |
|
102 |
[% END %] |
|
103 |
<td>[% price.description | html %]</td> |
|
82 |
<h2>[% 'Discounts' | $T8 %]</h2> |
|
83 |
|
|
84 |
|
|
85 |
<table class="tbl-list"> |
|
86 |
<thead> |
|
87 |
<tr> |
|
88 |
<th></th> |
|
89 |
<th>[% 'Price Source' | $T8 %]</th> |
|
90 |
<th>[% 'Discount' | $T8 %]</th> |
|
91 |
<th>[% 'Best Discount' | $T8 %]</th> |
|
92 |
<th>[% 'Details' | $T8 %]</th> |
|
93 |
</tr> |
|
94 |
</thead> |
|
95 |
<tbody> |
|
96 |
<tr> |
|
97 |
[% IF price_source.record_item.active_discount_source %] |
|
98 |
<td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td> |
|
99 |
[% ELSE %] |
|
100 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
101 |
[% END %] |
|
102 |
<td>[% 'None (PriceSource Discount)' | $T8 %]</td> |
|
103 |
<td>-</td> |
|
104 |
<td></td> |
|
105 |
<td></td> |
|
106 |
</tr> |
|
107 |
[% FOREACH price IN price_source.available_discounts %] |
|
108 |
<tr > |
|
109 |
[% IF price_source.record_item.active_discount_source != price.source %] |
|
110 |
<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> |
|
111 |
[% ELSIF price_source.record_item.discount * 1 != price.discount * 1 %] |
|
112 |
<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> |
|
113 |
[% ELSE %] |
|
114 |
<td><b>[% 'Selected' | $T8 %]</b></td> |
|
115 |
[% END %] |
|
116 |
<td>[% price.source_description | html %]</td> |
|
117 |
<td>[% price.discount_as_percent %] %</td> |
|
118 |
[% IF price.source == best_discount.source %] |
|
119 |
<td>•</td> |
|
120 |
[% ELSE %] |
|
121 |
<td></td> |
|
122 |
[% END %] |
|
123 |
<td>[% price.description | html %]</td> |
|
104 | 124 |
</tr> |
105 |
[%- END %] |
|
106 |
</table> |
|
125 |
[% END %] |
|
126 |
</tbody> |
|
127 |
</table> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/order/tabs/_price_sources_dialog.html