mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 06:31:48 +00:00
Revert "fix(stock): guard traceability qty division against a zero divisor (Postgres)"
This reverts commit 3859919263.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.query_builder import Case
|
||||
from frappe.query_builder.functions import NullIf
|
||||
|
||||
|
||||
def execute(filters: dict | None = None):
|
||||
@@ -301,12 +300,9 @@ class ReportData:
|
||||
(
|
||||
(
|
||||
stock_entry_detail.qty
|
||||
/ NullIf(
|
||||
Case()
|
||||
.when(stock_entry.fg_completed_qty > 0, stock_entry.fg_completed_qty)
|
||||
.else_(sabb_data.qty),
|
||||
0,
|
||||
)
|
||||
/ Case()
|
||||
.when(stock_entry.fg_completed_qty > 0, stock_entry.fg_completed_qty)
|
||||
.else_(sabb_data.qty)
|
||||
)
|
||||
* sabb_data.qty
|
||||
).as_("qty"),
|
||||
|
||||
Reference in New Issue
Block a user