nowdate changed to purchase_date
next depreciation date should be compared with purchase_date instead of nowdate.
This commit is contained in:
parent
993358d5d7
commit
e5cb3e34fe
@ -80,7 +80,7 @@ class Asset(Document):
|
|||||||
if cint(self.number_of_depreciations_booked) > cint(self.total_number_of_depreciations):
|
if cint(self.number_of_depreciations_booked) > cint(self.total_number_of_depreciations):
|
||||||
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
|
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
|
||||||
|
|
||||||
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()):
|
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(self.purchase_date):
|
||||||
frappe.msgprint(_("Next Depreciation Date is entered as past date"))
|
frappe.msgprint(_("Next Depreciation Date is entered as past date"))
|
||||||
|
|
||||||
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
|
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user