Skip to content

Commit

Permalink
fix: POS change amount gl entry with no amount (#37799)
Browse files Browse the repository at this point in the history
fix: POS change amount gl entry with no amount (#37799)

(cherry picked from commit 2b02ef0)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
  • Loading branch information
mergify[bot] and deepeshgarg007 authored Nov 5, 2023
1 parent e71ef10 commit fd7a768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def get_gl_entries(self, warehouse_account=None):

def make_customer_gl_entry(self, gl_entries):
# 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 = (
self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
)
Expand Down Expand Up @@ -1267,7 +1267,7 @@ def make_pos_gl_entries(self, gl_entries):
if skip_change_gl_entries and payment_mode.account == self.account_for_change_amount:
payment_mode.base_amount -= flt(self.change_amount)

if payment_mode.amount:
if payment_mode.base_amount:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict(
Expand Down

0 comments on commit fd7a768

Please sign in to comment.