mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 23:33:43 +00:00
fix: GL entries for rejected returned materials (#47612)
(cherry picked from commit 3e098da01f)
This commit is contained in:
@@ -499,9 +499,7 @@ class PurchaseReceipt(BuyingController):
|
||||
if item.get("rejected_qty") and frappe.db.get_single_value(
|
||||
"Buying Settings", "set_valuation_rate_for_rejected_materials"
|
||||
):
|
||||
outgoing_amount += abs(
|
||||
get_stock_value_difference(self.name, item.name, item.rejected_warehouse)
|
||||
)
|
||||
outgoing_amount += get_stock_value_difference(self.name, item.name, item.rejected_warehouse)
|
||||
credit_amount = outgoing_amount
|
||||
|
||||
if credit_amount:
|
||||
@@ -640,9 +638,7 @@ class PurchaseReceipt(BuyingController):
|
||||
if item.get("rejected_qty") and frappe.db.get_single_value(
|
||||
"Buying Settings", "set_valuation_rate_for_rejected_materials"
|
||||
):
|
||||
rejected_item_cost = abs(
|
||||
get_stock_value_difference(self.name, item.name, item.rejected_warehouse)
|
||||
)
|
||||
rejected_item_cost = get_stock_value_difference(self.name, item.name, item.rejected_warehouse)
|
||||
divisional_loss -= rejected_item_cost
|
||||
|
||||
if divisional_loss:
|
||||
|
||||
Reference in New Issue
Block a user