fix(Asset Repair): Remove 'Payable Account' field
This commit is contained in:
parent
66e6f01e40
commit
8a41f6354a
@ -21,13 +21,12 @@
|
|||||||
"column_break_14",
|
"column_break_14",
|
||||||
"project",
|
"project",
|
||||||
"accounting_details",
|
"accounting_details",
|
||||||
"payable_account",
|
"repair_cost",
|
||||||
"purchase_invoice",
|
"capitalize_repair_cost",
|
||||||
"stock_consumption",
|
"stock_consumption",
|
||||||
"column_break_8",
|
"column_break_8",
|
||||||
"repair_cost",
|
|
||||||
"total_repair_cost",
|
"total_repair_cost",
|
||||||
"capitalize_repair_cost",
|
"purchase_invoice",
|
||||||
"stock_consumption_details_section",
|
"stock_consumption_details_section",
|
||||||
"warehouse",
|
"warehouse",
|
||||||
"stock_items",
|
"stock_items",
|
||||||
@ -149,12 +148,6 @@
|
|||||||
"fieldtype": "Read Only",
|
"fieldtype": "Read Only",
|
||||||
"label": "Asset Name"
|
"label": "Asset Name"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "payable_account",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Payable Account",
|
|
||||||
"options": "Account"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_8",
|
"fieldname": "column_break_8",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
@ -243,7 +236,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-13 23:01:03.638835",
|
"modified": "2021-05-14 02:31:57.226273",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
|
@ -38,7 +38,6 @@ class AssetRepair(Document):
|
|||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.check_repair_status()
|
self.check_repair_status()
|
||||||
self.check_for_payable_account()
|
|
||||||
self.check_for_cost_center()
|
self.check_for_cost_center()
|
||||||
|
|
||||||
if self.stock_consumption or self.capitalize_repair_cost:
|
if self.stock_consumption or self.capitalize_repair_cost:
|
||||||
@ -60,10 +59,6 @@ class AssetRepair(Document):
|
|||||||
if not self.warehouse:
|
if not self.warehouse:
|
||||||
frappe.throw(_("Please enter Warehouse from which Stock Items consumed during Asset Repair were taken."))
|
frappe.throw(_("Please enter Warehouse from which Stock Items consumed during Asset Repair were taken."))
|
||||||
|
|
||||||
def check_for_payable_account(self):
|
|
||||||
if not self.payable_account:
|
|
||||||
frappe.throw(_("Please enter Payable Account."))
|
|
||||||
|
|
||||||
def check_for_cost_center(self):
|
def check_for_cost_center(self):
|
||||||
if not self.cost_center:
|
if not self.cost_center:
|
||||||
frappe.throw(_("Please enter Cost Center."))
|
frappe.throw(_("Please enter Cost Center."))
|
||||||
@ -98,7 +93,6 @@ class AssetRepair(Document):
|
|||||||
frappe.throw(_("Please link Purchase Invoice."))
|
frappe.throw(_("Please link Purchase Invoice."))
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
if self.payable_account:
|
|
||||||
self.make_gl_entries(cancel=True)
|
self.make_gl_entries(cancel=True)
|
||||||
|
|
||||||
def make_gl_entries(self, cancel=False):
|
def make_gl_entries(self, cancel=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user