Update penyempurnaan activities product untuk menampilkan produk tapi tidak bisa di klik/pilih

This commit is contained in:
mikael-zakaria 2025-09-02 11:00:07 +07:00
parent 6820de87e2
commit e9808fa470
2 changed files with 9 additions and 2 deletions

View File

@ -581,7 +581,7 @@ class Activities extends Controller {
FROM products p FROM products p
LEFT JOIN productcatalog pc ON pc.`catalogid`=p.`catalogid` LEFT JOIN productcatalog pc ON pc.`catalogid`=p.`catalogid`
LEFT JOIN producttype pt ON pt.`producttypeid`= pc.`producttypeid` LEFT JOIN producttype pt ON pt.`producttypeid`= pc.`producttypeid`
WHERE p.siteid=$siteid and productaliasid<>0 and COALESCE(active, 1) = 1 WHERE p.siteid=$siteid and productaliasid<>0
ORDER BY FIELD(pt.producttypeid, 20, 19, 21, 12, 10, 14, 11, 13, 4, 3) DESC, pc.productname"; ORDER BY FIELD(pt.producttypeid, 20, 19, 21, 12, 10, 14, 11, 13, 4, 3) DESC, pc.productname";
$query = $db->query($sql); $query = $db->query($sql);
$results = $query->getResultArray(); $results = $query->getResultArray();

View File

@ -9,9 +9,16 @@
$qproductname = $data['productname']; $qproductname = $data['productname'];
$qproductnumber = $data['productnumber']; $qproductnumber = $data['productnumber'];
$qproductlocationenddate = $data['locationenddate']; $qproductlocationenddate = $data['locationenddate'];
$qproductactive = $data['active'];
if($qproductlocationenddate == NULL){ if($qproductlocationenddate == NULL){
if($productid == $qproductid) { echo "<option value='$qproductid' selected>$qproductname ( SN# $qproductnumber )</option>"; } if($productid == $qproductid) { echo "<option value='$qproductid' selected>$qproductname ( SN# $qproductnumber )</option>"; }
else { echo "<option value='$qproductid'>$qproductname ( SN# $qproductnumber )</option>"; } else {
if ($qproductactive == 2) {
echo "<option value='$qproductid' disabled>$qproductname ( SN# $qproductnumber )</option>";
} else {
echo "<option value='$qproductid'>$qproductname ( SN# $qproductnumber )</option>";
}
}
} }
} }
?> ?>