From: Bernd Bleßmann Date: Fri, 24 Jul 2020 13:46:30 +0000 (+0200) Subject: Auftrags-Controller: Wechselkurs in Preisquellen-Dialog berücksichtigen X-Git-Tag: release-3.5.6.1~90 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=60a3e513e0839032515989afe0a83bb88fa1bd58;p=kivitendo-erp.git Auftrags-Controller: Wechselkurs in Preisquellen-Dialog berücksichtigen Bezieht sich auch auf #139 Refs #139 --- 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) %] +