mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
chore: fix conflicts
Removed redundant calculation of billed quantity and adjusted logic for billed amount based on purchase order.
This commit is contained in:
@@ -1138,12 +1138,8 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate
|
|||||||
billed_qty_amt = frappe._dict()
|
billed_qty_amt = frappe._dict()
|
||||||
|
|
||||||
if adjust_incoming_rate:
|
if adjust_incoming_rate:
|
||||||
<<<<<<< HEAD
|
|
||||||
item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc)
|
|
||||||
=======
|
|
||||||
billed_qty_amt = get_billed_qty_amount_against_purchase_receipt(pr_doc)
|
billed_qty_amt = get_billed_qty_amount_against_purchase_receipt(pr_doc)
|
||||||
billed_qty_amt_based_on_po = get_billed_qty_amount_against_purchase_order(pr_doc)
|
billed_qty_amt_based_on_po = get_billed_qty_amount_against_purchase_order(pr_doc)
|
||||||
>>>>>>> a953709640 (fix: GL entries for different exchange rate in the purchase invoice)
|
|
||||||
|
|
||||||
for item in pr_doc.items:
|
for item in pr_doc.items:
|
||||||
returned_qty = flt(item_wise_returned_qty.get(item.name))
|
returned_qty = flt(item_wise_returned_qty.get(item.name))
|
||||||
@@ -1172,13 +1168,6 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate
|
|||||||
if (
|
if (
|
||||||
item.billed_amt is not None
|
item.billed_amt is not None
|
||||||
and item.amount is not None
|
and item.amount is not None
|
||||||
<<<<<<< HEAD
|
|
||||||
and item_wise_billed_qty.get(item.name)
|
|
||||||
):
|
|
||||||
adjusted_amt = (
|
|
||||||
flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate)
|
|
||||||
) * item.qty
|
|
||||||
=======
|
|
||||||
and (
|
and (
|
||||||
billed_qty_amt.get(item.name) or billed_qty_amt_based_on_po.get(item.purchase_order_item)
|
billed_qty_amt.get(item.name) or billed_qty_amt_based_on_po.get(item.purchase_order_item)
|
||||||
)
|
)
|
||||||
@@ -1202,7 +1191,6 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate
|
|||||||
total_billed_qty = (
|
total_billed_qty = (
|
||||||
billed_qty_amt_based_on_po.get(item.purchase_order_item).get("qty") + qty
|
billed_qty_amt_based_on_po.get(item.purchase_order_item).get("qty") + qty
|
||||||
)
|
)
|
||||||
>>>>>>> a953709640 (fix: GL entries for different exchange rate in the purchase invoice)
|
|
||||||
|
|
||||||
if total_billed_qty:
|
if total_billed_qty:
|
||||||
billed_amt = flt(
|
billed_amt = flt(
|
||||||
@@ -1282,8 +1270,6 @@ def get_billed_qty_amount_against_purchase_receipt(pr_doc):
|
|||||||
return billed_qty_amt
|
return billed_qty_amt
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
def get_billed_qty_amount_against_purchase_order(pr_doc):
|
def get_billed_qty_amount_against_purchase_order(pr_doc):
|
||||||
po_names = list(
|
po_names = list(
|
||||||
set(
|
set(
|
||||||
@@ -1327,7 +1313,6 @@ def get_billed_qty_amount_against_purchase_order(pr_doc):
|
|||||||
return invoice_data_po_based
|
return invoice_data_po_based
|
||||||
|
|
||||||
|
|
||||||
>>>>>>> a953709640 (fix: GL entries for different exchange rate in the purchase invoice)
|
|
||||||
def adjust_incoming_rate_for_pr(doc):
|
def adjust_incoming_rate_for_pr(doc):
|
||||||
doc.update_valuation_rate(reset_outgoing_rate=False)
|
doc.update_valuation_rate(reset_outgoing_rate=False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user