From 1bd56b1c08ff8599dfcd2c3b20a65f4950e1d3eb Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 5 Jul 2011 14:41:36 +0530 Subject: [PATCH] removed get_tips() from js file --- accounts/Module Def/Accounts/Accounts.txt | 4 ++-- accounts/doctype/cost_center/cost_center.js | 4 ++-- accounts/doctype/fiscal_year/fiscal_year.js | 10 ---------- accounts/doctype/fiscal_year/fiscal_year.py | 6 ++---- accounts/doctype/mode_of_payment/mode_of_payment.js | 4 ++-- accounts/doctype/tds_category/tds_category.js | 4 ++-- .../purchase_other_charges/purchase_other_charges.js | 4 ++-- hr/doctype/expense_voucher/expense_voucher.js | 2 +- patches/old_patches/replacecode.py | 2 +- patches/patch.py | 4 +++- .../doctype/bill_of_materials/bill_of_materials.js | 4 ++-- .../doctype/production_order/production_order.js | 4 ++-- production/doctype/workstation/workstation.js | 4 ++-- selling/doctype/campaign/campaign.js | 4 ++-- selling/doctype/enquiry/enquiry.js | 2 +- selling/doctype/industry_type/industry_type.js | 4 ++-- setup/doctype/authorization_rule/authorization_rule.js | 4 ++-- setup/doctype/brand/brand.js | 4 ++-- setup/doctype/country/country.js | 4 ++-- setup/doctype/customer_group/customer_group.js | 4 ++-- setup/doctype/item_group/item_group.js | 4 ++-- setup/doctype/order_lost_reason/order_lost_reason.js | 4 ++-- setup/doctype/other_charges/other_charges.js | 4 ++-- setup/doctype/period/period.js | 4 ++-- setup/doctype/print_heading/print_heading.js | 4 ++-- setup/doctype/state/state.js | 4 ++-- setup/doctype/supplier_type/supplier_type.js | 4 ++-- setup/doctype/term/term.js | 4 ++-- setup/doctype/territory/territory.js | 4 ++-- setup/doctype/uom/uom.js | 4 ++-- setup/doctype/warehouse_type/warehouse_type.js | 4 ++-- setup/doctype/workflow_rule/workflow_rule.js | 4 ++-- stock/doctype/landed_cost_master/landed_cost_master.js | 4 ++-- stock/doctype/sales_bom/sales_bom.js | 4 ++-- .../stock_reconciliation/stock_reconciliation.py | 6 +++--- .../production_tips_common/production_tips_common.js | 2 +- 36 files changed, 68 insertions(+), 78 deletions(-) delete mode 100644 accounts/doctype/fiscal_year/fiscal_year.js diff --git a/accounts/Module Def/Accounts/Accounts.txt b/accounts/Module Def/Accounts/Accounts.txt index 7eefd895c1..3d70ff8701 100644 --- a/accounts/Module Def/Accounts/Accounts.txt +++ b/accounts/Module Def/Accounts/Accounts.txt @@ -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('Tip: ' + 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' } -] \ No newline at end of file +] diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js index e64d0d9b3b..24dc50f2fb 100644 --- a/accounts/doctype/cost_center/cost_center.js +++ b/accounts/doctype/cost_center/cost_center.js @@ -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); + } diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js deleted file mode 100644 index a0fdbec5c9..0000000000 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py index 7db63b2754..ca6bef2b2c 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.py +++ b/accounts/doctype/fiscal_year/fiscal_year.py @@ -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 diff --git a/accounts/doctype/mode_of_payment/mode_of_payment.js b/accounts/doctype/mode_of_payment/mode_of_payment.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/accounts/doctype/mode_of_payment/mode_of_payment.js +++ b/accounts/doctype/mode_of_payment/mode_of_payment.js @@ -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); + } \ No newline at end of file diff --git a/accounts/doctype/tds_category/tds_category.js b/accounts/doctype/tds_category/tds_category.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/accounts/doctype/tds_category/tds_category.js +++ b/accounts/doctype/tds_category/tds_category.js @@ -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); + } \ No newline at end of file diff --git a/buying/doctype/purchase_other_charges/purchase_other_charges.js b/buying/doctype/purchase_other_charges/purchase_other_charges.js index 9981e4af3a..9222997e9a 100644 --- a/buying/doctype/purchase_other_charges/purchase_other_charges.js +++ b/buying/doctype/purchase_other_charges/purchase_other_charges.js @@ -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){ diff --git a/hr/doctype/expense_voucher/expense_voucher.js b/hr/doctype/expense_voucher/expense_voucher.js index 8cd66f9d4e..7b34a4682d 100644 --- a/hr/doctype/expense_voucher/expense_voucher.js +++ b/hr/doctype/expense_voucher/expense_voucher.js @@ -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); diff --git a/patches/old_patches/replacecode.py b/patches/old_patches/replacecode.py index 3d0feebc32..ff9e10db94 100644 --- a/patches/old_patches/replacecode.py +++ b/patches/old_patches/replacecode.py @@ -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) diff --git a/patches/patch.py b/patches/patch.py index 755287262d..f16d45fc1f 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -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'") diff --git a/production/doctype/bill_of_materials/bill_of_materials.js b/production/doctype/bill_of_materials/bill_of_materials.js index 1235f4c961..ede959f2c3 100644 --- a/production/doctype/bill_of_materials/bill_of_materials.js +++ b/production/doctype/bill_of_materials/bill_of_materials.js @@ -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'); diff --git a/production/doctype/production_order/production_order.js b/production/doctype/production_order/production_order.js index 731ce1a886..bce5a152ac 100644 --- a/production/doctype/production_order/production_order.js +++ b/production/doctype/production_order/production_order.js @@ -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); } diff --git a/production/doctype/workstation/workstation.js b/production/doctype/workstation/workstation.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/production/doctype/workstation/workstation.js +++ b/production/doctype/workstation/workstation.js @@ -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); + } \ No newline at end of file diff --git a/selling/doctype/campaign/campaign.js b/selling/doctype/campaign/campaign.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/selling/doctype/campaign/campaign.js +++ b/selling/doctype/campaign/campaign.js @@ -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); + } \ No newline at end of file diff --git a/selling/doctype/enquiry/enquiry.js b/selling/doctype/enquiry/enquiry.js index 2eddafa4cd..499e6c62ba 100644 --- a/selling/doctype/enquiry/enquiry.js +++ b/selling/doctype/enquiry/enquiry.js @@ -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']); diff --git a/selling/doctype/industry_type/industry_type.js b/selling/doctype/industry_type/industry_type.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/selling/doctype/industry_type/industry_type.js +++ b/selling/doctype/industry_type/industry_type.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/authorization_rule/authorization_rule.js b/setup/doctype/authorization_rule/authorization_rule.js index c533003c6d..54863ec63e 100644 --- a/setup/doctype/authorization_rule/authorization_rule.js +++ b/setup/doctype/authorization_rule/authorization_rule.js @@ -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'); diff --git a/setup/doctype/brand/brand.js b/setup/doctype/brand/brand.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/brand/brand.js +++ b/setup/doctype/brand/brand.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/country/country.js b/setup/doctype/country/country.js index 70072820a7..607474219b 100644 --- a/setup/doctype/country/country.js +++ b/setup/doctype/country/country.js @@ -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); + } */ diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js index f8cfb055d2..a2fe4b5029 100644 --- a/setup/doctype/customer_group/customer_group.js +++ b/setup/doctype/customer_group/customer_group.js @@ -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 diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js index d4b5340efc..aa49363b76 100644 --- a/setup/doctype/item_group/item_group.js +++ b/setup/doctype/item_group/item_group.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/order_lost_reason/order_lost_reason.js b/setup/doctype/order_lost_reason/order_lost_reason.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/order_lost_reason/order_lost_reason.js +++ b/setup/doctype/order_lost_reason/order_lost_reason.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/other_charges/other_charges.js b/setup/doctype/other_charges/other_charges.js index 913b75f839..3d0b3244c4 100644 --- a/setup/doctype/other_charges/other_charges.js +++ b/setup/doctype/other_charges/other_charges.js @@ -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 diff --git a/setup/doctype/period/period.js b/setup/doctype/period/period.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/period/period.js +++ b/setup/doctype/period/period.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/print_heading/print_heading.js b/setup/doctype/print_heading/print_heading.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/print_heading/print_heading.js +++ b/setup/doctype/print_heading/print_heading.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/state/state.js b/setup/doctype/state/state.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/state/state.js +++ b/setup/doctype/state/state.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js index 61d8f8fdce..e34ca8c9f9 100644 --- a/setup/doctype/supplier_type/supplier_type.js +++ b/setup/doctype/supplier_type/supplier_type.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/term/term.js b/setup/doctype/term/term.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/term/term.js +++ b/setup/doctype/term/term.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js index b0bc9fdd48..91f7da6fb8 100644 --- a/setup/doctype/territory/territory.js +++ b/setup/doctype/territory/territory.js @@ -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'); diff --git a/setup/doctype/uom/uom.js b/setup/doctype/uom/uom.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/uom/uom.js +++ b/setup/doctype/uom/uom.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/warehouse_type/warehouse_type.js b/setup/doctype/warehouse_type/warehouse_type.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/setup/doctype/warehouse_type/warehouse_type.js +++ b/setup/doctype/warehouse_type/warehouse_type.js @@ -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); + } \ No newline at end of file diff --git a/setup/doctype/workflow_rule/workflow_rule.js b/setup/doctype/workflow_rule/workflow_rule.js index c58c4f4623..3fda3eb385 100644 --- a/setup/doctype/workflow_rule/workflow_rule.js +++ b/setup/doctype/workflow_rule/workflow_rule.js @@ -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 diff --git a/stock/doctype/landed_cost_master/landed_cost_master.js b/stock/doctype/landed_cost_master/landed_cost_master.js index a0fdbec5c9..6ffef4a1ed 100644 --- a/stock/doctype/landed_cost_master/landed_cost_master.js +++ b/stock/doctype/landed_cost_master/landed_cost_master.js @@ -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); + } \ No newline at end of file diff --git a/stock/doctype/sales_bom/sales_bom.js b/stock/doctype/sales_bom/sales_bom.js index 53c955edf7..5bae649c0d 100644 --- a/stock/doctype/sales_bom/sales_bom.js +++ b/stock/doctype/sales_bom/sales_bom.js @@ -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 */ diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py index 28410c8031..febefd5bdf 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -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) diff --git a/utilities/doctype/production_tips_common/production_tips_common.js b/utilities/doctype/production_tips_common/production_tips_common.js index 76ca1ee626..4dfc00a332 100644 --- a/utilities/doctype/production_tips_common/production_tips_common.js +++ b/utilities/doctype/production_tips_common/production_tips_common.js @@ -68,4 +68,4 @@ cur_frm.cscript.get_PPT_tips = function(doc, cdt, cdn) // ================================================== cur_frm.cscript.edit_status_changed = function(doc, cdt, cdn){ cur_frm.cscript.get_tips(); -} \ No newline at end of file +}