mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 07:22:13 +00:00
fix: ledger entries for pos return with update outstanding for self
(cherry picked from commit 2cd9b28e5b)
This commit is contained in:
@@ -1479,6 +1479,10 @@ 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)
|
||||||
|
|
||||||
|
against_voucher = self.name
|
||||||
|
if self.is_return and self.return_against and not self.update_outstanding_for_self:
|
||||||
|
against_voucher = self.return_against
|
||||||
|
|
||||||
if payment_mode.base_amount:
|
if payment_mode.base_amount:
|
||||||
# POS, make payment entries
|
# POS, make payment entries
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
@@ -1492,7 +1496,7 @@ class SalesInvoice(SellingController):
|
|||||||
"credit_in_account_currency": payment_mode.base_amount
|
"credit_in_account_currency": payment_mode.base_amount
|
||||||
if self.party_account_currency == self.company_currency
|
if self.party_account_currency == self.company_currency
|
||||||
else payment_mode.amount,
|
else payment_mode.amount,
|
||||||
"against_voucher": self.name,
|
"against_voucher": against_voucher,
|
||||||
"against_voucher_type": self.doctype,
|
"against_voucher_type": self.doctype,
|
||||||
"cost_center": self.cost_center,
|
"cost_center": self.cost_center,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user