[Fix] Asset gl entry not creating for non perpetual
This commit is contained in:
@@ -639,10 +639,10 @@ class AccountsController(TransactionBase):
|
||||
frappe.throw(_("Row #{0}: Asset {1} must be submitted").format(d.idx, d.asset))
|
||||
|
||||
elif self.doctype == "Purchase Invoice":
|
||||
if asset.status != "Submitted":
|
||||
frappe.throw(_("Row #{0}: Asset {1} is already {2}")
|
||||
.format(d.idx, d.asset, asset.status))
|
||||
elif getdate(asset.purchase_date) != getdate(self.posting_date):
|
||||
# if asset.status != "Submitted":
|
||||
# frappe.throw(_("Row #{0}: Asset {1} is already {2}")
|
||||
# .format(d.idx, d.asset, asset.status))
|
||||
if getdate(asset.purchase_date) != getdate(self.posting_date):
|
||||
frappe.throw(_("Row #{0}: Posting Date must be same as purchase date {1} of asset {2}").format(d.idx, asset.purchase_date, d.asset))
|
||||
elif asset.is_existing_asset:
|
||||
frappe.throw(_("Row #{0}: Purchase Invoice cannot be made against an existing asset {1}").format(d.idx, d.asset))
|
||||
|
||||
Reference in New Issue
Block a user