fix: internal Purchase Receipt GL Entries
This commit is contained in:
parent
a7c5b33c9f
commit
6fca9adcd4
@ -380,7 +380,19 @@ class PurchaseReceipt(BuyingController):
|
||||
|
||||
outgoing_amount = d.base_net_amount
|
||||
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
|
||||
|
||||
if credit_amount:
|
||||
|
Loading…
x
Reference in New Issue
Block a user