mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
refactor: reference update logic in advance
(cherry picked from commit a112581acd)
This commit is contained in:
@@ -1215,18 +1215,26 @@ class PaymentEntry(AccountsController):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.book_advance_payments_in_separate_party_account and d.reference_doctype in [
|
if self.book_advance_payments_in_separate_party_account:
|
||||||
"Sales Order",
|
if d.reference_doctype in [
|
||||||
"Purchase Order",
|
"Sales Order",
|
||||||
]:
|
"Purchase Order",
|
||||||
|
]:
|
||||||
|
gle.update(
|
||||||
|
{
|
||||||
|
"against_voucher_type": d.reference_doctype,
|
||||||
|
"against_voucher": d.reference_name,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
|
||||||
|
else:
|
||||||
gle.update(
|
gle.update(
|
||||||
{
|
{
|
||||||
"against_voucher_type": d.reference_doctype,
|
"against_voucher_type": d.reference_doctype,
|
||||||
"against_voucher": d.reference_name,
|
"against_voucher": d.reference_name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
|
|
||||||
|
|
||||||
gl_entries.append(gle)
|
gl_entries.append(gle)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user