X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=templates%2Fwebpages%2Forder%2Ftabs%2F_price_sources_dialog.html;fp=templates%2Fwebpages%2Forder%2Ftabs%2F_price_sources_dialog.html;h=02f1fd396ce28745c1378b3262056ed9e9dadca0;hp=0000000000000000000000000000000000000000;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/templates/webpages/order/tabs/_price_sources_dialog.html b/templates/webpages/order/tabs/_price_sources_dialog.html new file mode 100644 index 000000000..02f1fd396 --- /dev/null +++ b/templates/webpages/order/tabs/_price_sources_dialog.html @@ -0,0 +1,106 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE L %] +[%- USE LxERP %] +[% SET best_price = price_source.best_price %] +[% SET best_discount = price_source.best_discount %] +[% 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 %]

+ + + + + + + + + + + +[%- IF price_source.record_item.active_price_source %] + +[%- ELSE %] + +[%- 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 %] + +[% END %] + + + [%- END %] +
[% 'Price Source' | $T8 %][% 'Price' | $T8 %] + [% 'Price' | $T8 -%]/[%- price_source.record.currency.name %] + [% 'Best Price' | $T8 %][% 'Details' | $T8 %]
[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %][% 'Selected' | $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 * 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 * 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) %] + [% price.description | html %]
+ +

[% 'Discounts' | $T8 %]

+ + + + + + + + + + +[%- IF price_source.record_item.active_discount_source %] + +[%- ELSE %] + +[%- END %] + + + + + + [%- FOREACH price IN price_source.available_discounts %] + +[%- IF price_source.record_item.active_discount_source != price.source %] + +[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %] + +[%- ELSE %] + +[% END %] + + +[% IF price.source == best_discount.source %] + +[% ELSE %] + +[% END %] + + + [%- END %] +
[% 'Price Source' | $T8 %][% 'Discount' | $T8 %][% 'Best Discount' | $T8 %][% 'Details' | $T8 %]
[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %][% 'Selected' | $T8 %][% 'None (PriceSource Discount)' | $T8 %]-
[% 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')) %][% 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')) %][% 'Selected' | $T8 %][% price.source_description | html %][% price.discount_as_percent %] %[% price.description | html %]