mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: Remove docstatus check during budget validate
This commit is contained in:
@@ -530,17 +530,16 @@ class BuyingController(StockController, Subcontracting):
|
|||||||
self.update_fixed_asset(field, delete_asset=True)
|
self.update_fixed_asset(field, delete_asset=True)
|
||||||
|
|
||||||
def validate_budget(self):
|
def validate_budget(self):
|
||||||
if self.docstatus == 1:
|
for data in self.get('items'):
|
||||||
for data in self.get('items'):
|
args = data.as_dict()
|
||||||
args = data.as_dict()
|
args.update({
|
||||||
args.update({
|
'doctype': self.doctype,
|
||||||
'doctype': self.doctype,
|
'company': self.company,
|
||||||
'company': self.company,
|
'posting_date': (self.schedule_date
|
||||||
'posting_date': (self.schedule_date
|
if self.doctype == 'Material Request' else self.transaction_date)
|
||||||
if self.doctype == 'Material Request' else self.transaction_date)
|
})
|
||||||
})
|
|
||||||
|
|
||||||
validate_expense_against_budget(args)
|
validate_expense_against_budget(args)
|
||||||
|
|
||||||
def process_fixed_asset(self):
|
def process_fixed_asset(self):
|
||||||
if self.doctype == 'Purchase Invoice' and not self.update_stock:
|
if self.doctype == 'Purchase Invoice' and not self.update_stock:
|
||||||
|
|||||||
Reference in New Issue
Block a user