From 407045a1dee4d5d1e4f08f0e78871942ded9e709 Mon Sep 17 00:00:00 2001 From: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com> Date: Sun, 4 Feb 2024 23:01:51 +0530 Subject: [PATCH] fix: production plan date filters for orders (#39702) --- .../doctype/production_plan/production_plan.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 5dc5c38376a9..f0392be01c52 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1334,10 +1334,10 @@ def get_sales_orders(self): ) date_field_mapper = { - "from_date": self.from_date >= so.transaction_date, - "to_date": self.to_date <= so.transaction_date, - "from_delivery_date": self.from_delivery_date >= so_item.delivery_date, - "to_delivery_date": self.to_delivery_date <= so_item.delivery_date, + "from_date": so.transaction_date >= self.from_date, + "to_date": so.transaction_date <= self.to_date, + "from_delivery_date": so_item.delivery_date >= self.from_delivery_date, + "to_delivery_date": so_item.delivery_date <= self.to_delivery_date, } for field, value in date_field_mapper.items():