mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix: Asset Maintenance - TypeError - Version 11 (#19069)
* fix: Asset Maintenance - TypeError * Update asset_maintenance.py
This commit is contained in:
@@ -56,8 +56,7 @@ def assign_tasks(asset_maintenance_name, assign_to_member, maintenance_task, nex
|
|||||||
def calculate_next_due_date(periodicity, start_date = None, end_date = None, last_completion_date = None, next_due_date = None):
|
def calculate_next_due_date(periodicity, start_date = None, end_date = None, last_completion_date = None, next_due_date = None):
|
||||||
if not start_date and not last_completion_date:
|
if not start_date and not last_completion_date:
|
||||||
start_date = frappe.utils.now()
|
start_date = frappe.utils.now()
|
||||||
|
if last_completion_date and ((start_date and last_completion_date > start_date) or not start_date):
|
||||||
if last_completion_date and (last_completion_date > start_date or not start_date):
|
|
||||||
start_date = last_completion_date
|
start_date = last_completion_date
|
||||||
if periodicity == 'Daily':
|
if periodicity == 'Daily':
|
||||||
next_due_date = add_days(start_date, 1)
|
next_due_date = add_days(start_date, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user