X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Forder%2Ftabs%2F_price_sources_dialog.html;h=02f1fd396ce28745c1378b3262056ed9e9dadca0;hb=08460123f185fc145d4d87ae150b6b5f051d119a;hp=be05c62090246089e9dd7fc53854377b4ae30d68;hpb=0935b012a57196f883b59ec97bb7fe0882210c5a;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 be05c6209..02f1fd396 100644 --- a/templates/webpages/order/tabs/_price_sources_dialog.html +++ b/templates/webpages/order/tabs/_price_sources_dialog.html @@ -4,7 +4,16 @@ [%- USE LxERP %] [% SET best_price = price_source.best_price %] [% SET best_discount = price_source.best_discount %] -[% SET price_editable = AUTH.assert('edit_prices', 1) %] +[% SET price_editable = 0 %] +[% IF (FORM.type == "sales_order" || FORM.type == "sales_quotation") %] + [% SET price_editable = AUTH.assert('sales_edit_prices', 1) %] +[% END %] +[% 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 %]

@@ -12,6 +21,9 @@ + @@ -23,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) %] +