chore: resolve conflicts
This commit is contained in:
@@ -482,17 +482,12 @@ def reconcile_against_document(
|
|||||||
entry.update({"referenced_row": referenced_row})
|
entry.update({"referenced_row": referenced_row})
|
||||||
doc.make_exchange_gain_loss_journal([entry], dimensions_dict)
|
doc.make_exchange_gain_loss_journal([entry], dimensions_dict)
|
||||||
else:
|
else:
|
||||||
<<<<<<< HEAD
|
|
||||||
update_reference_in_payment_entry(
|
|
||||||
entry, doc, do_not_save=True, skip_ref_details_update_for_pe=skip_ref_details_update_for_pe
|
|
||||||
=======
|
|
||||||
referenced_row = update_reference_in_payment_entry(
|
referenced_row = update_reference_in_payment_entry(
|
||||||
entry,
|
entry,
|
||||||
doc,
|
doc,
|
||||||
do_not_save=True,
|
do_not_save=True,
|
||||||
skip_ref_details_update_for_pe=skip_ref_details_update_for_pe,
|
skip_ref_details_update_for_pe=skip_ref_details_update_for_pe,
|
||||||
dimensions_dict=dimensions_dict,
|
dimensions_dict=dimensions_dict,
|
||||||
>>>>>>> c44eb432a5 (refactor: pass dimension values to Gain/Loss journal)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
doc.save(ignore_permissions=True)
|
doc.save(ignore_permissions=True)
|
||||||
@@ -653,11 +648,8 @@ def update_reference_in_payment_entry(
|
|||||||
if d.difference_amount is not None
|
if d.difference_amount is not None
|
||||||
else payment_entry.get_exchange_rate(),
|
else payment_entry.get_exchange_rate(),
|
||||||
"exchange_gain_loss": d.difference_amount,
|
"exchange_gain_loss": d.difference_amount,
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
"account": d.account,
|
"account": d.account,
|
||||||
"dimensions": d.dimensions,
|
"dimensions": d.dimensions,
|
||||||
>>>>>>> 5dc22e1811 (refactor: pass dimension details to query)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.voucher_detail_no:
|
if d.voucher_detail_no:
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ import json
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _, bold, qb, throw
|
from frappe import _, bold, qb, throw
|
||||||
from frappe.model.workflow import get_workflow_name, is_transition_condition_satisfied
|
from frappe.model.workflow import get_workflow_name, is_transition_condition_satisfied
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
from frappe.query_builder import Criterion
|
|
||||||
from frappe.query_builder.custom import ConstantColumn
|
|
||||||
>>>>>>> ff60ec85b8 (refactor: pass dimension filters to query)
|
|
||||||
from frappe.query_builder.functions import Abs, Sum
|
from frappe.query_builder.functions import Abs, Sum
|
||||||
from frappe.utils import (
|
from frappe.utils import (
|
||||||
add_days,
|
add_days,
|
||||||
@@ -2558,7 +2553,6 @@ def get_advance_payment_entries(
|
|||||||
payment_entries_against_order, unallocated_payment_entries = [], []
|
payment_entries_against_order, unallocated_payment_entries = [], []
|
||||||
limit_cond = "limit %s" % limit if limit else ""
|
limit_cond = "limit %s" % limit if limit else ""
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if order_list or against_all_orders:
|
if order_list or against_all_orders:
|
||||||
if order_list:
|
if order_list:
|
||||||
reference_condition = " and t2.reference_name in ({0})".format(
|
reference_condition = " and t2.reference_name in ({0})".format(
|
||||||
@@ -2567,45 +2561,6 @@ def get_advance_payment_entries(
|
|||||||
else:
|
else:
|
||||||
reference_condition = ""
|
reference_condition = ""
|
||||||
order_list = []
|
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:
|
|
||||||
# conditions should be built as an array and passed as Criterion
|
|
||||||
common_filter_conditions = []
|
|
||||||
|
|
||||||
common_filter_conditions.append(payment_entry.company == condition["company"])
|
|
||||||
if condition.get("name", None):
|
|
||||||
common_filter_conditions.append(payment_entry.name.like(f"%{condition.get('name')}%"))
|
|
||||||
|
|
||||||
if condition.get("from_payment_date"):
|
|
||||||
common_filter_conditions.append(payment_entry.posting_date.gte(condition["from_payment_date"]))
|
|
||||||
|
|
||||||
if condition.get("to_payment_date"):
|
|
||||||
common_filter_conditions.append(payment_entry.posting_date.lte(condition["to_payment_date"]))
|
|
||||||
|
|
||||||
if condition.get("get_payments") == True:
|
|
||||||
if condition.get("cost_center"):
|
|
||||||
common_filter_conditions.append(payment_entry.cost_center == condition["cost_center"])
|
|
||||||
|
|
||||||
if condition.get("accounting_dimensions"):
|
|
||||||
for field, val in condition.get("accounting_dimensions").items():
|
|
||||||
common_filter_conditions.append(payment_entry[field] == val)
|
|
||||||
|
|
||||||
if condition.get("minimum_payment_amount"):
|
|
||||||
common_filter_conditions.append(
|
|
||||||
payment_entry.unallocated_amount.gte(condition["minimum_payment_amount"])
|
|
||||||
)
|
|
||||||
|
|
||||||
if condition.get("maximum_payment_amount"):
|
|
||||||
common_filter_conditions.append(
|
|
||||||
payment_entry.unallocated_amount.lte(condition["maximum_payment_amount"])
|
|
||||||
)
|
|
||||||
q = q.where(Criterion.all(common_filter_conditions))
|
|
||||||
>>>>>>> ff60ec85b8 (refactor: pass dimension filters to query)
|
|
||||||
|
|
||||||
payment_name_filter = ""
|
payment_name_filter = ""
|
||||||
if payment_name:
|
if payment_name:
|
||||||
|
|||||||
Reference in New Issue
Block a user