fix: internal Purchase Receipt GL Entries
(cherry picked from commit 6fca9adcd4)
This commit is contained in:
@@ -380,7 +380,19 @@ class PurchaseReceipt(BuyingController):
|
|||||||
|
|
||||||
outgoing_amount = d.base_net_amount
|
outgoing_amount = d.base_net_amount
|
||||||
if self.is_internal_supplier and d.valuation_rate:
|
if self.is_internal_supplier and d.valuation_rate:
|
||||||
outgoing_amount = d.valuation_rate * d.stock_qty
|
outgoing_amount = abs(
|
||||||
|
frappe.db.get_value(
|
||||||
|
"Stock Ledger Entry",
|
||||||
|
{
|
||||||
|
"voucher_type": "Purchase Receipt",
|
||||||
|
"voucher_no": self.name,
|
||||||
|
"voucher_detail_no": d.name,
|
||||||
|
"warehouse": d.from_warehouse,
|
||||||
|
"is_cancelled": 0,
|
||||||
|
},
|
||||||
|
"stock_value_difference",
|
||||||
|
)
|
||||||
|
)
|
||||||
credit_amount = outgoing_amount
|
credit_amount = outgoing_amount
|
||||||
|
|
||||||
if credit_amount:
|
if credit_amount:
|
||||||
|
|||||||
Reference in New Issue
Block a user