chore: resolve conflict

This commit is contained in:
ruthra kumar
2023-08-23 12:57:00 +05:30
parent ab9da5281e
commit 4a4cba0715
3 changed files with 2 additions and 70 deletions

View File

@@ -189,16 +189,6 @@
"fieldtype": "Link",
"label": "Cost Center",
"options": "Cost Center"
<<<<<<< HEAD
=======
},
{
"depends_on": "eval:doc.party",
"fieldname": "default_advance_account",
"fieldtype": "Link",
"label": "Default Advance Account",
"mandatory_depends_on": "doc.party_type",
"options": "Account"
},
{
"fieldname": "invoice_name",
@@ -209,18 +199,13 @@
"fieldname": "payment_name",
"fieldtype": "Data",
"label": "Filter on Payment"
>>>>>>> 7a381affce (refactor: limit output to 50 in reconciliation tool)
}
],
"hide_toolbar": 1,
"icon": "icon-resize-horizontal",
"issingle": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-04-29 15:37:10.246831",
=======
"modified": "2023-08-15 05:35:50.109290",
>>>>>>> 7a381affce (refactor: limit output to 50 in reconciliation tool)
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
@@ -247,4 +232,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -58,25 +58,10 @@ class PaymentReconciliation(Document):
def get_payment_entries(self):
order_doctype = "Sales Order" if self.party_type == "Customer" else "Purchase Order"
<<<<<<< HEAD
condition = self.get_conditions(get_payments=True)
=======
condition = frappe._dict(
{
"company": self.get("company"),
"get_payments": True,
"cost_center": self.get("cost_center"),
"from_payment_date": self.get("from_payment_date"),
"to_payment_date": self.get("to_payment_date"),
"maximum_payment_amount": self.get("maximum_payment_amount"),
"minimum_payment_amount": self.get("minimum_payment_amount"),
}
)
if self.payment_name:
condition.update({"name": self.payment_name})
condition += "name like '%%{0}%%'".format(self.payment_name)
>>>>>>> 86bac2cf52 (refactor: filter on advance payments)
payment_entries = get_advance_payment_entries(
self.party_type,
self.party,

View File

@@ -2320,48 +2320,10 @@ def get_advance_payment_entries(
payment_entries_against_order, unallocated_payment_entries = [], []
limit_cond = "limit %s" % limit if limit else ""
<<<<<<< HEAD
if order_list or against_all_orders:
if order_list:
reference_condition = " and t2.reference_name in ({0})".format(
", ".join(["%s"] * len(order_list))
=======
if payment_type == "Receive":
q = q.select((payment_entry.source_exchange_rate).as_("exchange_rate"))
else:
q = q.select((payment_entry.target_exchange_rate).as_("exchange_rate"))
if condition:
if condition.get("name", None):
q = q.where(payment_entry.name.like(f"%{condition.get('name')}%"))
q = q.where(payment_entry.company == condition["company"])
q = (
q.where(payment_entry.posting_date >= condition["from_payment_date"])
if condition.get("from_payment_date")
else q
)
q = (
q.where(payment_entry.posting_date <= condition["to_payment_date"])
if condition.get("to_payment_date")
else q
)
if condition.get("get_payments") == True:
q = (
q.where(payment_entry.cost_center == condition["cost_center"])
if condition.get("cost_center")
else q
)
q = (
q.where(payment_entry.unallocated_amount >= condition["minimum_payment_amount"])
if condition.get("minimum_payment_amount")
else q
)
q = (
q.where(payment_entry.unallocated_amount <= condition["maximum_payment_amount"])
if condition.get("maximum_payment_amount")
else q
>>>>>>> 86bac2cf52 (refactor: filter on advance payments)
)
else:
reference_condition = ""