[fix] #6195
This commit is contained in:
parent
294664b24c
commit
af111e9c43
@ -57,7 +57,7 @@ class GLEntry(Document):
|
||||
def pl_must_have_cost_center(self):
|
||||
if frappe.db.get_value("Account", self.account, "report_type") == "Profit and Loss":
|
||||
if not self.cost_center and self.voucher_type != 'Period Closing Voucher':
|
||||
frappe.throw(_("Cost Center is required for 'Profit and Loss' account {0}")
|
||||
frappe.throw(_("Cost Center is required for 'Profit and Loss' account {0}. Please set up a default Cost Center for the Company.")
|
||||
.format(self.account))
|
||||
else:
|
||||
if self.cost_center:
|
||||
|
@ -162,7 +162,7 @@ class StockEntry(StockController):
|
||||
if not d.s_warehouse:
|
||||
frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
|
||||
|
||||
if cstr(d.s_warehouse) == cstr(d.t_warehouse):
|
||||
if cstr(d.s_warehouse) == cstr(d.t_warehouse) and not self.purpose == "Material Transfer for Manufacture":
|
||||
frappe.throw(_("Source and target warehouse cannot be same for row {0}").format(d.idx))
|
||||
|
||||
def validate_production_order(self):
|
||||
|
Loading…
Reference in New Issue
Block a user