From 5ce287d611fe30bfa2982a0e7b5d8b492dbdc81f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 14 May 2014 13:31:11 +0530 Subject: [PATCH 1/2] Setup Wizard width fix for chrome --- erpnext/setup/page/setup_wizard/setup_wizard.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.css b/erpnext/setup/page/setup_wizard/setup_wizard.css index 4086089098..46f9936fae 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.css +++ b/erpnext/setup/page/setup_wizard/setup_wizard.css @@ -11,7 +11,7 @@ @media (min-width: 768px) { .setup-wizard-wrapper { - width: 720px; + width: 725px; } } From 39cc1df5606cab8c47560ca35b12bbfa25f1849c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 14 May 2014 15:10:00 +0530 Subject: [PATCH 2/2] Fixes #1635, Stock Reconcilation --- .../doctype/stock_reconciliation/stock_reconciliation.js | 5 ++++- .../doctype/stock_reconciliation/stock_reconciliation.py | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index bafa42983d..245ff74d58 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -20,7 +20,10 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ "company": this.frm.doc.company }, callback: function(r) { - if (!r.exc) me.frm.set_value("expense_account", r.message); + if (!r.exc) { + me.frm.set_value("expense_account", r.message); + me.frm.script_manager.trigger("refresh"); + } } }); } diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index fe65f22670..35030a6a78 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -294,9 +294,8 @@ class StockReconciliation(StockController): if not self.expense_account: msgprint(_("Please enter Expense Account"), raise_exception=1) elif not frappe.db.sql("""select * from `tabStock Ledger Entry`"""): - if frappe.db.get_value("Account", self.expense_account, - "report_type") == "Profit and Loss": - frappe.throw(_("'Profit and Loss' type Account {0} used be set for Opening Entry").format(self.expense_account)) + if frappe.db.get_value("Account", self.expense_account, "report_type") == "Profit and Loss": + frappe.throw(_("Difference Account must be a 'Liability' type account, since this Stock Reconciliation is an Opening Entry")) @frappe.whitelist() def upload():