[% USE L %]
[% USE P %]
[% USE HTML %]
[% USE T8 %]
[% USE LxERP %]
[% SET num_compare_ops = [
[ 'eq', LxERP.t8('is equal to') ],
[ 'le', LxERP.t8('is lower than or equal') ],
[ 'ge', LxERP.t8('is greater than or equal') ],
] %]
[% SET date_compare_ops = [
[ 'eq', LxERP.t8('is equal to') ],
[ 'gt', LxERP.t8('is after') ],
[ 'lt', LxERP.t8('is before') ],
] %]
✘
[% L.hidden_tag('price_rule.items[+].id', item.id) %]
[% L.hidden_tag('price_rule.items[].type', item.type) %]
|
[% SWITCH item.type %]
[% CASE 'part' %]
[% 'Part' | $T8 %] |
[% 'is' | $T8 %] |
[% P.part.picker('price_rule.items[].value_int', item.part,, class='wi-wide') %] |
[% CASE 'customer' %]
[% 'Customer' | $T8 %] |
[% 'is' | $T8 %] |
[% P.customer_vendor.picker('price_rule.items[].value_int', item.customer, type='customer', class='wi-wide') %] |
[% CASE 'vendor' %]
[% 'Vendor' | $T8 %] |
[% 'is' | $T8 %] |
[% P.customer_vendor.picker('price_rule.items[].value_int', item.vendor, type='vendor', class='wi-wide') %] |
[% CASE 'business' %]
[% 'Type of Business' | $T8 %] |
[% 'is' | $T8 %] |
[% L.select_tag('price_rule.items[].value_int', SELF.businesses, title_key='description', default=item.value_int, class='wi-wide') %] |
[% CASE 'partsgroup' %]
[% 'Partsgroup' | $T8 %] |
[% 'is' | $T8 %] |
[% L.select_tag('price_rule.items[].value_int', SELF.partsgroups, title_key='partsgroup', default=item.value_int, class='wi-wide') %] |
[% CASE 'qty' %]
[% 'Quantity' | $T8 %] |
[% L.select_tag('price_rule.items[].op', num_compare_ops, default=item.op, class='wi-normal' ) %] |
[% L.input_tag('price_rule.items[].value_num_as_number', item.value_num_as_number, class='wi-small') %] |
[% CASE 'reqdate' %]
[% 'Reqdate' | $T8 %] |
[% L.select_tag('price_rule.items[].op', date_compare_ops, default=item.op, class='wi-normal') %] |
[% L.date_tag('price_rule.items[].value_date', item.value_date,, class='wi-date') %] |
[% CASE 'transdate' %]
[% 'Transdate Record' | $T8 %] |
[% L.select_tag('price_rule.items[].op', date_compare_ops, default=item.op, class='wi-normal') %] |
[% L.date_tag('price_rule.items[].value_date', item.value_date,, class='wi-date') %] |
[% CASE 'pricegroup' %]
[% 'Pricegroup' | $T8 %] |
[% 'is' | $T8 %] |
[% L.select_tag('price_rule.items[].value_int', SELF.pricegroups, title_key='pricegroup', default=item.value_int, class='wi-wide') %] |
[% CASE %]
[% END %]