e3734e94883562c2bab6a521f97604d04f219044
[kivitendo-erp.git] / templates / webpages / price_rule / item.html
1 [%- USE L %]
2 [%- USE HTML %]
3 [%- USE T8 %]
4 [%- USE LxERP %]
5 [% SET num_compare_ops = [
6   [ 'eq', LxERP.t8('is equal to') ],
7   [ 'lt', LxERP.t8('is lower than') ],
8   [ 'gt', LxERP.t8('is greater than') ],
9 ] %]
10 [% SET date_compare_ops = [
11   [ 'eq', LxERP.t8('is equal to') ],
12   [ 'gt', LxERP.t8('is after') ],
13   [ 'lt', LxERP.t8('is before') ],
14 ] %]
15 <div>
16 <a class='price_rule_remove_line'><img height="10px" width="10px" src="image/cross.png" alt="[% 'Remove' | $T8 %]"></a>
17 [% L.hidden_tag('price_rule.items[+].id', item.id) %]
18 [% L.hidden_tag('price_rule.items[].type', item.type) %]
19 [%- SWITCH item.type %]
20   [% CASE 'customer' %]
21     [% 'Customer' | $T8 %] [% 'is' | $T8 %] [% L.customer_vendor_picker('price_rule.items[].value_int', item.customer, type='customer') %]
22   [% CASE 'vendor' %]
23     [% 'Vendor' | $T8 %] [% 'is' | $T8 %] [% L.vendor_vendor_picker('price_rule.items[].value_int', item.customer, type='vendor') %]
24   [% CASE 'business' %]
25     [% 'Type of Business' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_int', SELF.businesses, title_key='description', default=item.value_int) %]
26   [% CASE 'partsgroup' %]
27     [% 'Group' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_int', SELF.partsgroups, title_key='partsgroup', default=item.value_int) %]
28   [% CASE 'qty' %]
29     [% 'Quantity' | $T8 %] [% L.select_tag('price_rule.items[].op', num_compare_ops, default=item.op) %] [% L.input_tag('price_rule.items[].value_num_as_number', item.value_num_as_number) %]
30   [% CASE 'reqdate' %]
31     [% 'Reqdate' | $T8 %] [% L.select_tag('price_rule.items[].op', date_compare_ops, default=item.op) %] [% L.date_tag('price_rule.items[].value_date', item.value_date) %]
32   [% CASE 'pricegroup' %]
33     [% 'Pricegroup' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_int', SELF.pricegroups, title_key='pricegroup', default=item.value_int) %]
34   [% CASE %]
35 [%- END %]
36 </div>