From 52a66fc90b320530f325ba2ec5d7c98af3f2800f Mon Sep 17 00:00:00 2001 From: Maxwell Morais Date: Mon, 16 May 2016 06:06:59 -0300 Subject: [PATCH] Reduce start and end date verification Given the actual scenario, that verify if the start_date <= end_date, do schedule a Maintenance, 2 days are required, but in many cases only one day is required! --- .../doctype/maintenance_schedule/maintenance_schedule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py index 478c277d38e..f30598f8a43 100644 --- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py @@ -153,7 +153,7 @@ class MaintenanceSchedule(TransactionBase): elif not d.sales_person: throw(_("Please select Incharge Person's name")) - if getdate(d.start_date) >= getdate(d.end_date): + if getdate(d.start_date) > getdate(d.end_date): throw(_("Start date should be less than end date for Item {0}").format(d.item_code)) def validate_sales_order(self):