X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Forder%2Ftabs%2F_price_sources_dialog.html;h=02f1fd396ce28745c1378b3262056ed9e9dadca0;hb=2e19657a12d946c4e9cdd1466af1bbab992284ee;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 %]
[% 'Price Source' | $T8 %] | [% 'Price' | $T8 %] | ++ [% 'Price' | $T8 -%]/[%- price_source.record.currency.name %] + | [% 'Best Price' | $T8 %] | [% 'Details' | $T8 %] | @@ -29,20 +35,24 @@ [%- END %][% 'None (PriceSource)' | $T8 %] | - | +- | [%- FOREACH price IN price_source.available_prices %] |
---|---|---|---|---|---|---|---|---|
[% 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')) %] | [%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %] -[% 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')) %] | [%- ELSE %][% 'Selected' | $T8 %] | [% END %][% price.source_description | html %] | [% price.price_as_number %] | ++ [% LxERP.format_amount(price.price * exfactor, places) %] + | [% IF price.source == best_price.source %]• | [% ELSE %]