mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 19:24:21 +00:00
perf: add composite indexes to Advance Payment Ledger Entry table
(cherry picked from commit 7fcf277055)
This commit is contained in:
@@ -82,7 +82,7 @@
|
|||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-07-29 11:37:42.678556",
|
"modified": "2025-10-13 13:23:21.205945",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Advance Payment Ledger Entry",
|
"name": "Advance Payment Ledger Entry",
|
||||||
@@ -116,6 +116,7 @@
|
|||||||
"share": 1
|
"share": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 1,
|
||||||
"row_format": "Dynamic",
|
"row_format": "Dynamic",
|
||||||
"sort_field": "creation",
|
"sort_field": "creation",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
|||||||
@@ -34,3 +34,15 @@ class AdvancePaymentLedgerEntry(Document):
|
|||||||
and not frappe.flags.is_reverse_depr_entry
|
and not frappe.flags.is_reverse_depr_entry
|
||||||
):
|
):
|
||||||
update_voucher_outstanding(self.against_voucher_type, self.against_voucher_no, None, None, None)
|
update_voucher_outstanding(self.against_voucher_type, self.against_voucher_no, None, None, None)
|
||||||
|
|
||||||
|
|
||||||
|
def on_doctype_update():
|
||||||
|
frappe.db.add_index(
|
||||||
|
"Advance Payment Ledger Entry",
|
||||||
|
["against_voucher_type", "against_voucher_no"],
|
||||||
|
)
|
||||||
|
|
||||||
|
frappe.db.add_index(
|
||||||
|
"Advance Payment Ledger Entry",
|
||||||
|
["voucher_type", "voucher_no"],
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user