Merge pull request #16746 from deepeshgarg007/gross_profit
fix: Decimal point issue in gross profit print
diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py
index 09cf5b1..2c7bd72 100644
--- a/erpnext/accounts/report/financial_statements.py
+++ b/erpnext/accounts/report/financial_statements.py
@@ -270,7 +270,7 @@
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
- row[period.key] = 0.0
+ row[period.key] = row.get(period.key, 0.0)
total_row.setdefault("total", 0.0)
total_row["total"] += flt(row["total"])
diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py
index 6242fa7..487c765 100644
--- a/erpnext/stock/dashboard/item_dashboard.py
+++ b/erpnext/stock/dashboard/item_dashboard.py
@@ -28,7 +28,7 @@
# user does not have access on warehouse
return []
- return frappe.db.get_all('Bin', fields=['item_code', 'warehouse', 'projected_qty',
+ items = frappe.db.get_all('Bin', fields=['item_code', 'warehouse', 'projected_qty',
'reserved_qty', 'reserved_qty_for_production', 'reserved_qty_for_sub_contract', 'actual_qty', 'valuation_rate'],
or_filters={
'projected_qty': ['!=', 0],
@@ -41,3 +41,10 @@
order_by=sort_by + ' ' + sort_order,
limit_start=start,
limit_page_length='21')
+
+ for item in items:
+ item.update({
+ 'item_name': frappe.get_cached_value("Item", item.item_code, 'item_name')
+ })
+
+ return items