format("Y/m/d"); $empID=$user_data['u_id']; $comID=$user_data['company']; //$comName=$_GET['company'];//mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$comID'"),0); $userBrand=mysql_result(mysql_query("SELECT `brand` FROM `vts_company` WHERE `comp_code`='$comName'"),0); //echo $comID . " |". $comName ." |". $userBrand." |". $empID; ?> ".$bBrand." ".$selModel." - Latest Inventory Information"; echo ""; echo ""; while($row=mysql_fetch_array($result)){ if($row['reserved']==0 && $row['incoming_unit']==0){ $incomoing = 0; $status= "Available"; $txtColor='Black'; }else if($row['reserved']==1 && $row['incoming_unit']==0){ $status= "Reserved"; $incomoing = 0; $txtColor=' #000'; }else{ $status= "Incoming"; $txtColor='#000'; $incomoing = 1; } ?>99 && $totalCount < 180){ $bgColor="#fae663"; $txtColor='#000000'; }else if($totalCount > 180){ $bgColor="#fc8b3d "; }else{ $bgColor="#cafe76"; } echo ""; echo ""; echo ""; ?>".$row['description'].""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
BRAND/MODEL YEAR MODEL COLOR CS # UNIT DESCRIPTION STATUS S. PRICE DATE RECEIVED AGING SELLING DEALER UNIT LOCATION ACTION REF#
".$row['brand_code']."".$row['year_model']."".$row['color']." ".$row['status']."".number_format($row['price'],2,'.',',')."".$row['date_received'].""; echo "".$totalCount ." ".$MyDay.""; echo"".$row['selling_dealer']."".$row['unit_location'].""; if($status != 'Incoming'){ if($row['reserved']==0){ echo " |"; echo ""; }else{ echo ""; echo ""; } }else{ echo ""; } echo "".$row['id']."
"; exit(); } ?> ".$bBrand." ".$selModel." - Latest Inventory Information"; echo ""; echo ""; while($row=mysql_fetch_array($result)){ $brand=$row['brand']; $ifSold =$row['sold']; $ifReturned =$row['returned']; $chkInMyAccess = mysql_result(mysql_query("SELECT COUNT('id') FROM `brand_access` WHERE `user_id`='$empID' AND `brand_name`='$brand'"),0); if($chkInMyAccess < 1){ //echo $chkInMyAccess; }else{ if($row['reserved']==0 && $row['incoming_unit']==0){ $incomoing = 0; $status= "Available"; $txtColor='Black'; }else if($row['reserved']==1 && $row['incoming_unit']==0){ $status= "Reserved"; $incomoing = 0; $txtColor=' #0c5bdc'; }else{ $status= "Incoming"; $txtColor='#ec6209'; $incomoing = 1; } if($ifSold ==1 || $ifReturned==1){ //========================================================================================================== ?>".$row['brand_code'].""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //========================================================================================================== }else{ ?>".$row['brand_code'].""; echo ""; echo ""; ?>".$row['description'].""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //========================================================================================================== } } } echo "
BRAND/MODEL YEAR MODEL COLOR CS # UNIT DESCRIPTION STATUS S. PRICE DATE RECEIVED AGING SELLING DEALER UNIT LOCATION ACTION REF#
".$row['year_model']."".$row['color']."".$row['cs_number']."".$row['description'].""; echo $row['status']; echo" ".number_format($row['price'],2,'.',',')." ".$row['date_received'].""; $olddate = $row['date_received']; $now = $row['date_released']; // or your date as well $your_date = strtotime($olddate); $Sold_date = strtotime($now); $datediff = $Sold_date - $your_date; $totalCount = round($datediff / (60 * 60 * 24)); if($datediff == 1){ $MyDay="Day"; }else{ $MyDay="Days"; } echo "".round($datediff / (60 * 60 * 24)) ." ".$MyDay.""; echo"".$row['selling_dealer']."".$row['unit_location'].""; echo "Unit Not Available"; echo "".$row['id']."
".$row['year_model']."".$row['color'].""; echo $row['status']; echo"".number_format($row['price'],2,'.',',')."".$row['date_received'].""; $olddate = $row['date_received']; $now = time(); // or your date as well $your_date = strtotime($olddate); $datediff = $now - $your_date; $totalCount = round($datediff / (60 * 60 * 24)); if($datediff == 1){ $MyDay="Day"; }else{ $MyDay="Days"; } echo "".round($datediff / (60 * 60 * 24)) ." ".$MyDay.""; echo"".$row['selling_dealer']."".$row['unit_location'].""; if($status != 'Incoming'){ if($row['reserved']==0){ echo " |"; echo ""; }else{ echo "|"; echo ""; } }else{ echo ""; } echo "".$row['id']."
"; exit(); }