feat: Add half-yearly asset maintenance periodicity. (#37006)

This commit is contained in:
Bernd Oliver Sünderhauf 2023-09-10 13:30:01 +02:00 committed by GitHub
parent b34c03d306
commit 846ae32d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -79,14 +79,16 @@ def calculate_next_due_date(
next_due_date = add_days(start_date, 7)
if periodicity == "Monthly":
next_due_date = add_months(start_date, 1)
if periodicity == "Quarterly":
next_due_date = add_months(start_date, 3)
if periodicity == "Half-yearly":
next_due_date = add_months(start_date, 6)
if periodicity == "Yearly":
next_due_date = add_years(start_date, 1)
if periodicity == "2 Yearly":
next_due_date = add_years(start_date, 2)
if periodicity == "3 Yearly":
next_due_date = add_years(start_date, 3)
if periodicity == "Quarterly":
next_due_date = add_months(start_date, 3)
if end_date and (
(start_date and start_date >= end_date)
or (last_completion_date and last_completion_date >= end_date)

View File

@ -71,7 +71,7 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Periodicity",
"options": "\nDaily\nWeekly\nMonthly\nQuarterly\nYearly\n2 Yearly\n3 Yearly",
"options": "\nDaily\nWeekly\nMonthly\nQuarterly\nHalf-yearly\nYearly\n2 Yearly\n3 Yearly",
"reqd": 1
},
{