implement JS password scoring, td_stock approve logicc
This commit is contained in:
@@ -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));
|
||||
?>
|
||||
Reference in New Issue
Block a user