|
|
|
@@ -138,7 +138,7 @@ class StockItemConsumptionTrendReportService( |
|
|
|
COALESCE(ic.sub, '') as stockSubCategory, |
|
|
|
COALESCE(it.code, '') as itemNo, |
|
|
|
COALESCE(it.name, '') as itemName, |
|
|
|
COALESCE(uc.code, '') as unitOfMeasure, |
|
|
|
COALESCE(uc.udfudesc, '') as unitOfMeasure, |
|
|
|
CAST(COALESCE(SUM(CASE WHEN MONTH(sl.modified) = 1 THEN COALESCE(sl.outQty, 0) ELSE 0 END), 0) AS DECIMAL(18,2)) as qtyJan, |
|
|
|
CAST(COALESCE(SUM(CASE WHEN MONTH(sl.modified) = 2 THEN COALESCE(sl.outQty, 0) ELSE 0 END), 0) AS DECIMAL(18,2)) as qtyFeb, |
|
|
|
CAST(COALESCE(SUM(CASE WHEN MONTH(sl.modified) = 3 THEN COALESCE(sl.outQty, 0) ELSE 0 END), 0) AS DECIMAL(18,2)) as qtyMar, |
|
|
|
@@ -167,7 +167,7 @@ class StockItemConsumptionTrendReportService( |
|
|
|
$yearSql |
|
|
|
$lastOutDateStartSql |
|
|
|
$lastOutDateEndSql |
|
|
|
GROUP BY it.id, ic.sub, it.code, it.name, it.description, uc.code |
|
|
|
GROUP BY it.id, ic.sub, it.code, it.name, it.description, uc.udfudesc |
|
|
|
ORDER BY ic.sub, it.code |
|
|
|
""".trimIndent() |
|
|
|
|
|
|
|
|