Problème stocks
This commit is contained in:
parent
c870d58122
commit
cb88543c41
@ -99,7 +99,7 @@ class LineStock < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def ca_price_u_kg_ht
|
def ca_price_u_kg_ht
|
||||||
if self.qte_kg_per_unit != 0.0
|
if self.qte_kg_per_unit.to_f != 0.0
|
||||||
(self.price_u_ht.to_f / self.qte_kg_per_unit).round(2)
|
(self.price_u_ht.to_f / self.qte_kg_per_unit).round(2)
|
||||||
else
|
else
|
||||||
0.0
|
0.0
|
||||||
@ -116,7 +116,7 @@ class LineStock < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def ca_qte_kg
|
def ca_qte_kg
|
||||||
self.qte * self.qte_kg_per_unit
|
self.qte.to_f * self.qte_kg_per_unit.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@
|
|||||||
%td
|
%td
|
||||||
= form.input :qte, :label => "qte :", :input_html => {:class => "input_price_line_qte"}
|
= form.input :qte, :label => "qte :", :input_html => {:class => "input_price_line_qte"}
|
||||||
|
|
||||||
|
-if false
|
||||||
%td
|
%td
|
||||||
= form.input :dluo, :label => "DLUO :", :input_html => {:class => ""}, :as => :date
|
= form.input :dluo, :label => "DLUO :", :input_html => {:class => ""}, :as => :date
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user