File manager - Edit - /home/autoph/public_html/connect/home/nav_service_left_dashboard.php
Back
<?php protected_page(); //DAILY APPOINTMENT ANALYSIS $getDealCapacity = mysql_result(mysql_query("SELECT `area_capacity` FROM `vts_dealerships` WHERE `deal_id`='$dealID' "),0); //$capacityRate = number_format(($getCheckedInUnit / $getDealCapacity) * 100,1,'.',',')."<i style='font-family:Verdana;font-size:12px;color:red'>%</i>"; $noRO = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `s_ro_no` = ''"),0); $newAppt = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `s_ro_no`='' AND `appt_date`='$toDate' AND `s_deal_code`='$dealID' || `s_arrived_time`!='' AND `s_ro_no`='' AND `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `transfer_return_date`=''"),0); $ScheduledUR = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `appt_date`='$toDate' AND `s_deal_code`='$dealID' || `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `transfer_return_date`=''"),0); $ArrivedUR = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `appt_date`='$toDate' AND `s_deal_code`='$dealID' || `s_arrived_time`!='' AND `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `transfer_return_date`=''"),0); $ArrivedGJ = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `appt_date`='$toDate' AND `s_deal_code`='$dealID' AND `s_appt_type`='GJ' || `s_arrived_time`!='' AND `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `s_appt_type`='GJ' AND `transfer_return_date`=''"),0); $ArrivedQS = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `appt_date`='$toDate' AND `s_deal_code`='$dealID' AND `s_appt_type`='QS' || `s_arrived_time`!='' AND `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `s_appt_type`='QS' AND `transfer_return_date`=''"),0); $ArrivedBP = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `appt_date`='$toDate' AND `s_deal_code`='$dealID' AND `s_appt_type`='BP' || `s_arrived_time`!='' AND `transfer_date`='$toDate' AND `transferred_to`='$dealID' AND `s_appt_type`='BP' AND `transfer_return_date`=''"),0); ?> <!---============================================================================================================================---> <!---LOADING NEWLY ENCODED APPOINTMENT LIST FOR UPDATING---> <!---============================================================================================================================---> <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> --> <script src="js/jquery.min.js"></script> <div id="wait" style="display:none;width:69px;height:89px;border:0px solid red;position:absolute;top:50%;left:50%;padding:2px;"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading..</div> <!-- add jquery --> <!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> --> <script type="text/javascript" src="js/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //alert("Its working"); $("#updateApptRecord").click(function(){ var recNum = $("#recNum").val(); var updateApptPlate= $("#updateApptPlate").val(); //var updateCarModel= $("#updateCarModel").val(); var updateApptRO= $("#updateApptRO").val(); var updateJobType= $("#updateJobType").val(); var updateGJCust= $("#updateGJCust").val(); var updateGJComp= $("#updateGJComp").val(); var updateGJWarranty= $("#updateGJWarranty").val(); var updateQSCust= $("#updateQSCust").val(); var updateQSComp= $("#updateQSComp").val(); var updateQSSSP= $("#updateQSSSP").val(); var updateBPCust= $("#updateBPCust").val(); var updateBPInsurance= $("#updateBPInsurance").val(); var updateBPWarranty= $("#updateBPWarranty").val(); var updateGJWarrantySub= $("#updateGJWarrantySub").val(); if (updateApptRO == "") { alert("Invalid Input. Please input the correct R.O number."); return false; } if (updateQSCust == "") { alert("Invalid Input. Please select Transaction Type."); return false; } $.ajax({ url: "update_new_appointment_record.php", type: "POST", async: false, data: { "done": 1, "recNum" :recNum, "updateGJWarrantySub" :updateGJWarrantySub, "updateApptPlate": updateApptPlate, //"pdateCarModel": updateCarModel, "updateApptRO": updateApptRO, "updateJobType": updateJobType, "updateGJCust": updateGJCust, "updateGJComp": updateGJComp, "updateGJWarranty": updateGJWarranty, "updateQSCust": updateQSCust, "updateQSComp": updateQSComp, "updateQSSSP": updateQSSSP, "updateBPCust": updateBPCust, "updateBPInsurance": updateBPInsurance, "updateBPWarranty": updateBPWarranty }, success: function(data){ //showActiveService(); alert("New Record Saved."); //displayFromDatabase(); //$('#updateApptRO').val(''); } }) }); }); </script> <script type="text/javascript"> function showHideAppt() { var div = document.getElementById("showNewAppt"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showHideApptNoAction() { var div = document.getElementById("showNewApptNoAction"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showArrivedAPT() { var div = document.getElementById("showArrivedtAppt"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showArrivedGJAPT() { var div = document.getElementById("showDivGJAppt"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showArrivedQSAPT() { var div = document.getElementById("showDivQSAppt"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showArrivedBPAPT() { var div = document.getElementById("showDivBPAppt"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showChecked() { var div = document.getElementById("showCheckedInVehicle"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } </script> <!---============================================================================================================================---> <!---END OF SCRIPT---> <!---============================================================================================================================---> <div id="showCheckedInVehicle" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px;background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ Checked-In Vehicles</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of checked-in Vehicles inside this facility. Checked-in vehicles are combination of Service Appointment, Walk-In, Guest, Pre-owned and Brand New units parked inside your building </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'> ☶ List of Checked-In Vehicle: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showChecked()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style="overflow:auto;border:1px solid gray;width:100%;height:100%;"> <?php $loadInfoB = mysql_query("SELECT * FROM vts_in_out_history WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `tag_as_out`='' ORDER BY `chk_id` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th class='bgBlue;color:white; font-size:12px'>PLATE</th> <th class='bgBlue;color:white; font-size:10px'>MILEAGE</th> <th class='bgBlue;color:white; font-size:10px'>BRAND</th> <th class='bgBlue;color:white; font-size:10px'>MODEL</th> <th class='bgBlue;color:white; font-size:10px'>STATUS</th> <th class='bgBlue;color:white; font-size:10px'>DATE IN</th> <th class='bgBlue;color:white; font-size:10px'>TIME IN</th> <th class='bgBlue;color:white; font-size:10px'>LOCATION</th> <th class='bgBlue;color:white; font-size:10px'>NOTES</th> </tr> </thead>"; while($lrow=mysql_fetch_array($loadInfoB)){ $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$lrow['chk_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$lrow['chk_plate']."'"),0); echo "<tr>"; echo "<td style='padding:5px;font-size:10px'>".$lrow['chk_plate']."</td>"; echo "<td style='padding:5px;font-size:10px'>".$lrow['chk_km']."</td>"; echo "<td style='padding:5px;font-size:10px'>".$brandName."</td>"; echo "<td style='padding:5px;font-size:10px'>".$modelName."</td>"; echo "<td style='padding:5px;font-size:10px'>".$lrow['chk_transaction']."</td>"; echo "<td style='padding:5px;font-size:10px'>".$lrow['date']."</td>"; echo "<td style='padding:5px;font-size:10px'>".$lrow['time']."</td>"; echo "<td style='padding:5px;font-size:10px'>"; $getDealName = mysql_result(mysql_query("SELECT `deal_name` FROM `vts_dealerships` WHERE `deal_id`='".$lrow['dealer_code']."'"),0); echo $getDealName; echo"</td>"; echo "<td style='padding:2px;font-size:10px'>"; $getLocName = mysql_result(mysql_query("SELECT `out_description` FROM `vts_check_out_reasons` WHERE `out_id`='".$lrow['location_code']."'"),0); echo $getLocName; echo"</td>"; echo"</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!---============================================================================================================================---> <!---============================================================================================================================---> <div id="showNewAppt" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ Daily Service Appointment</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showHideAppt()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='font-family:Vehicle;color:black;width:20%; padding:15px;border-right:1px solid gray;height:95%;min-height:100px;float:left;margin:0px;min-width:250px;background:white'> <div style='text-align:left;float:left;width:48%;border:0px solid red;margin:1px;padding-left:0px;'> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:5px;padding-top:5px;'> <b style='font-family:Verdana;font-size:12px;color:#000;margin-left:5px;font-weight:normal'>REC#: </b><br><input type='text' disabled id='recNum' style="text-align:left;font-weight:bold;min-width:100px;padding:5px;font-size:12px;"> </div> </div> <div style='text-align:left;float:right;width:48%;border:0px solid red;margin:1px;padding-left:0px;'> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:5px;padding-top:5px;'> <b style='font-family:Verdana;font-size:12px;color:#000;margin-left:5px;font-weight:normal'>VEHICLE PLATE: </b><br><input type='text' disabled id='updateApptPlate' style="text-align:left;font-weight:bold;min-width:100px;padding:5px;font-size:12px;"> </div> </div> <div style='float:right;width:100%;border:0px solid red;margin:1px;padding-left:5px;'> <b style='font-family:Verdana;font-size:12px;color:#000;margin-left:5px;font-weight:normal'>CAR MODEL:</b><br> <input type='text' disabled id='updateCarModel' style="text-align:left;font-weight:normal;min-width:100px;padding:5px;font-family:Verdana;font-size:12px;"> </div> <div style='float:right;width:100%;border:0px solid red;margin:1px;padding-left:5px;'> <b style='font-family:Verdana;font-size:12px;color:#000;margin-left:5px;font-weight:normal'>R.O NUMBER:</b><br><input type='text' id='updateApptRO' style="border:1px solid red;text-align:left;font-weight:normal;min-width:100px;padding:5px;font-family:Verdana;font-size:16px;"> </div> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding :5px;'> <script type="text/javascript"> $(document).ready(function(){ $('#updateJobType').on('change', function(){ if ( this.value == 'GJ') { $("#GJForm").show(); $("#BPForm").hide(); $("#QSForm").hide(); $("#updateQSComp").val('NO'); $("#updateQSCust").val('NO'); $("#updateQSSSP").val('NO'); $("#gjWarrantySub").val('NO'); $("#updateBPInsurance").val('NO'); $("#updateBPCust").val('NO'); $("#updateBPWarranty").val('NO'); } else if ( this.value == 'BP'){ $("#BPForm").show(); $("#GJForm").hide(); $("#QSForm").hide(); $("#updateQSComp").val('NO'); $("#updateQSCust").val('NO'); $("#updateQSSSP").val('NO'); $("#updateGJWarranty").val('NO'); $("#updateGJCust").val('NO'); $("#updateGJComp").val('NO'); $("#updateGJWarrantySub").val('NA'); } else { $("#QSForm").show(); $("#GJForm").hide(); $("#BPForm").hide(); $("#updateBPInsurance").val('NO'); $("#updateBPCust").val('NO'); $("#updateBPWarranty").val('NO'); $("#updateGJWarranty").val('NO'); $("#updateGJCust").val('NO'); $("#updateGJComp").val('NO'); $("#updateGJWarrantySub").val('NA'); } }); }); </script> <b style='font-family:Verdana;font-size:12px;color:#000;margin-left:5px;font-weight:normal'>SERVICE TYPE:</b> <select id='updateJobType' style='padding:7px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value=''>--Select Service Type--</option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_service_type` WHERE `status`='1' ORDER BY `serv_desc` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['code']."'>".$out['serv_desc']."</option>"; } ?> </select> </div> <div id="GJForm" style='display:none;float:left;width:90%;border:1px solid black;margin:10px;padding:10px;height:200px;background:lightgray'> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>TRANSACTION TYPE:</b> <select id='updateGJCust' style='padding:2px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='CP'>Customer Paid</option> <option value='CPO'>Company P.O</option> <option value='SSP'>Scheduled Service Plan - SSP</option> </select> </div> <!--<div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>COMPANY P.O:</b> <select id='updateGJComp' style='padding:2px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div>--> <script type="text/javascript"> $(document).ready(function(){ $('#updateGJWarranty').on('change', function() { if ( this.value == 'YES') { $("#gjWarrantySub").show(); } else { $("#gjWarrantySub").hide(); $("#updateGJWarrantySub").val('NA'); } }); }); </script> <div id="gjWarranty" style='text-align:left;float:left;width:48%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal;text-align:left;'>WARRANTY</b> <select id='updateGJWarranty' style='padding:2px;width:45%;min-width:100px;float:left;border:1px solid gray;'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> <div id="gjWarrantySub" style='display:none;text-align:left;float:right;width:48%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal;text-align:left;'>CLAIM TYPE</b> <select id='updateGJWarrantySub' style='padding:2px;width:45%;min-width:100px;float:left;border:1px solid gray;'> <option value='NA'>NA</option> <option value='MAN'>MAN</option> <option value='EXT'>EXT</option> </select> </div> </div> <div id="QSForm" style='display:none;float:left;width:90%;border:1px solid black;margin:10px;padding:10px;height:200px;background:lightgray'> <!--START OF QSS FORM--> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>TRANSACTION TYPE:</b> <select id='updateQSCust' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='CP'>Customer Paid</option> <option value='CPO'>Company P.O</option> <option value='SSP'>Scheduled Service Plan - SSP</option> </select> </div> <!--<div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>COMPANY P.O:</b> <select id='updateQSComp' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> --> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>SSP:</b> <select id='updateQSSSP' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> <!--END OF QSS FORM--> </div> <div id="BPForm" style='display:none;float:left;width:90%;border:1px solid black;margin:10px;padding:10px;height:200px;background:lightgray'> <!--START OF BP FORM--> <script type="text/javascript"> $(document).ready(function(){ $('#updateBPCust').on('change', function() { if ( this.value == 'YES') { $("#updatePB").hide(); $("#updateWarranty").hide(); $("#updateBPInsurance").val('NO'); $("#updateBPWarranty").val('NO'); }else { $("#updatePB").show(); $("#updateBPCust").val('NO'); $("#updateWarranty").val('NO'); $("#updateBPInsurance").val('YES'); } }); $('#updateBPInsurance').on('change', function() { if ( this.value == 'YES') { $("#updateWarranty").hide(); $("#updateBPCust").val('NO'); $("#updateBPWarranty").val('NO'); }else { $("#updateWarranty").show(); $("#updateBPCust").val('NO'); $("#updateBPInsurance").val('NO'); $("#updateBPWarranty").val('YES'); } }); }); </script> <div style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>CUSTOMER PAID:</b> <select id='updateBPCust' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> <div id="updatePB" style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>INSURANCE PAID</b> <select id='updateBPInsurance' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray;'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> <div id="updateWarranty" style='float:left;width:100%;border:0px solid red;margin:1px;padding-left:0px;'> <b style='font-family:Verdana;font-size:10px;color:#000;margin-left:5px;font-weight:normal'>WARRANTY:</b> <select id='updateBPWarranty' style='padding:3px;width:100%;min-width:100px;float:left;border:1px solid gray'> <option value='NO'>NO</option> <option value='YES'>YES</option> </select> </div> <!--END OF BP FORM--> </div> <div style='float:right;width:100%;border:0px solid red;margin:1px;text-align:right;padding-right:3px'> <input type='submit' id='updateApptRecord' value="Update Record" style="width:100%;text-align:center;font-weight:normal;min-width:60px;padding:8px;font-family:Verdana;font-size:12px;"> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:80%; height:90%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `s_ro_no` = '' AND `s_arrived_time`!='' || `transferred_to`='$dealID' AND `transfer_date` = '$toDate' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>Arrived Time </th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandID=$row['brand_id']; $modelID=$row['model_id']; $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_v_plate']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_arrived_time']."</td>"; echo "<td>"; if($row['s_ro_no']==''){ echo 'Preparing Repair Order Document'; }else{ echo 'For Endorsement to Job Control'; } echo"</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--==================================SHOW ARRIVED GJ LIST APPOITMENT===========================================================--> <div id="showDivQSAppt" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ General Job</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showArrivedQSAPT()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:100%; height:96%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_appt_type`='QS' AND `s_deal_code`='$dealID' AND `appt_date`='$toDate' AND `s_arrived_time`!='' || `s_appt_type`='QS' AND `transferred_to`='$dealID' AND `transfer_date` = '$toDate' AND `s_arrived_time`!='' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>Cust. Name</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>C. Sticker</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>E-mail</th> <th class='bgBlue;font-color:black;width:10%'>Mobile</th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandID=$row['brand_id']; $modelID=$row['model_id']; $brandName = mysql_result(mysql_query("SELECT `b_name` FROM `vts_brands` WHERE `b_id`='$brandID'"),0); $modelName = mysql_result(mysql_query("SELECT `m_name` FROM `vts_model` WHERE `m_id`='$brandID'"),0); $vPlate=$row['s_v_plate']; $ConductionSticker = mysql_result(mysql_query("SELECT `v_conduction` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $cID= mysql_result(mysql_query("SELECT `cust_id` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$cID'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$custFName." ".$custLName ."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_v_plate']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$ConductionSticker."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vEmail."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vMobile."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>"; if($row['s_arrived_time']==''){ echo 'Waiting to Arrive'; }else{ echo 'Arrived at '.$row['s_arrived_time']; } echo "</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--==================================SHOW ARRIVED GJ LIST APPOITMENT===========================================================--> <div id="showDivGJAppt" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ General Job</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showArrivedGJAPT()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:100%; height:96%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_appt_type`='GJ' AND `s_deal_code`='$dealID' AND `appt_date`='$toDate' AND `s_arrived_time`!='' || `s_appt_type`='GJ' AND `transferred_to`='$dealID' AND `transfer_date` = '$toDate' AND `s_arrived_time`!='' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>Cust. Name</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>C. Sticker</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>E-mail</th> <th class='bgBlue;font-color:black;width:10%'>Mobile</th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> <th class='bgBlue;font-color:black;width:10%'>Released Date / Time </th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $vPlate=$row['s_v_plate']; $ConductionSticker = mysql_result(mysql_query("SELECT `v_conduction` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $cID= mysql_result(mysql_query("SELECT `cust_id` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$cID'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$custFName." ".$custLName ."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_v_plate']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$ConductionSticker."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vEmail."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vMobile."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>"; if($row['s_arrived_time']==''){ echo 'Waiting to Arrive'; }else{ echo 'Arrived at '.$row['s_arrived_time']; } echo "</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['date_closed']." | ".$row['time_closed']." </td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--==================================SHOW ARRIVED BG LIST APPOITMENT===========================================================--> <div id="showDivBPAppt" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ General Job</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showArrivedBPAPT()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:100%; height:96%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_appt_type`='BG' AND `s_deal_code`='$dealID' AND `appt_date`='$toDate' AND `s_arrived_time`!='' || `s_appt_type`='BG' AND `transferred_to`='$dealID' AND `transfer_date` = '$toDate' AND `s_arrived_time`!='' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>Cust. Name</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>C. Sticker</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>E-mail</th> <th class='bgBlue;font-color:black;width:10%'>Mobile</th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> <th class='bgBlue;font-color:black;width:10%'>Released Date / Time </th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $vPlate=$row['s_v_plate']; $ConductionSticker = mysql_result(mysql_query("SELECT `v_conduction` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $cID= mysql_result(mysql_query("SELECT `cust_id` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$cID'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$custFName." ".$custLName ."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_v_plate']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$ConductionSticker."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vEmail."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vMobile."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>"; if($row['s_arrived_time']==''){ echo 'Waiting to Arrive'; }else{ echo 'Arrived at '.$row['s_arrived_time']; } echo "</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['date_closed']." | ".$row['time_closed']." </td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--==================================SHOW ARRIVED APPOITMENT========showDivGJAppt===================================================--> <div id="showArrivedtAppt" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ Arrived Vehicle</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showArrivedAPT()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:100%; height:96%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `appt_date`='$toDate' AND `s_arrived_time`!='' || `transferred_to`='$dealID' AND `transfer_date` = '$toDate' AND `s_arrived_time`!='' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>Cust. Name</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>C. Sticker</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>E-mail</th> <th class='bgBlue;font-color:black;width:10%'>Mobile</th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> <th class='bgBlue;font-color:black;width:10%'>Released Date/Time</th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $vPlate=$row['s_v_plate']; $ConductionSticker = mysql_result(mysql_query("SELECT `v_conduction` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $cID= mysql_result(mysql_query("SELECT `cust_id` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$cID'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$custFName." ".$custLName ."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_v_plate']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$ConductionSticker."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vEmail."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vMobile."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>"; if($row['s_arrived_time']==''){ echo 'Waiting to Arrive'; }else{ echo 'Arrived at '.$row['s_arrived_time']; } echo "</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['date_closed']." | ".$row['time_closed']." </td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--========================SHOW APPOITMENT LIST=====================================================================--> <div id="showNewApptNoAction" style='display:none;border:1px solid blue;width:99%;height:88%;min-height:300px;float:left;margin:5px; background:lightgray;position:absolute;top:5px;left:5px;z-index:99999'> <h2 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding:5px;padding-bottom:-5px;color:black;border:0px solid red;'>☶ Daily Service Appointment</h2> <i style='font-family:Verdana;font-size:10px;color:black;padding-left:30px'>List of newly received service appointment </i> <div style='border:1px solid gray;width:99.4%;height:90%;min-height:250px;float:left;margin:5px;min-width:400px;background:white;top:-10px;padding:0px'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;font-family:Verdana;font-weight:normal;color:#043062;padding-right:5px'>☶ List of Active Vehicle for Service: <div style='float:right;font-family:Verdana;font-size:15px;width:20px;background:transparent'> <a href='#' onclick="showHideApptNoAction()" style='font-weight:bold;background:none'> ✕ </a> </div> </div> <div style='float:left;overflow:auto;border:1px solid gray;width:100%; height:96%;min-height:100px;margin:0px;background:white;padding:3px'> <?php $getApptSum = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `appt_date`='$toDate' || `transferred_to`='$dealID' AND `transfer_date` = '$toDate' ORDER BY `time_slot_code` ASC"); echo "<table id='apptSummary' style='width:100%'>"; echo "<thead>"; echo "<tr class='tablehead'> <th class='bgBlue;font-color:black;width:15%'>REC.NO</th> <th class='bgBlue;font-color:black;width:15%'>Cust. Name</th> <th class='bgBlue;font-color:black;width:15%'>V. Plate</th> <th class='bgBlue;font-color:black;width:15%'>C. Sticker</th> <th class='bgBlue;font-color:black;width:15%'>RO #</th> <th class='bgBlue;font-color:black;width:40%'>V. Brand</th> <th class='bgBlue;font-color:black;width:40%'>V. Model</th> <th class='bgBlue;font-color:black;width:15%'>Type </th> <th class='bgBlue;font-color:black;width:10%'>Appt. Date </th> <th class='bgBlue;font-color:black;width:10%'>E-mail</th> <th class='bgBlue;font-color:black;width:10%'>Mobile</th> <th class='bgBlue;font-color:black;width:10%'>Current Status </th> <th class='bgBlue;font-color:black;width:10%'>Released Date/Time</th> </tr> </thead>"; while($row=mysql_fetch_array($getApptSum)){ if($row['s_ro_no']==='' && $row['s_arrived_time']!=''){ $tColor="red"; }else{ $tColor="black"; } $brandID=$row['brand_id']; $modelID=$row['model_id']; $brandName=mysql_result(mysql_query("SELECT `v_brand` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $modelName=mysql_result(mysql_query("SELECT `v_model` FROM `vts_vehicle_lists` WHERE `v_plate`='".$row['s_v_plate']."'"),0); $vPlate=$row['s_v_plate']; $ConductionSticker = mysql_result(mysql_query("SELECT `v_conduction` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $cID= mysql_result(mysql_query("SELECT `cust_id` FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"),0); $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$cID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$cID'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_id']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$custFName." ".$custLName ."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'><a href='mainindex.php?id=20&d=2&edit=".$row['s_v_plate']."'>".$row['s_v_plate']."</a></td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$ConductionSticker."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_ro_no']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$brandName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$modelName."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['s_appt_type']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['appt_date']."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vEmail."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$vMobile."</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>"; if($row['s_arrived_time']==''){ echo 'Waiting to Arrive'; }else{ echo 'Arrived at '.$row['s_arrived_time']; } echo "</td>"; echo "<td style='font-size:10px;color:$tColor;padding:3px'>".$row['date_closed']." | ".$row['time_closed']." </td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <!--=============================================================================================--> <script type="text/javascript"> $(document).ready(function() { $('.tablecell').click(function() { return false; }).dblclick(function() { window.open("your_url"); return false; }); }); </script> <script language="javascript" type="text/javascript"> function showApptInfo(row) { var x=row.cells; document.getElementById("recNum").value = x[0].innerHTML; document.getElementById("updateApptPlate").value = x[1].innerHTML; document.getElementById("updateApptRO").value = x[2].innerHTML; //document.getElementById("updateJobType").value = x[4].innerHTML; document.getElementById("updateCarModel").value = x[4].innerHTML; } </script> <!---============================================================================================================================---> <!---END CODE LOAD NEW SERVICE APPT---> <!---============================================================================================================================---> <div style="background:#fff;height:auto; border-right:0px solid gray"> <div class="vertical-menu" style=' width:100%;border-bottom:0px solid black'> <a href="#" class="active" style='padding:3px;padding-left:5px;font-family:Verdana;font-size:16px;font-weight:normal;color:#000'>☵ Daily Appointment</a> <div style='height:auto;width:100%;float:left;text-align:centerl;font-family:Verdana;font-size:30px;border:0px solid red;background:#e0f5fa;padding:5px'> <a href="#" onclick="showHideApptNoAction()" style='padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$ScheduledUR."</b> ❩";?> Scheduled </a> <a href="#"onclick="showArrivedAPT()" style='border-bottom:1px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$ArrivedUR."</b> ❩";?> Arrived </a> <a href="#" onclick="showArrivedGJAPT()" style='border-bottom:0px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$ArrivedGJ."</b> ❩";?> General Job </a> <a href="#" onclick="showArrivedQSAPT()" style='border-bottom:0px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$ArrivedQS."</b> ❩";?> Quick Service </a> <a href="#" onclick="showArrivedBPAPT()" style='border-bottom:0px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$ArrivedBP."</b> ❩";?> Body Paint </a> </div> </div> </div> <?php //OPEN R.O/SERVICE ANALYSIS $OpenPendingRO = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `s_deal_code`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' || `s_arrived_time`!='' AND `transferred_to`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `transfer_return_date`=''"),0); $OpenPendingQS = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `s_deal_code`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='QS' || `s_arrived_time`!='' AND `transferred_to`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='QS' AND `transfer_return_date`=''"),0); $OpenPendingGJ = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `s_deal_code`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='GJ' || `s_arrived_time`!='' AND `transferred_to`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='GJ' AND `transfer_return_date`=''"),0); $OpenPendingBP = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_arrived_time`!='' AND `s_deal_code`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='BP' || `s_arrived_time`!='' AND `transferred_to`='$dealID' AND `s_ro_no`!='' AND `service_status`='0' AND `s_appt_type`='BP' AND `transfer_return_date`=''"),0); ?> <div style="background:#e8f6f3;height:auto; border-right:0px solid gray;border-bottom:1px solid gray"> <div class="vertical-menuB" style='height:auto;width:100%;border-bottom:0px solid black'> <a href="#" class="active" style='padding:3px;padding-left:5px;font-family:Verdana;font-size:16px;font-weight:normal;color:#000'>☵ Open Repair Order</a> <div style='height:130px;width:100%;float:left;text-align:centerl;font-family:Verdana;font-size:30px;border:0px solid red;background:#e8f6f3;padding:5px'> <a href="#" style='background:#e8f6f3;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$OpenPendingQS."</b> ❩";?> Quick Service </a> <a href="#" style='background:#e8f6f3;border-bottom:0px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$OpenPendingGJ."</b> ❩";?> General Job </a> <a href="#" style='background:#e8f6f3;border-bottom:0px dashed lightgray;padding:5px;padding-left:10px;margin:0px;color:#5b5957 ;font-family:Verdana;font-size:14px;'><?php echo "❨ <b style='font-family:Agency FB;font-size:18px;color:blue'>".$OpenPendingBP."</b> ❩";?> Body & Paint </a> </div> </div> </div> <?php //SERVICE AREA ANALYSIS $getCheckedInUnit = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `tag_as_out`=''"),0); if($getCheckedInUnit > 1){ $notifyMSG = "There are ".$getCheckedInUnit. " units parked inside your bldg."; $notifyMSG = "There are ❨ <b style='font-family:Agency FB;font-size:14px;color:blue'>".$getCheckedInUnit. "</b> ❩ units parked inside your bldg."; }else if($getCheckedInUnit == 1){ $notifyMSG = "Only ❨ <b style='font-family:Agency FB;font-size:14px;color:blue'>".$getCheckedInUnit. "</b> ❩ unit left parked inside your bldg"; }else { $notifyMSG = $notifyMSG = "❨ <b style='font-family:Agency FB;font-size:14px;color:blue'>".$getCheckedInUnit. "</b> ❩ No vehicle has been parked yet inside your bldg."; } //$getCheckedOUTUnit = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `comp_code`='$compID' AND `dealer_code`='$dealID' AND `chk_transaction`='OUT'"),0); $totalCarInside = $getCheckedInUnit - $getCheckedOUTUnit; $getCheckedInWI = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `location_code`='6' AND `tag_as_out`=''"),0); $getCheckedInCount = $getCheckedInWI ; $getCheckedInAPPT = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `location_code`='3' AND `tag_as_out`=''"),0); $getCheckedApptTotal =$getCheckedInAPPT; $getCheckedInGUEST = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `location_code`='4' AND `tag_as_out`=''"),0); $getCheckedInOwned = mysql_result(mysql_query("SELECT COUNT('chk_id') FROM `vts_in_out_history` WHERE `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `location_code`='5' AND `tag_as_out`=''|| `dealer_code`='$dealID' AND `chk_transaction`='IN' AND `location_code`='9' AND `tag_as_out`=''"),0); $getDealCapacity = mysql_result(mysql_query("SELECT `area_capacity` FROM `vts_dealerships` WHERE `deal_id`='$dealID' "),0); $capacityRate = number_format(($getCheckedInUnit / $getDealCapacity) * 100,1,'.',','); ?> <div style="background:lightgray;height:auto; border-right:0px solid gray;padding:3px"> <div class="vertical-menuA" style='background:white;width:100%;border-bottom:0px solid black'> <a href="#" class="active" style='background:lightgray;padding:2px;padding-left:5px;font-family:Verdana;font-size:14px;font-weight:normal;color:#000'>☵ Service Area Capacity (<?php echo $getDealCapacity;?>)</a> <div style='height:auto;width:100%;float:left;text-align:centerl;font-family:Verdana;font-size:30px;border:0px solid red;background:transparent;padding:1px;margin:0px'> <a href="#" onclick="showChecked()" style='background:transparent;padding:5px;padding-left:10px;margin:0px;color:yellow ;font-family:Verdana;font-size:16px;'><?php echo $notifyMSG;?></a> </div> <div style='width:100%;float:left;text-align:center;font-family:Verdana;font-size:16px;color:red;border:1px solid #808b96 ;border-radius:0px;background:white;height:55px'> <div style='border:0px solid red; background:orange;height:100%;width:<?php echo $capacityRate;?>%'></div> </div> <div style='width:100%;float:left;text-align:center;font-family:Verdana;font-size:14px;color:black;border:0px solid #000;border-radius:0px;background:transparent;height:15px'> Your Workshop Load (<?php echo $capacityRate ."%";?>) </div> </div> </div>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings