fix(gle): GL Entry for invoices before introduction of rounding_adjustment (#15732)

This commit is contained in:
Nabin Hait 2018-10-18 16:48:28 +05:30 committed by GitHub
parent bbd8b04012
commit 500ddc94c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -363,7 +363,10 @@ class PurchaseInvoice(BuyingController):
return gl_entries
def make_supplier_gl_entry(self, gl_entries):
grand_total = self.rounded_total or self.grand_total
# Checked both rounding_adjustment and rounded_total
# because rounded_total had value even before introcution of posting GLE based on rounded total
grand_total = self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
if grand_total:
# Didnot use base_grand_total to book rounding loss gle
grand_total_in_company_currency = flt(grand_total * self.conversion_rate,

View File

@ -641,7 +641,9 @@ class SalesInvoice(SellingController):
return gl_entries
def make_customer_gl_entry(self, gl_entries):
grand_total = self.rounded_total or self.grand_total
# Checked both rounding_adjustment and rounded_total
# because rounded_total had value even before introcution of posting GLE based on rounded total
grand_total = self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
if grand_total:
# Didnot use base_grand_total to book rounding loss gle
grand_total_in_company_currency = flt(grand_total * self.conversion_rate,