Rounding in totals calculation
This commit is contained in:
@@ -216,17 +216,17 @@ class SellingController(StockController):
|
||||
self.round_floats_in(self, ["net_total", "net_total_export"])
|
||||
|
||||
def calculate_totals(self):
|
||||
self.grand_total = flt(self.tax_doclist and \
|
||||
self.tax_doclist[-1].total or self.net_total, self.precision("grand_total"))
|
||||
self.grand_total_export = flt(self.grand_total / self.conversion_rate,
|
||||
self.precision("grand_total_export"))
|
||||
self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total)
|
||||
|
||||
self.other_charges_total = flt(self.grand_total - self.net_total,
|
||||
self.precision("other_charges_total"))
|
||||
self.grand_total_export = flt(self.grand_total / self.conversion_rate)
|
||||
|
||||
self.other_charges_total_export = flt(self.grand_total_export -
|
||||
self.net_total_export + flt(self.discount_amount),
|
||||
self.precision("other_charges_total_export"))
|
||||
self.other_charges_total = flt(self.grand_total - self.net_total, self.precision("other_charges_total"))
|
||||
|
||||
self.other_charges_total_export = flt(self.grand_total_export - self.net_total_export +
|
||||
flt(self.discount_amount), self.precision("other_charges_total_export"))
|
||||
|
||||
self.grand_total = flt(self.grand_total, self.precision("grand_total"))
|
||||
self.grand_total_export = flt(self.grand_total_export, self.precision("grand_total_export"))
|
||||
|
||||
self.rounded_total = rounded(self.grand_total)
|
||||
self.rounded_total_export = rounded(self.grand_total_export)
|
||||
|
||||
Reference in New Issue
Block a user