removed get_tips() from js file
This commit is contained in:
parent
c297df5b16
commit
1bd56b1c08
@ -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')",
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
//--------- 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);
|
||||
|
||||
}
|
||||
|
||||
cur_frm.pformat.purchase_tax_details= function(doc){
|
||||
|
@ -1,7 +1,7 @@
|
||||
cur_frm.add_fetch('employee', 'company', 'company');
|
||||
|
||||
cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||
//cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
//
|
||||
if(!doc.approval_status) set_multiple(cdt,cdn,{approval_status:'Draft'});
|
||||
if(doc.employee) cur_frm.cscript.employee(doc,cdt,cdn);
|
||||
|
||||
|
@ -13,7 +13,7 @@ def replace_code(old, new):
|
||||
print 'Found in %s' % t
|
||||
|
||||
if __name__=='__main__':
|
||||
old = """$import(Tips Common)"""
|
||||
old = """cur_frm.cscript.get_tips(doc, cdt, cdn);"""
|
||||
new = " "
|
||||
replace_code(old, new)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# REMEMBER to update this
|
||||
# ========================
|
||||
|
||||
last_patch = 308
|
||||
last_patch = 309
|
||||
|
||||
#-------------------------------------------
|
||||
|
||||
@ -1220,3 +1220,5 @@ def execute(patch_no):
|
||||
elif patch_no == 308:
|
||||
from erpnext_structure_cleanup import run_patches
|
||||
run_patches()
|
||||
elif patch_no == 309:
|
||||
sql("delete from `tabDocField` where fieldname = 'item_attachments_details' and parent = 'Item'")
|
||||
|
@ -3,13 +3,13 @@ $import(Production Tips Common)
|
||||
// ONLOAD
|
||||
cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
// On REFRESH
|
||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
||||
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
|
||||
// Hide - Un Hide Buttons
|
||||
if (!doc.is_default && doc.__islocal!=1) unhide_field('Set as Default BOM');
|
||||
|
@ -2,7 +2,7 @@ $import(Production Tips Common)
|
||||
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
|
||||
if (!doc.fiscal_year && doc.__islocal){ set_default_values(doc);}
|
||||
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
|
||||
@ -20,7 +20,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
// ================================== Refresh ==========================================
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
cfn_set_fields(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);
|
||||
|
||||
}
|
@ -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,7 +2,7 @@ $import(SMS Control)
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn){
|
||||
|
||||
//cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
//
|
||||
|
||||
if(!doc.docstatus){
|
||||
hide_field(['Update Follow up']);
|
||||
|
@ -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,13 +2,13 @@
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
// Settings Module
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
|
||||
if(doc.based_on == 'Grand Total' || doc.based_on == 'Average Discount' || doc.based_on == 'Total Claimed Amount' || doc.based_on == 'Not Applicable') hide_field('master_name');
|
||||
else unhide_field('master_name');
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -4,10 +4,10 @@
|
||||
|
||||
//--------- 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);
|
||||
|
||||
}
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
cur_frm.cscript.onload = function(){
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
if(doc.__islocal){
|
||||
doc.parent_customer_group = 'Root';
|
||||
refresh('parent_customer_group');
|
||||
@ -9,7 +9,7 @@ cur_frm.cscript.onload = function(){
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
//get query select Customer Group
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
cur_frm.cscript.onload = function(){
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
if(doc.__islocal){
|
||||
doc.parent_item_group = 'Root';
|
||||
refresh('parent_item_group');
|
||||
@ -14,5 +14,5 @@ cur_frm.fields_dict['parent_item_group'].get_query = function(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);
|
||||
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
//--------- 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);
|
||||
|
||||
}*/
|
||||
|
||||
// For customizing print
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -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);
|
||||
|
||||
}
|
@ -3,9 +3,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);
|
||||
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
cur_frm.cscript.onload = function(){
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
if(doc.__islocal){
|
||||
doc.parent_territory = 'All Territories';
|
||||
refresh('parent_territory');
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
//--------- 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);
|
||||
|
||||
}
|
||||
|
||||
// Show Label name of fields for selected Doctype
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
|
||||
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
if(!doc.price_list) set_multiple(cdt,cdn,{price_list:sys_defaults.price_list_name});
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.get_tips(doc, cdt, cdn);
|
||||
|
||||
}
|
||||
|
||||
/* Get Item Code */
|
||||
|
@ -127,10 +127,10 @@ class DocType:
|
||||
# update mar
|
||||
# -----------
|
||||
def update_mar(self, d, qty_diff):
|
||||
if not d[self.label['qty']] and not d[self.label['actual_qty']]:
|
||||
if not flt(d[self.label['qty']]) and not flt(d[self.label['actual_qty']]):
|
||||
# seems like a special condition when there is no actual quanitity but there is a rate, may be only for setting a rate!
|
||||
self.make_sl_entry(1,d,1)
|
||||
self.make_sl_entry(-1,d,1)
|
||||
self.make_sl_entry(1,d,1)
|
||||
self.make_sl_entry(1,d,-1)
|
||||
else:
|
||||
self.update_item_valuation_pre_date(d)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user