checkbox checked if qte > 0
This commit is contained in:
parent
f17034592d
commit
cc90aa2457
@ -202,9 +202,10 @@
|
||||
%td.mask
|
||||
= qte_available
|
||||
%td.mask
|
||||
=check_box_tag :"p_product_ref_ids[]", plr.p_product_ref.id
|
||||
- default_qte = [bpa_qte - qte_available, 0].max
|
||||
=check_box_tag :"p_product_ref_ids[]", plr.p_product_ref.id, (true if default_qte > 0 )
|
||||
|
||||
=number_field_tag "qte[#{plr.p_product_ref.id}]", '', class: "small-input", value: ([bpa_qte - qte_available, 0].max), min: 0
|
||||
=number_field_tag "qte[#{plr.p_product_ref.id}]", '', class: "small-input", value: default_qte, min: 0
|
||||
|
||||
%td.mask
|
||||
= bpa_qte
|
||||
|
Reference in New Issue
Block a user