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
(cherry picked from commit 2b02ef0)
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed Nov 5, 2023
1 parent 05fed9e commit 641a2d4
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 @@ -1036,7 +1036,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 @@ -1271,7 +1271,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 641a2d4

Please sign in to comment.