mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
Merge branch '1310' of github.com:webnotes/erpnext
Conflicts: accounts/doctype/account/account.py controllers/accounts_controller.py patches/patch_list.py selling/doctype/sales_common/sales_common.py stock/doctype/purchase_receipt/purchase_receipt.py
This commit is contained in:
@@ -284,11 +284,13 @@ class DocType(BuyingController):
|
||||
bin = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = %s and warehouse = %s", (d.rm_item_code, self.doc.supplier_warehouse), as_dict = 1)
|
||||
d.current_stock = bin and flt(bin[0]['actual_qty']) or 0
|
||||
|
||||
def get_gl_entries_for_stock(self, warehouse_account=None):
|
||||
def get_rate(self,arg):
|
||||
return get_obj('Purchase Common').get_rate(arg,self)
|
||||
|
||||
def get_gl_entries(self, warehouse_account=None):
|
||||
against_stock_account = self.get_company_default("stock_received_but_not_billed")
|
||||
|
||||
gl_entries = super(DocType, self).get_gl_entries_for_stock(warehouse_account,
|
||||
against_stock_account)
|
||||
gl_entries = super(DocType, self).get_gl_entries(warehouse_account, against_stock_account)
|
||||
return gl_entries
|
||||
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@ class DocType(StockController):
|
||||
self.doc.from_warehouse = ""
|
||||
|
||||
item = webnotes.conn.sql("""select name, item_name, description,
|
||||
uom, purchase_account, cost_center from `tabItem`
|
||||
stock_uom, purchase_account, cost_center from `tabItem`
|
||||
where name=(select item from tabBOM where name=%s)""",
|
||||
self.doc.bom_no, as_dict=1)
|
||||
self.add_to_stock_entry_detail({
|
||||
@@ -483,7 +483,7 @@ class DocType(StockController):
|
||||
"qty": self.doc.fg_completed_qty,
|
||||
"item_name": item[0].item_name,
|
||||
"description": item[0]["description"],
|
||||
"stock_uom": item[0]["uom"],
|
||||
"stock_uom": item[0]["stock_uom"],
|
||||
"from_warehouse": "",
|
||||
"expense_account": item[0].purchase_account,
|
||||
"cost_center": item[0].cost_center,
|
||||
|
||||
@@ -275,11 +275,11 @@ class DocType(StockController):
|
||||
"posting_time": self.doc.posting_time
|
||||
})
|
||||
|
||||
def get_gl_entries_for_stock(self, warehouse_account=None):
|
||||
def get_gl_entries(self, warehouse_account=None):
|
||||
if not self.doc.cost_center:
|
||||
msgprint(_("Please enter Cost Center"), raise_exception=1)
|
||||
|
||||
return super(DocType, self).get_gl_entries_for_stock(warehouse_account,
|
||||
return super(DocType, self).get_gl_entries(warehouse_account,
|
||||
self.doc.expense_account, self.doc.cost_center)
|
||||
|
||||
|
||||
|
||||
@@ -23,5 +23,10 @@ test_records = [
|
||||
"doctype": "Warehouse User",
|
||||
"parentfield": "warehouse_users",
|
||||
"user": "test2@example.com"
|
||||
}]
|
||||
}],
|
||||
[{
|
||||
"doctype": "Warehouse",
|
||||
"warehouse_name": "_Test Warehouse No Account",
|
||||
"company": "_Test Company",
|
||||
}],
|
||||
]
|
||||
|
||||
@@ -22,7 +22,7 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
this._super(wrapper, {
|
||||
title: wn._("Stock Balance"),
|
||||
doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
|
||||
"Stock Entry", "Project"],
|
||||
"Stock Entry", "Project", "Serial No"],
|
||||
});
|
||||
},
|
||||
setup_columns: function() {
|
||||
|
||||
Reference in New Issue
Block a user