diff --git a/inn/overrides/erpnext/accounts/purchase_order/purchase_order.py b/inn/overrides/erpnext/accounts/purchase_order/purchase_order.py index ad8fcda..fe06cf9 100644 --- a/inn/overrides/erpnext/accounts/purchase_order/purchase_order.py +++ b/inn/overrides/erpnext/accounts/purchase_order/purchase_order.py @@ -17,7 +17,7 @@ def get_last_purchase_request(item_code): left join `tabPurchase Order` tpo on tpo.name = tpoi.parent where tpoi.item_code = '{item_code}' - and tpo.status not ('Draft', 'Cancelled') + and tpo.status not in ('Draft', 'Cancelled') order by tpo.transaction_date desc limit 1 '''