From 94a0d45b7792d766db95238e3ff303f6a26d89da Mon Sep 17 00:00:00 2001 From: Himanshu Date: Mon, 15 Jul 2019 08:36:50 +0000 Subject: [PATCH] fix: do not add an extra day (#18311) --- erpnext/support/doctype/issue/issue.py | 3 ++- erpnext/www/lms/macros/__init__.py | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 erpnext/www/lms/macros/__init__.py diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index ce9fb12145..98d8c99809 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -270,7 +270,8 @@ def get_expected_time_for(parameter, service_level, start_date_time): allotted_days -= 1 expected_time_is_set = allotted_days <= 0 - current_date_time = add_to_date(current_date_time, days=1) + if not expected_time_is_set: + current_date_time = add_to_date(current_date_time, days=1) if end_time and time_period != 'Hour': current_date_time = datetime.combine(getdate(current_date_time), get_time(end_time)) diff --git a/erpnext/www/lms/macros/__init__.py b/erpnext/www/lms/macros/__init__.py new file mode 100644 index 0000000000..e69de29bb2