From 3eac436e7bbbe7df45db3d9555f93cea14e6252b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:14:42 +0530 Subject: [PATCH] fix: production plan date filters for orders (backport #39702) (#39720) fix: production plan date filters for orders (#39702) (cherry picked from commit 407045a1dee4d5d1e4f08f0e78871942ded9e709) Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com> --- .../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 51658a03a7c8..d460108d7b4e 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():