[issues #437] [fix] pulling terms and conditions

This commit is contained in:
Anand Doshi
2013-06-05 14:11:32 +05:30
parent 8f81623240
commit bf3e54a45b
21 changed files with 37 additions and 71 deletions

View File

@@ -247,7 +247,7 @@ class DocType(SellingController):
# fetch terms
if self.doc.tc_name and not self.doc.terms:
self.get_tc_details()
self.doc.terms = webnotes.conn.get_value("Terms and Conditions", self.doc.tc_name, "terms")
# fetch charges
if self.doc.charge and not len(self.doclist.get({"parentfield": "other_charges"})):
@@ -339,11 +339,6 @@ class DocType(SellingController):
"""Get Commission rate of Sales Partner"""
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
def get_tc_details(self):
return get_obj('Sales Common').get_tc_details(self)
def get_advances(self):
super(DocType, self).get_advances(self.doc.debit_to,
"Sales Invoice Advance", "advance_adjustment_details", "credit")

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:05",
"docstatus": 0,
"modified": "2013-05-29 18:53:26",
"modified": "2013-05-29 18:53:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -727,7 +727,6 @@
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
"options": "get_tc_details",
"print_hide": 1,
"read_only": 0
},