mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
[fix] Maintenance Scheduler periodicity validation
This commit is contained in:
@@ -134,7 +134,7 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
|
|
||||||
def validate_dates_with_periodicity(self):
|
def validate_dates_with_periodicity(self):
|
||||||
for d in self.get("item_maintenance_detail"):
|
for d in self.get("item_maintenance_detail"):
|
||||||
if d.start_date and d.end_date and d.periodicity:
|
if d.start_date and d.end_date and d.periodicity and d.periodicity!="Random":
|
||||||
date_diff = (getdate(d.end_date) - getdate(d.start_date)).days + 1
|
date_diff = (getdate(d.end_date) - getdate(d.start_date)).days + 1
|
||||||
days_in_period = {
|
days_in_period = {
|
||||||
"Weekly": 7,
|
"Weekly": 7,
|
||||||
|
|||||||
Reference in New Issue
Block a user