mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
fix: link Purchase Invoice and Receipt Items to Asset
This commit is contained in:
@@ -837,7 +837,11 @@ class PurchaseReceipt(BuyingController):
|
||||
def update_assets(self, item, valuation_rate):
|
||||
assets = frappe.db.get_all(
|
||||
"Asset",
|
||||
filters={"purchase_receipt": self.name, "item_code": item.item_code},
|
||||
filters={
|
||||
"purchase_receipt": self.name,
|
||||
"item_code": item.item_code,
|
||||
"purchase_receipt_item": ("in", [item.name, ""]),
|
||||
},
|
||||
fields=["name", "asset_quantity"],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user