removed get_tips() from js file
diff --git a/accounts/Module Def/Accounts/Accounts.txt b/accounts/Module Def/Accounts/Accounts.txt
index 7eefd89..3d70ff8 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('<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'
}
-]
\ 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 e64d0d9..24dc50f 100644
--- a/accounts/doctype/cost_center/cost_center.js
+++ b/accounts/doctype/cost_center/cost_center.js
@@ -24,7 +24,7 @@
//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.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 a0fdbec..0000000
--- 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 7db63b2..ca6bef2 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/accounts/doctype/fiscal_year/fiscal_year.py
@@ -165,17 +165,15 @@
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 a0fdbec..6ffef4a 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 a0fdbec..6ffef4a 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 9981e4a..9222997 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 8cd66f9..7b34a46 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 3d0feeb..ff9e10d 100644
--- a/patches/old_patches/replacecode.py
+++ b/patches/old_patches/replacecode.py
@@ -13,7 +13,7 @@
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 7552872..f16d45f 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 @@
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 1235f4c..ede959f 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 @@
// 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 731ce1a..bce5a15 100644
--- a/production/doctype/production_order/production_order.js
+++ b/production/doctype/production_order/production_order.js
@@ -2,7 +2,7 @@
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 @@
// ================================== 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 a0fdbec..6ffef4a 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 a0fdbec..6ffef4a 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 2eddafa..499e6c6 100644
--- a/selling/doctype/enquiry/enquiry.js
+++ b/selling/doctype/enquiry/enquiry.js
@@ -2,7 +2,7 @@
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 a0fdbec..6ffef4a 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 c533003..54863ec 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 a0fdbec..6ffef4a 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 7007282..6074742 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 f8cfb05..a2fe4b5 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.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 d4b5340..aa49363 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.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 a0fdbec..6ffef4a 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 913b75f..3d0b324 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 a0fdbec..6ffef4a 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 a0fdbec..6ffef4a 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 a0fdbec..6ffef4a 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 61d8f8f..e34ca8c 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 a0fdbec..6ffef4a 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 b0bc9fd..91f7da6 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 a0fdbec..6ffef4a 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 a0fdbec..6ffef4a 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 c58c4f4..3fda3eb 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 a0fdbec..6ffef4a 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 53c955e..5bae649 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 28410c8..febefd5 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -127,10 +127,10 @@
# 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 76ca1ee..4dfc00a3 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.edit_status_changed = function(doc, cdt, cdn){
cur_frm.cscript.get_tips();
-}
\ No newline at end of file
+}