fix: POS change amount gl entry with no amount (#37799)
fix: POS change amount gl entry with no amount (#37799) (cherry picked from commit 2b02ef00664b12812a99059bd9a29827231fdd94) Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
parent
e71ef10ca9
commit
fd7a768535
@ -1019,7 +1019,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
def make_customer_gl_entry(self, gl_entries):
|
def make_customer_gl_entry(self, gl_entries):
|
||||||
# Checked both rounding_adjustment and rounded_total
|
# Checked both rounding_adjustment and rounded_total
|
||||||
# because rounded_total had value even before introcution of posting GLE based on rounded total
|
# because rounded_total had value even before introduction of posting GLE based on rounded total
|
||||||
grand_total = (
|
grand_total = (
|
||||||
self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
|
self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
|
||||||
)
|
)
|
||||||
@ -1267,7 +1267,7 @@ class SalesInvoice(SellingController):
|
|||||||
if skip_change_gl_entries and payment_mode.account == self.account_for_change_amount:
|
if skip_change_gl_entries and payment_mode.account == self.account_for_change_amount:
|
||||||
payment_mode.base_amount -= flt(self.change_amount)
|
payment_mode.base_amount -= flt(self.change_amount)
|
||||||
|
|
||||||
if payment_mode.amount:
|
if payment_mode.base_amount:
|
||||||
# POS, make payment entries
|
# POS, make payment entries
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict(
|
self.get_gl_dict(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user