mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: Test Cases
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import cint, flt, cstr, comma_or, get_link_to_form, nowtime
|
from frappe.utils import cint, flt, cstr, get_link_to_form, nowtime
|
||||||
from frappe import _, throw
|
from frappe import _, throw
|
||||||
from erpnext.stock.get_item_details import get_bin_details
|
from erpnext.stock.get_item_details import get_bin_details
|
||||||
from erpnext.stock.utils import get_incoming_rate
|
from erpnext.stock.utils import get_incoming_rate
|
||||||
|
|||||||
@@ -74,12 +74,7 @@ class StockController(AccountsController):
|
|||||||
precision = frappe.get_precision("GL Entry", "debit_in_account_currency")
|
precision = frappe.get_precision("GL Entry", "debit_in_account_currency")
|
||||||
for item_row in voucher_details:
|
for item_row in voucher_details:
|
||||||
|
|
||||||
if self.doctype == 'Stock Entry':
|
sle_list = sle_map.get(item_row.name)
|
||||||
warehouse_field = 's_warehouse'
|
|
||||||
else:
|
|
||||||
warehouse_field = 'warehouse'
|
|
||||||
|
|
||||||
sle_list = sle_map.get((item_row.name, item_row.get(warehouse_field)))
|
|
||||||
if sle_list:
|
if sle_list:
|
||||||
for sle in sle_list:
|
for sle in sle_list:
|
||||||
if warehouse_account.get(sle.warehouse):
|
if warehouse_account.get(sle.warehouse):
|
||||||
@@ -223,7 +218,7 @@ class StockController(AccountsController):
|
|||||||
""", (self.doctype, self.name), as_dict=True)
|
""", (self.doctype, self.name), as_dict=True)
|
||||||
|
|
||||||
for sle in stock_ledger_entries:
|
for sle in stock_ledger_entries:
|
||||||
stock_ledger.setdefault((sle.voucher_detail_no, sle.warehouse), []).append(sle)
|
stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle)
|
||||||
return stock_ledger
|
return stock_ledger
|
||||||
|
|
||||||
def make_batches(self, warehouse_field):
|
def make_batches(self, warehouse_field):
|
||||||
|
|||||||
Reference in New Issue
Block a user