Merge branch 'v12-pre-release' into version-12

This commit is contained in:
Sahil Khan
2020-06-03 15:10:41 +05:30
2 changed files with 3 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '12.9.3'
__version__ = '12.9.4'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -126,6 +126,8 @@ class Asset(AccountsController):
frappe.throw(_("Available-for-use Date should be after purchase date"))
def validate_gross_and_purchase_amount(self):
if self.is_existing_asset: return
if self.gross_purchase_amount and self.gross_purchase_amount != self.purchase_receipt_amount:
frappe.throw(_("Gross Purchase Amount should be {} to purchase amount of one single Asset. {}\
Please do not book expense of multiple assets against one single Asset.")