[fix] [minor] pull credit days from customer, update credit days in account of customer

This commit is contained in:
Anand Doshi
2013-08-13 13:57:53 +05:30
parent 47e14a9de4
commit dd2ec17962
2 changed files with 8 additions and 6 deletions

View File

@@ -77,9 +77,9 @@ class DocType(TransactionBase):
msgprint("Please Select Company under which you want to create account head")
def update_credit_days_limit(self):
sql("""update tabAccount set credit_days = %s, credit_limit = %s
where name = %s""", (self.doc.credit_days or 0, self.doc.credit_limit or 0,
self.doc.name + " - " + self.get_company_abbr()))
webnotes.conn.sql("""update tabAccount set credit_days = %s, credit_limit = %s
where master_type='Customer' and master_name = %s""",
(self.doc.credit_days or 0, self.doc.credit_limit or 0, self.doc.name))
def create_lead_address_contact(self):
if self.doc.lead_name: