[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

@@ -435,7 +435,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
$.each(field_label_map, function(fname, label) {
$wrapper.find('[data-grid-fieldname="'+fname+'"]').text(label);
});
}
},
});
// to save previous state of cur_frm.cscript

View File

@@ -88,13 +88,6 @@ class DocType(BuyingController):
msgprint("Supplier : %s does not exists" % (name))
raise Exception
# Get TERMS AND CONDITIONS
# =======================================================================================
def get_tc_details(self,obj):
r = sql("select terms from `tabTerms and Conditions` where name = %s", obj.doc.tc_name)
if r: obj.doc.terms = r[0][0]
# Get Available Qty at Warehouse
def get_bin_details( self, arg = ''):
arg = eval(arg)

View File

@@ -102,10 +102,6 @@ class DocType(BuyingController):
d.schedule_date = webnotes.conn.get_value("Material Request Item",
d.prevdoc_detail_docname, "schedule_date")
def get_tc_details(self):
"""get terms & conditions"""
return get_obj('Purchase Common').get_tc_details(self)
def get_last_purchase_rate(self):
get_obj('Purchase Common').get_last_purchase_rate(self)

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
"modified": "2013-05-28 12:20:33",
"modified": "2013-05-28 12:20:40",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -538,8 +538,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
"options": "get_tc_details"
"oldfieldtype": "Button"
},
{
"doctype": "DocField",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:45",
"docstatus": 0,
"modified": "2013-05-28 12:19:41",
"modified": "2013-05-28 12:19:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -504,8 +504,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
"options": "get_tc_details"
"oldfieldtype": "Button"
},
{
"doctype": "DocField",