suite
This commit is contained in:
parent
e30eb4f6e3
commit
4860ad1290
@ -188,7 +188,7 @@ class PCustomer < ActiveRecord::Base
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.update_caches
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class PPaymentDocument < ActiveRecord::Base
|
|||||||
|
|
||||||
if sum.round(2) > self.p_document.totals[:total_ttc].to_f.round(2)
|
if sum.round(2) > self.p_document.totals[:total_ttc].to_f.round(2)
|
||||||
|
|
||||||
errors.add(:amount, "Ne doit pas dépasser le montant de la somme restant dues (#{self.p_document.totals[:total_ttc].to_f - siblings_payments_total})")
|
errors.add(:amount, "Ne doit pas dépasser le montant de la somme restant dues (#{(self.p_document.totals[:total_ttc].to_f.round(2) - siblings_payments_total.to_f.round(2)).round(2)})")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user