Fix calculate errors
This commit is contained in:
@@ -119,8 +119,7 @@ async function calculateFinancialMetrics(startTime, totalProducts, processedCoun
|
||||
WHEN COALESCE(mf.inventory_value, 0) > 0 AND mf.active_days > 0 THEN
|
||||
(COALESCE(mf.gross_profit, 0) * (365.0 / mf.active_days)) / COALESCE(mf.inventory_value, 0)
|
||||
ELSE 0
|
||||
END,
|
||||
pta.last_calculated_at = CURRENT_TIMESTAMP
|
||||
END
|
||||
`);
|
||||
|
||||
processedCount = Math.floor(totalProducts * 0.70);
|
||||
|
||||
Reference in New Issue
Block a user