Skip to content

Commit

Permalink
fix: set docstatus filter to ignore cancel document
Browse files Browse the repository at this point in the history
  • Loading branch information
viralpatel15 authored Oct 26, 2023
1 parent 74b6bfb commit 4bbad7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def validate_asset_qty_and_status(self, receipt_document_type, receipt_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:
Expand Down

0 comments on commit 4bbad7f

Please sign in to comment.