mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 22:58:25 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -125,20 +125,6 @@ class TransactionBase(StatusUpdater):
|
||||
ret = None
|
||||
|
||||
return ret
|
||||
|
||||
def delink_advance_entries(self, linked_doc_name):
|
||||
total_allocated_amount = 0
|
||||
for adv in self.advances:
|
||||
consider_for_total_advance = True
|
||||
if adv.reference_name == linked_doc_name:
|
||||
frappe.db.sql("""delete from `tab{0} Advance`
|
||||
where name = %s""".format(self.doctype), adv.name)
|
||||
consider_for_total_advance = False
|
||||
|
||||
if consider_for_total_advance:
|
||||
total_allocated_amount += flt(adv.allocated_amount, adv.precision("allocated_amount"))
|
||||
|
||||
frappe.db.set_value(self.doctype, self.name, "total_advance", total_allocated_amount, update_modified=False)
|
||||
|
||||
def delete_events(ref_type, ref_name):
|
||||
frappe.delete_doc("Event", frappe.db.sql_list("""select name from `tabEvent`
|
||||
|
||||
Reference in New Issue
Block a user