mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
removed get_tips() from js file
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'trash_reason': None,
|
||||
'widget_code': "var acc_set_tips = function() {\n $c_obj('Module Tip Control', 'get_tip', 'accounts', function(r,rt) { \n if(r.message) {\n $(parent.tip_area).html('<b>Tip: </b>' + r.message).css('display','block');\n }\n } );\n}\n\nacc_set_tips();"
|
||||
'widget_code': ""
|
||||
},
|
||||
{
|
||||
'click_function': "show_chart_browser('Accounts Browser','Account')",
|
||||
@@ -719,4 +719,4 @@
|
||||
'parenttype': 'Module Def',
|
||||
'role': 'Administrator'
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -24,7 +24,7 @@ cur_frm.cscript.company_name = function(doc,cdt,cdn){
|
||||
|
||||
//onload if cost center is group
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
if(!doc.__islocal && doc.docstatus == 0){
|
||||
get_field(doc.doctype,'group_or_ledger',doc.name).permlevel = 1;
|
||||
refresh_field('group_or_ledger');
|
||||
@@ -35,5 +35,5 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
}
|
||||
@@ -165,17 +165,15 @@ class DocType:
|
||||
def update_voucher_outstanding(self):
|
||||
# Clear outstanding
|
||||
self.clear_outstanding()
|
||||
sql("LOCK TABLE `tabGL Entry` WRITE")
|
||||
against_voucher = sql("select against_voucher, against_voucher_type from `tabGL Entry` where fiscal_year=%s and is_cancelled='No' and company=%s and ifnull(against_voucher, '') != '' and ifnull(against_voucher_type, '') != '' group by against_voucher, against_voucher_type", (self.doc.name, self.doc.company))
|
||||
against_voucher = sql("select against_voucher, against_voucher_type from `tabGL Entry` where fiscal_year=%s and ifnull(is_cancelled, 'No')='No' and company=%s and ifnull(against_voucher, '') != '' and ifnull(against_voucher_type, '') != '' group by against_voucher, against_voucher_type", (self.doc.name, self.doc.company))
|
||||
for d in against_voucher:
|
||||
# get voucher balance
|
||||
bal = sql("select sum(debit)-sum(credit) from `tabGL Entry` where against_voucher=%s and against_voucher_type=%s", (d[0], d[1]))
|
||||
bal = sql("select sum(debit)-sum(credit) from `tabGL Entry` where against_voucher=%s and against_voucher_type=%s and ifnull(is_cancelled, 'No')='No'", (d[0], d[1]))
|
||||
bal = bal and flt(bal[0][0]) or 0.0
|
||||
if d[1] == 'Payable Voucher':
|
||||
bal = -bal
|
||||
# set voucher balance
|
||||
sql("update `tab%s` set outstanding_amount=%s where name='%s'"% (d[1], bal, d[0]))
|
||||
sql("UNLOCK TABLES")
|
||||
|
||||
# ====================================================================================
|
||||
# Generate periods
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user