implement JS password scoring, td_stock approve logicc

This commit is contained in:
Thanakorn S
2026-04-30 15:14:42 +07:00
parent db5c47b6ca
commit ac4fd9a5ad
3147 changed files with 1298 additions and 343 deletions
+14 -6
View File
@@ -3,12 +3,20 @@
require '../../../assets/utils/db_auth.php';
require '../../../assets/utils/classes/WarehouseManager.php';
$wh = new WarehouseManager($pdo2, $company_id);
$answer['output'] = $wh->getWarehouseList(
$data['type'] ?? '',
$data['product_sku'] ?? '',
(int)($data['id'] ?? 0)
);
$wh = new WarehouseManager($pdo2, $company_id);
$type = $data['type'] ?? '';
$sku = $data['product_sku'] ?? '';
$lot = $data['lot_number'] ?? '';
$id = (int)($data['id'] ?? 0);
// When type=from and a lot is selected, filter warehouses to only those
// holding that specific lot in an approved, rack-occupied stock-in row.
if ($type === 'from' && $sku && $lot) {
$answer['output'] = $wh->getWarehousesByLot($sku, $lot);
} else {
$answer['output'] = $wh->getWarehouseList($type, $sku, $id);
}
$answer['success'] = 1;
exit(json_encode($answer));
?>