mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 14:08:29 +00:00
[cleanup] [minor] On cancellation of transation, do not post cancelled sl entries, delete allexisting sl entries against that transaction
This commit is contained in:
@@ -273,15 +273,13 @@ class DocType:
|
||||
},
|
||||
]
|
||||
for cc in cc_list:
|
||||
if webnotes.conn.exists("Cost Center", cc.cost_center_name + ' - ' + self.doc.abbr):
|
||||
cc.update({"doctype": "Cost Center"})
|
||||
cc_bean = webnotes.bean(cc)
|
||||
cc_bean.ignore_permissions = True
|
||||
|
||||
if cc.get("cost_center_name") == self.doc.name:
|
||||
cc_bean.ignore_mandatory = True
|
||||
|
||||
cc_bean.insert()
|
||||
cc.update({"doctype": "Cost Center"})
|
||||
cc_bean = webnotes.bean(cc)
|
||||
cc_bean.ignore_permissions = True
|
||||
|
||||
if cc.get("cost_center_name") == self.doc.name:
|
||||
cc_bean.ignore_mandatory = True
|
||||
cc_bean.insert()
|
||||
|
||||
webnotes.conn.set(self.doc, "cost_center", "Main - " + self.doc.abbr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user