mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
[issues #437] [fix] pulling terms and conditions
This commit is contained in:
@@ -95,12 +95,6 @@ class DocType(SellingController):
|
||||
def get_rate(self,arg):
|
||||
return get_obj('Sales Common').get_rate(arg)
|
||||
|
||||
# GET TERMS AND CONDITIONS
|
||||
# ====================================================================================
|
||||
def get_tc_details(self):
|
||||
return get_obj('Sales Common').get_tc_details(self)
|
||||
|
||||
|
||||
# VALIDATE
|
||||
# ==============================================================================================
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:08",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-28 14:50:59",
|
||||
"modified": "2013-05-28 14:51:00",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -591,7 +591,6 @@
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Terms and Conditions",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_tc_details",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
|
||||
@@ -81,12 +81,6 @@ class DocType(TransactionBase):
|
||||
acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + webnotes.conn.get_value('Company', obj.doc.company, 'abbr')))
|
||||
obj.doc.debit_to = acc_head and acc_head[0][0] or ''
|
||||
|
||||
# Get TERMS AND CONDITIONS
|
||||
# =======================================================================================
|
||||
def get_tc_details(self,obj):
|
||||
r = webnotes.conn.sql("select terms from `tabTerms and Conditions` where name = %s", obj.doc.tc_name)
|
||||
if r: obj.doc.terms = r[0][0]
|
||||
|
||||
#---------------------------------------- Get Tax Details -------------------------------#
|
||||
def get_tax_details(self, item_code, obj):
|
||||
import json
|
||||
|
||||
@@ -67,9 +67,6 @@ class DocType(SellingController):
|
||||
def get_rate(self,arg):
|
||||
return get_obj('Sales Common').get_rate(arg)
|
||||
|
||||
def get_tc_details(self):
|
||||
return get_obj('Sales Common').get_tc_details(self)
|
||||
|
||||
def check_maintenance_schedule(self):
|
||||
nm = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", self.doc.name)
|
||||
nm = nm and nm[0][0] or ''
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:08",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-28 15:05:38",
|
||||
"modified": "2013-05-28 15:05:40",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -579,7 +579,6 @@
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Terms and Conditions",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_tc_details",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user