Merge pull request #38542 from frappe/mergify/bp/version-15-hotfix/pr-38148
refactor: convert Payment Reconciliation to virtual doctype (backport #38148)
This commit is contained in:
commit
d8f9e3a8b1
@ -212,9 +212,10 @@
|
||||
],
|
||||
"hide_toolbar": 1,
|
||||
"icon": "icon-resize-horizontal",
|
||||
"is_virtual": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2023-08-15 05:35:50.109290",
|
||||
"modified": "2023-11-17 17:33:55.701726",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Reconciliation",
|
||||
@ -239,6 +240,5 @@
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
"states": []
|
||||
}
|
@ -71,6 +71,58 @@ class PaymentReconciliation(Document):
|
||||
self.accounting_dimension_filter_conditions = []
|
||||
self.ple_posting_date_filter = []
|
||||
|
||||
def load_from_db(self):
|
||||
# 'modified' attribute is required for `run_doc_method` to work properly.
|
||||
doc_dict = frappe._dict(
|
||||
{
|
||||
"modified": None,
|
||||
"company": None,
|
||||
"party": None,
|
||||
"party_type": None,
|
||||
"receivable_payable_account": None,
|
||||
"default_advance_account": None,
|
||||
"from_invoice_date": None,
|
||||
"to_invoice_date": None,
|
||||
"invoice_limit": 50,
|
||||
"from_payment_date": None,
|
||||
"to_payment_date": None,
|
||||
"payment_limit": 50,
|
||||
"minimum_invoice_amount": None,
|
||||
"minimum_payment_amount": None,
|
||||
"maximum_invoice_amount": None,
|
||||
"maximum_payment_amount": None,
|
||||
"bank_cash_account": None,
|
||||
"cost_center": None,
|
||||
"payment_name": None,
|
||||
"invoice_name": None,
|
||||
}
|
||||
)
|
||||
super(Document, self).__init__(doc_dict)
|
||||
|
||||
def save(self):
|
||||
return
|
||||
|
||||
@staticmethod
|
||||
def get_list(args):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def get_count(args):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def get_stats(args):
|
||||
pass
|
||||
|
||||
def db_insert(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def db_update(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def delete(self):
|
||||
pass
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_unreconciled_entries(self):
|
||||
self.get_nonreconciled_payment_entries()
|
||||
|
@ -153,9 +153,10 @@
|
||||
"options": "Cost Center"
|
||||
}
|
||||
],
|
||||
"is_virtual": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-09-03 07:52:33.684217",
|
||||
"modified": "2023-11-17 17:33:38.612615",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Reconciliation Allocation",
|
||||
|
@ -71,9 +71,10 @@
|
||||
"label": "Exchange Rate"
|
||||
}
|
||||
],
|
||||
"is_virtual": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-11-08 18:18:02.502149",
|
||||
"modified": "2023-11-17 17:33:45.455166",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Reconciliation Invoice",
|
||||
|
@ -107,9 +107,10 @@
|
||||
"options": "Cost Center"
|
||||
}
|
||||
],
|
||||
"is_virtual": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-09-03 07:43:29.965353",
|
||||
"modified": "2023-11-17 17:33:34.818530",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Reconciliation Payment",
|
||||
|
@ -342,9 +342,8 @@ erpnext.patches.v14_0.create_accounting_dimensions_in_sales_order_item
|
||||
erpnext.patches.v15_0.update_sre_from_voucher_details
|
||||
erpnext.patches.v14_0.rename_over_order_allowance_field
|
||||
erpnext.patches.v14_0.migrate_delivery_stop_lock_field
|
||||
execute:frappe.db.set_single_value("Payment Reconciliation", "invoice_limit", 50)
|
||||
execute:frappe.db.set_single_value("Payment Reconciliation", "payment_limit", 50)
|
||||
erpnext.patches.v14_0.add_default_for_repost_settings
|
||||
erpnext.patches.v14_0.clear_reconciliation_values_from_singles
|
||||
erpnext.patches.v15_0.rename_daily_depreciation_to_depreciation_amount_based_on_num_days_in_month
|
||||
erpnext.patches.v15_0.rename_depreciation_amount_based_on_num_days_in_month_to_daily_prorata_based
|
||||
erpnext.patches.v15_0.set_reserved_stock_in_bin
|
||||
|
@ -0,0 +1,17 @@
|
||||
from frappe import qb
|
||||
|
||||
|
||||
def execute():
|
||||
"""
|
||||
Clear `tabSingles` and Payment Reconciliation tables of values
|
||||
"""
|
||||
singles = qb.DocType("Singles")
|
||||
qb.from_(singles).delete().where(singles.doctype == "Payment Reconciliation").run()
|
||||
doctypes = [
|
||||
"Payment Reconciliation Invoice",
|
||||
"Payment Reconciliation Payment",
|
||||
"Payment Reconciliation Allocation",
|
||||
]
|
||||
for x in doctypes:
|
||||
dt = qb.DocType(x)
|
||||
qb.from_(dt).delete().run()
|
Loading…
x
Reference in New Issue
Block a user