show amount
This commit is contained in:
parent
6751e34f29
commit
bb8c841404
@ -546,38 +546,36 @@ class PriceLine < ApplicationRecord
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def ca_tot_amount_ht
|
||||
if ct_tot_amount_ht
|
||||
if self.ct_tot_amount_ht
|
||||
self.ct_tot_amount_ht
|
||||
else
|
||||
(self.ca_price_u_kg_net_ht * self.weight_qte.to_f).round(2)
|
||||
(self.ca_price_u_ht * self.qte.to_f).round(3)
|
||||
end
|
||||
end
|
||||
|
||||
def ca_tot_amount_tva
|
||||
(self.tot_amount_ht * (self.tva_account_value/100)).round(2)
|
||||
(self.tot_amount_ht * (self.tva_account_value/100)).round(3)
|
||||
end
|
||||
|
||||
def ca_tot_amount_ttc
|
||||
(self.tot_amount_ht + self.tot_amount_tva).round(2)
|
||||
(self.tot_amount_ht + self.tot_amount_tva).round(3)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def ca_tot_discount_ht
|
||||
(self.ca_price_u_ht * self.qte.to_f).round(2) - self.ca_tot_amount_ht
|
||||
(self.ca_price_u_ht * self.qte.to_f).round(3) - self.ca_tot_amount_ht
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def ca_tot_discount_tva
|
||||
(self.tot_discount_ht * (self.tva_account_value/100)).round(2)
|
||||
(self.tot_discount_ht * (self.tva_account_value/100)).round(3)
|
||||
end
|
||||
|
||||
def ca_tot_discount_ttc
|
||||
(self.tot_discount_ht+self.tot_discount_tva).round(2)
|
||||
(self.tot_discount_ht+self.tot_discount_tva).round(3)
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user