[fix] make demo for price list

This commit is contained in:
Akhilesh Darjee
2013-09-12 19:19:46 +05:30
17 changed files with 207 additions and 215 deletions

View File

@@ -126,9 +126,10 @@ class DocType(TransactionBase):
webnotes.conn.sql("""delete from `tabAddress` where name=%s""", name)
def delete_customer_contact(self):
for rec in sql("select * from `tabContact` where customer=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabContact` where name=%s",(rec['name']))
for contact in webnotes.conn.sql_list("""select name from `tabContact`
where customer=%s""", self.doc.name):
webnotes.delete_doc("Contact", contact)
def delete_customer_account(self):
"""delete customer's ledger if exist and check balance before deletion"""
acc = sql("select name from `tabAccount` where master_type = 'Customer' \