1 [%- USE HTML -%][%- USE L -%][%- USE LxERP -%][%- USE T8 -%][%- USE P -%]
2 [%- SET id__ = cvar_cfg.id
3 name__ = 'filter.cvar.' _ id__
4 value__ = filter.cvar.$id__ %]
5 [%- IF cvar_cfg.type == 'bool' %]
6 [%- L.select_tag(name__, [ '', [ 1, LxERP.t8('Yes') ], [ 0, LxERP.t8('No') ] ], default=value__, class=cvar_class) %]
8 [%- ELSIF cvar_cfg.type == 'number' %]
9 [% L.select_tag(name__ _ '::', [ [ 'eq', '==' ], [ 'ne', '=/=' ], [ 'gt', '>' ], [ 'ge', '>=' ], [ 'lt', '<' ], [ 'le', '<=' ] ], default=filter.cvar.item(cvar_cfg.id _ '__')) %]
10 [% L.input_tag(name__, value__, class=cvar_class) %]
12 [%- ELSIF cvar_cfg.type == 'date' %]
13 [% L.select_tag(name__ _ '::', [ [ 'eq', '==' ], [ 'ne', '=/=' ], [ 'gt', '>' ], [ 'ge', '>=' ], [ 'lt', '<' ], [ 'le', '<=' ] ], default=filter.cvar.item(cvar_cfg.id _ '__')) %]
14 [% L.date_tag(name__, value__, class=cvar_class) %]
16 [% ELSIF cvar_cfg.type == 'select' %]
17 [% options__ = [ '' ];
18 options__ = options__.import(cvar_cfg.processed_options);
19 L.select_tag(name__, options__, default=value__, class=cvar_class) %]
21 [% ELSIF cvar_cfg.type == 'customer' %]
22 [%- P.customer_vendor.picker(name__, value__, type='customer', class=cvar_class) %]
24 [% ELSIF cvar_cfg.type == 'vendor' %]
25 [%- P.customer_vendor.picker(name__, value__, type='vendor', class=cvar_class) %]
27 [% ELSIF cvar_cfg.type == 'part' %]
28 [%- P.part.picker(name__, value__, class=cvar_class) %]
31 [% SET value_name__ = id__ _ '_substr__ilike'
32 value__ = filter.cvar.$value_name__ %]
33 [%- L.input_tag(name__ _ ':substr::ilike', value__, maxlength=cvar_cfg.maxlength, class=cvar_class) %]