mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 17:55:40 +00:00
fix: incorrect balance qty in stock ledger report
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import cint, flt
|
||||
from erpnext.stock.utils import update_included_uom_in_report
|
||||
|
||||
def execute(filters=None):
|
||||
@@ -13,6 +14,7 @@ def execute(filters=None):
|
||||
sl_entries = get_stock_ledger_entries(filters, items)
|
||||
item_details = get_item_details(items, sl_entries, include_uom)
|
||||
opening_row = get_opening_balance(filters, columns)
|
||||
precision = cint(frappe.db.get_single_value("System Settings", "float_precision"))
|
||||
|
||||
data = []
|
||||
conversion_factors = []
|
||||
@@ -27,7 +29,7 @@ def execute(filters=None):
|
||||
sle.update(item_detail)
|
||||
|
||||
if filters.get("batch_no"):
|
||||
actual_qty += sle.actual_qty
|
||||
actual_qty += flt(sle.actual_qty, precision)
|
||||
stock_value += sle.stock_value_difference
|
||||
|
||||
if sle.voucher_type == 'Stock Reconciliation':
|
||||
|
||||
Reference in New Issue
Block a user