alert('Please log in first'); logout_processor();"; exit; } $uid = $_SESSION["userid"]; $uname = $_SESSION["username"]; $ugroup = $_SESSION["usergroup"]; $fullname = $_SESSION["fullname"]; require_once __DIR__ . "/../System_Files/connect.php"; $isAdminOrGM = in_array($role, ['admin', 'generalmanager']); // Filters (old backend jaise) $qOed = $_POST['qOed'] ?? ''; $daysOldr = $_POST['daysOld'] ?? ''; $tModel = $_POST['tModel'] ?? ''; $appRe = $_POST['appRe'] ?? ''; $isStaff = $_POST['isStaff'] ?? ''; ?> KCI | Beyond Possibilities

Quotation Approval

Filters
query($query21); while($row = $result2->fetch_assoc()){ $idU = $row['id']; // DAYS OLD CALCULATION $start = new DateTime($row['qdate']); $end = new DateTime(); $daysold = round(($end->format('U') - $start->format('U')) / 86400); // ✅ D.O FILTER — EXACT OLD BACKEND LOGIC if($daysOldr != ""){ if(strpos($daysOldr, '-') !== false){ list($a, $b) = explode('-', $daysOldr); $a = (int)$a; $b = (int)$b; if($daysold < $a || $daysold > $b){ continue; // ❌ skip this record } } } // NET PRICE $netPrice = 0; $q10 = $conn->query("SELECT * FROM tbl_quotationdetails WHERE qid='$idU'"); while($r10 = $q10->fetch_assoc()){ $netPrice += ($r10['qty'] * $r10['price']); } $netPrice = number_format($netPrice, 2); // STATUS if($row['isresolve'] == '1'){ $status = 'Rejected'; }elseif($row['qapprove'] == '0'){ $status = 'Pending'; }else{ $status = 'Approved'; } ?>
OED Zone Days Old Date Company S.R. Notes Quote Price Telephone Model Email Status Action