pre-fill Qté + tooltip

This commit is contained in:
Barnabé 2021-09-10 12:56:12 +02:00
parent f20dda1f15
commit 9a752ac1a7

View File

@ -104,6 +104,9 @@
Qté en stock Qté en stock
%th.mask %th.mask
Qté souhaité Qté souhaité
%span.info
=ic("info-circle")
%span.info-text-bottom BPA - Qté en stock
%th.mask BPA %th.mask BPA
%th.mask AV BPA %th.mask AV BPA
%th.mask PAS BPA %th.mask PAS BPA
@ -131,6 +134,9 @@
-ppr_lines = @price_lines.where(:p_product_ref_id => plr.p_product_ref.id) -ppr_lines = @price_lines.where(:p_product_ref_id => plr.p_product_ref.id)
%tr.ref_tr %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 -if checkbox
%td %td
@ -165,13 +171,12 @@
=ic(:hourglass) =ic(:hourglass)
=ppr_lines.asap_triage(20).last =ppr_lines.asap_triage(20).last
%td.mask %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 %td.mask
=text_field_tag "qte[#{plr.p_product_ref.id}]", '', class: "small-input" = bpa_qte
%td.mask
=ppr_lines.where(:cc_state => "BPA").sum(:qte).to_i
%td.mask %td.mask
=ppr_lines.where(:cc_state => "AV BPA").sum(:qte).to_i =ppr_lines.where(:cc_state => "AV BPA").sum(:qte).to_i
%td.mask %td.mask