5 [% SET best_price = price_source.best_price %]
6 [% SET best_discount = price_source.best_discount %]
7 [% SET price_editable = AUTH.assert('edit_prices', 1) %]
8 <h2>[% 'Prices' | $T8 %]</h2>
11 <tr class='listheading'>
13 <th>[% 'Price Source' | $T8 %]</th>
14 <th>[% 'Price' | $T8 %]</th>
15 <th>[% 'Best Price' | $T8 %]</th>
16 <th>[% 'Details' | $T8 %]</th>
19 [%- IF price_source.record_item.active_price_source %]
20 <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
22 <td><b>[% 'Selected' | $T8 %]</b></td>
24 <td>[% 'None (PriceSource)' | $T8 %]</td>
29 [%- FOREACH price IN price_source.available_prices %]
31 [%- IF price_source.record_item.active_price_source != price.source %]
32 <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>
33 [%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %]
34 <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>
36 <td><b>[% 'Selected' | $T8 %]</b></td>
38 <td>[% price.source_description | html %]</td>
39 <td>[% price.price_as_number %]</td>
40 [% IF price.source == best_price.source %]
41 <td align='center'>•</td>
45 <td>[% price.description | html %]</td>
50 <h2>[% 'Discounts' | $T8 %]</h2>
53 <tr class='listheading'>
55 <th>[% 'Price Source' | $T8 %]</th>
56 <th>[% 'Discount' | $T8 %]</th>
57 <th>[% 'Best Discount' | $T8 %]</th>
58 <th>[% 'Details' | $T8 %]</th>
61 [%- IF price_source.record_item.active_discount_source %]
62 <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
64 <td><b>[% 'Selected' | $T8 %]</b></td>
66 <td>[% 'None (PriceSource Discount)' | $T8 %]</td>
71 [%- FOREACH price IN price_source.available_discounts %]
73 [%- IF price_source.record_item.active_discount_source != price.source %]
74 <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>
75 [%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
76 <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>
78 <td><b>[% 'Selected' | $T8 %]</b></td>
80 <td>[% price.source_description | html %]</td>
81 <td>[% price.discount_as_percent %] %</td>
82 [% IF price.source == best_discount.source %]
83 <td align='center'>•</td>
87 <td>[% price.description | html %]</td>