generic API response + ICS: warehouse_balance md_rack update

This commit is contained in:
Thanakorn S
2026-04-23 16:06:19 +07:00
parent ed23c269ea
commit a75e180686
25 changed files with 934 additions and 342 deletions
+9
View File
@@ -97,6 +97,15 @@ class Reports
return (int) $this->fetchScalar($sql);
}
public function getTotalProductInStock(): int
{
$sql = "SELECT COUNT(DISTINCT product_sku)
FROM warehouse_balance
WHERE company_id = :company_id
AND (total_in - total_out) > 0";
return (int) $this->fetchScalar($sql);
}
public function getLowStockCount(): int
{
$products = $this->getStockBalance();