pre-fill Qté + tooltip
This commit is contained in:
parent
f20dda1f15
commit
9a752ac1a7
@ -104,6 +104,9 @@
|
||||
Qté en stock
|
||||
%th.mask
|
||||
Qté souhaité
|
||||
%span.info
|
||||
=ic("info-circle")
|
||||
%span.info-text-bottom BPA - Qté en stock
|
||||
%th.mask BPA
|
||||
%th.mask AV BPA
|
||||
%th.mask PAS BPA
|
||||
@ -131,6 +134,9 @@
|
||||
|
||||
-ppr_lines = @price_lines.where(:p_product_ref_id => plr.p_product_ref.id)
|
||||
%tr.ref_tr
|
||||
- bpa_qte = ppr_lines.where(:cc_state => "BPA").sum(:qte).to_i
|
||||
- qte_available = LineStock.where(p_product_ref_id: plr.p_product_ref.id).sum(:qte_available).to_i
|
||||
|
||||
-if checkbox
|
||||
%td
|
||||
|
||||
@ -165,13 +171,12 @@
|
||||
=ic(:hourglass)
|
||||
=ppr_lines.asap_triage(20).last
|
||||
%td.mask
|
||||
= LineStock.where(p_product_ref_id: plr.p_product_ref.id).sum(:qte_available).to_i
|
||||
= qte_available
|
||||
%td.mask
|
||||
=number_field_tag "qte[#{plr.p_product_ref.id}]", '', class: "small-input", value: (bpa_qte - qte_available)
|
||||
|
||||
%td.mask
|
||||
=text_field_tag "qte[#{plr.p_product_ref.id}]", '', class: "small-input"
|
||||
|
||||
%td.mask
|
||||
=ppr_lines.where(:cc_state => "BPA").sum(:qte).to_i
|
||||
= bpa_qte
|
||||
%td.mask
|
||||
=ppr_lines.where(:cc_state => "AV BPA").sum(:qte).to_i
|
||||
%td.mask
|
||||
|
Reference in New Issue
Block a user