From 4bbad7f44819bb9a2db2163879fb8cedfcd83871 Mon Sep 17 00:00:00 2001 From: viralkansodiya15 <98073516+viralpatel15@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:45:47 +0530 Subject: [PATCH] fix: set docstatus filter to ignore cancel document --- .../stock/doctype/landed_cost_voucher/landed_cost_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index 7f0dc2df9f..5e35c16365 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -205,7 +205,7 @@ class LandedCostVoucher(Document): ) docs = frappe.db.get_all( "Asset", - filters={receipt_document_type: item.receipt_document, "item_code": item.item_code}, + filters={receipt_document_type: item.receipt_document, "item_code": item.item_code, "docstatus":['!=', 2]}, fields=["name", "docstatus"], ) if not docs or len(docs) != item.qty: