Merge pull request #1646 from anandpdoshi/hotfix

Setup Wizard width, Stock Reconcilation
This commit is contained in:
Nabin Hait 2014-05-14 16:57:30 +05:30
commit 7b1698dbae
3 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,7 @@
@media (min-width: 768px) {
.setup-wizard-wrapper {
width: 720px;
width: 725px;
}
}

View File

@ -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");
}
}
});
}

View File

@ -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():