Merge pull request #38148 from ruthra-kumar/prevent_lock_on_reconciliation
refactor: convert Payment Reconciliation to virtual doctype
This commit is contained in:
commit
880a85d2af
@ -212,9 +212,10 @@
|
|||||||
],
|
],
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"icon": "icon-resize-horizontal",
|
"icon": "icon-resize-horizontal",
|
||||||
|
"is_virtual": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-08-15 05:35:50.109290",
|
"modified": "2023-11-17 17:33:55.701726",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation",
|
"name": "Payment Reconciliation",
|
||||||
@ -239,6 +240,5 @@
|
|||||||
],
|
],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": [],
|
"states": []
|
||||||
"track_changes": 1
|
|
||||||
}
|
}
|
@ -29,6 +29,58 @@ class PaymentReconciliation(Document):
|
|||||||
self.accounting_dimension_filter_conditions = []
|
self.accounting_dimension_filter_conditions = []
|
||||||
self.ple_posting_date_filter = []
|
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()
|
@frappe.whitelist()
|
||||||
def get_unreconciled_entries(self):
|
def get_unreconciled_entries(self):
|
||||||
self.get_nonreconciled_payment_entries()
|
self.get_nonreconciled_payment_entries()
|
||||||
|
@ -159,9 +159,10 @@
|
|||||||
"label": "Difference Posting Date"
|
"label": "Difference Posting Date"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"is_virtual": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-10-23 10:44:56.066303",
|
"modified": "2023-11-17 17:33:38.612615",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Allocation",
|
"name": "Payment Reconciliation Allocation",
|
||||||
|
@ -71,9 +71,10 @@
|
|||||||
"label": "Exchange Rate"
|
"label": "Exchange Rate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"is_virtual": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-11-08 18:18:02.502149",
|
"modified": "2023-11-17 17:33:45.455166",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Invoice",
|
"name": "Payment Reconciliation Invoice",
|
||||||
|
@ -107,9 +107,10 @@
|
|||||||
"options": "Cost Center"
|
"options": "Cost Center"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"is_virtual": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-09-03 07:43:29.965353",
|
"modified": "2023-11-17 17:33:34.818530",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Payment",
|
"name": "Payment Reconciliation Payment",
|
||||||
|
@ -344,9 +344,8 @@ erpnext.patches.v14_0.create_accounting_dimensions_in_sales_order_item
|
|||||||
erpnext.patches.v15_0.update_sre_from_voucher_details
|
erpnext.patches.v15_0.update_sre_from_voucher_details
|
||||||
erpnext.patches.v14_0.rename_over_order_allowance_field
|
erpnext.patches.v14_0.rename_over_order_allowance_field
|
||||||
erpnext.patches.v14_0.migrate_delivery_stop_lock_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.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_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.rename_depreciation_amount_based_on_num_days_in_month_to_daily_prorata_based
|
||||||
erpnext.patches.v15_0.set_reserved_stock_in_bin
|
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