This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/app/views/public/p_orders/_warning.html.haml
2021-08-23 10:26:02 +02:00

24 lines
553 B
Plaintext

-style = style || ""
-tot = 0
-@p_customer_sheet.p_sheet_lines.each do |psl|
-psl.p_sheet_line_lines.each do |psll|
-psll.qte
-stock = 0
-stock = psll.p_product_stock.stock_th_ok if psll.p_product_stock.stock_th_ok > 0
-surplus = (stock - psll.qte.to_i)
-if surplus < 0
-tot += (surplus*-1)
-if tot > 0
.alert.alert-warning{:style => style}
=ic :warning
&nbsp;
Attention :
=tot
unité(s)
ne sont pas en stock. Notre équipe commerciale vous contactera pour vous indiquer une date de livraison.