fix: disposal_was_made_on_original_schedule_date
This commit is contained in:
parent
33b68552f1
commit
f487660a7c
@ -4,7 +4,17 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import add_months, cint, flt, get_link_to_form, getdate, nowdate, today
|
from frappe.utils import (
|
||||||
|
add_months,
|
||||||
|
cint,
|
||||||
|
flt,
|
||||||
|
get_last_day,
|
||||||
|
get_link_to_form,
|
||||||
|
getdate,
|
||||||
|
is_last_day_of_the_month,
|
||||||
|
nowdate,
|
||||||
|
today,
|
||||||
|
)
|
||||||
from frappe.utils.user import get_users_with_role
|
from frappe.utils.user import get_users_with_role
|
||||||
|
|
||||||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
||||||
@ -400,6 +410,9 @@ def disposal_was_made_on_original_schedule_date(schedule_idx, row, posting_date_
|
|||||||
row.depreciation_start_date, schedule_idx * cint(row.frequency_of_depreciation)
|
row.depreciation_start_date, schedule_idx * cint(row.frequency_of_depreciation)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if is_last_day_of_the_month(row.depreciation_start_date):
|
||||||
|
orginal_schedule_date = get_last_day(orginal_schedule_date)
|
||||||
|
|
||||||
if orginal_schedule_date == posting_date_of_disposal:
|
if orginal_schedule_date == posting_date_of_disposal:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user