X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Forder%2Ftabs%2F_price_sources_dialog.html;h=02f1fd396ce28745c1378b3262056ed9e9dadca0;hb=8f7bb9d5dc2b961a2efc5f241dec43583f7ca21c;hp=772d9d5434f5b315072d2ab1c1ad9ed29417e291;hpb=0d060ae4ee73fb31edc7d8b85d13234a3988ca16;p=kivitendo-erp.git diff --git a/templates/webpages/order/tabs/_price_sources_dialog.html b/templates/webpages/order/tabs/_price_sources_dialog.html index 772d9d543..02f1fd396 100644 --- a/templates/webpages/order/tabs/_price_sources_dialog.html +++ b/templates/webpages/order/tabs/_price_sources_dialog.html @@ -11,6 +11,9 @@ [% IF (FORM.type == "purchase_order" || FORM.type == "request_quotation") %] [% SET price_editable = AUTH.assert('purchase_edit_prices', 1) %] [% END %] +[% SET exfactor = price_source.record.exchangerate ? 1 / price_source.record.exchangerate : 1 %] +[% SET exnoshow = price_source.record.currency_id==INSTANCE_CONF.get_currency_id %] +[% SET places = exnoshow ? -2 : 5 %]

[% 'Prices' | $T8 %]

@@ -18,6 +21,9 @@ + @@ -29,20 +35,24 @@ [%- END %] + [%- FOREACH price IN price_source.available_prices %] [%- IF price_source.record_item.active_price_source != price.source %] - + [%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %] - + [%- ELSE %] [% END %] + [% IF price.source == best_price.source %] [% ELSE %]
[% 'Price Source' | $T8 %] [% 'Price' | $T8 %] + [% 'Price' | $T8 -%]/[%- price_source.record.currency.name %] + [% 'Best Price' | $T8 %] [% 'Details' | $T8 %]
[% 'None (PriceSource)' | $T8 %] --
[% 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')) %][% 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')) %][% 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')) %][% 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')) %][% 'Selected' | $T8 %][% price.source_description | html %] [% price.price_as_number %] + [% LxERP.format_amount(price.price * exfactor, places) %] +