[%- USE T8 %] [%- USE L %][%- USE P %] [%- USE HTML %][%- USE LxERP %]

[% title %]

[%- INCLUDE 'common/flash.html' %]
[% L.hidden_tag("price_rule.id", SELF.price_rule.id) %] [% L.hidden_tag("price_rule.type", SELF.price_rule.type) %]
[% 'Name' | $T8 %] [% L.input_tag("price_rule.name", SELF.price_rule.name, size=60, class='initial_focus') %]
[% 'Priority' | $T8 %] [% L.select_tag('price_rule.priority', [ [3, LxERP.t8('Normal') ], [ 4, LxERP.t8('Override') ] ], default=SELF.price_rule.priority, style='width: 300px') %]
[% 'Valid' | $T8 %] [% L.select_tag('price_rule.obsolete', [ [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=SELF.price_rule.obsolete, title_key='description', style='width: 300px') %]

[% 'If all of the following match' | $T8 %]:

[% FOREACH item = SELF.price_rule.items %] [% PROCESS 'price_rule/item.html' item=item %] [% END %]
[% PROCESS 'price_rule/empty_item.html' %]

[% 'Then' | $T8 %]:

[% 'Set (set to)' | $T8 %] [% L.select_tag('price_rule.price_type', SELF.all_price_types, default=SELF.price_rule.price_type) %] [% 'to (set to)' | $T8 %] [% L.input_tag('price_rule.price_or_discount_as_number', SELF.price_rule.price_or_discount_as_number) %] [?]