File manager - Edit - /home/autoph/public_html/connect/home/REPORTS/RPT_REPORTC.php
Back
<html> <head> <style> .tBalls{ font-family:Arial; font-size:12px; font-weight:bold; padding:5px border:1px solid gray; background:lightgray; } </style> </head> <?php date_default_timezone_set('Asia/Singapore'); //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); $connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; mysql_connect('localhost','autoph_arnel','Hke@2001') or die ($connect_error); mysql_select_db('autoph_connect') or die($connect_error); error_reporting(0); session_start(); $activeID = ($_SESSION[ActiveID]); //echo "Active ID :".$activeID; $brand=$_GET['brandSelected']; $incNEW=$_GET['includeNew']; $filCompany=$_GET['paraModelC']; // $brandName = mysql_result(mysql_query("SELECT `b_name` FROM `vts_brands` WHERE `b_id`='$brand'"),0); if($incNEW === 'on'){ $getData = mysql_query("SELECT DISTINCT(brand_code) FROM `db_vehicle_inventory` WHERE `sold`='0' AND `returned`='0' AND `incoming_unit`!='1' AND `company`='$filCompany' AND `brand`='$brand' ORDER BY `brand_code` ASC"); $inc=0; }else { $getData = mysql_query("SELECT DISTINCT(brand_code) FROM `db_vehicle_inventory` WHERE `sold`='0' AND `returned`='0' AND `company`='$filCompany' AND `brand`='$brand' ORDER BY `brand_code` ASC"); $inc=1; } echo "<center><div style='width:950px;min-height:1000px;border:0px solid gray;background:white;padding:10px'>"; echo "<div style='width:850px;height:150px;border-bottom:0px solid gray;background:white;text-align:left'>"; echo "<div style='float:left;width:50%;height:150px;border-bottom:0px solid gray;background:white;text-align:left'>"; echo "<img src='../images/autohub_logo_2016.png' border='0px solid blue' style='margin:5%'></img>"; echo "</div>"; echo "<div style='float:left;width:50%;height:150px;border:0px solid gray;background:white;text-align:right;'>"; echo "<p style='font-family:Arial;font-size:20px;font-weight:bold;padding:5%;padding-bottom:0px;border:0px solid red;margin-bottom:5px;'>VEHICLE INVENTORY REPORT</p> <b style='font-family:Arial;font-size:16px;font-weight:normal;padding:5%;padding-top:0px;padding-bottom:0px;margin-top:0px;border:0px solid red'>UNIT COST SUMMARY</b>"; echo "<br><b style='font-family:Arial;font-size:14px;font-weight:normal;padding-right:5%;padding-top:0px;padding-bottom:0px;margin-top:10px;border:0px solid red'> <br>Date: ".date("m/d/Y")."</b>"; echo "</div>"; echo "</div><p style='font-family:Arial;font-size:20;font-weight:bold'>".$brand."</p>"; $myBrandID = mysql_result(mysql_query("SELECT `b_id` FROM `vts_brands` WHERE `b_name`='$brand'"),0); echo "<table style='border-collapse:collapse;width:100%'>"; echo "<thead>"; echo "<th class='tBalls' style='font-family:Arial;font-size:12px;font-weight:bold;padding:5px;border:1px solid gray;width:20%'>VEHICLE BRAND</th>"; echo "<th class='tBalls' style='font-family:Arial;font-size:12px;font-weight:bold;padding:5px;border:1px solid gray;width:5%'>COUNT </th>"; echo "<th class='tBalls' style='font-family:Arial;font-size:12px;font-weight:bold;padding:5px;border:1px solid gray;width:15%'>TOTAL SRP </th>"; echo "<th class='tBalls' style='font-family:Arial;font-size:12px;font-weight:bold;padding:5px;border:1px solid gray;width:15%'>TOTAL DISCOUNT</th>"; echo "<th class='tBalls' style='font-family:Arial;font-size:12px;font-weight:bold;padding:5px;border:1px solid gray;width:15%'>TOTAL COMMISSION</th>"; echo "</thead>"; while($row=mysql_fetch_array($getData)){ echo "<tr>"; echo "<td style='padding:5px;border:1px solid gray;font-family:Arial;font-size:12px;'>".$row['brand_code']."</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:center;font-family:Arial;font-size:12px;'>"; $modelLine =$row['brand_code']; if($inc==0){ //INclude Incoming $itemCount = mysql_result(mysql_query("SELECT COUNT(id) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `incoming_unit`!='1'"),0); }else{ //Exclude Incoming $itemCount = mysql_result(mysql_query("SELECT COUNT(id) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' "),0); } $totalCount = $totalCount + $itemCount; echo $itemCount; echo "</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;font-family:Arial;font-size:12px;'>"; $modelLine =$row['brand_code']; if($inc==0){ //INclude Incoming $modelCost = mysql_result(mysql_query("SELECT SUM(price) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `incoming_unit`!='1' AND `company`='$filCompany' AND `brand`='$brand'"),0); }else{ //Exclude Incoming $modelCost = mysql_result(mysql_query("SELECT SUM(price) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `company`='$filCompany' AND `brand`='$brand'"),0); } echo number_format($modelCost,2,'.',','); $modelCostTotal = $modelCostTotal + $modelCost; echo "</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;font-family:Arial;font-size:12px;'>"; $modelLine =$row['brand_code']; if($inc==0){ //INclude Incoming $modelDiscount = mysql_result(mysql_query("SELECT SUM(discount) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `incoming_unit`!='1' AND `company`='$filCompany' AND `brand`='$brand'"),0); }else{ //Exclude Incoming $modelDiscount = mysql_result(mysql_query("SELECT SUM(discount) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `company`='$filCompany' AND `brand`='$brand' "),0); } echo number_format($modelDiscount,2,'.',','); $modelDiscountTotal = $modelDiscountTotal + $modelDiscount; echo "</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;font-family:Arial;font-size:12px;'>"; $modelLine =$row['brand_code']; if($inc==0){ //INclude Incoming $modelCostComm = mysql_result(mysql_query("SELECT SUM(commission) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `incoming_unit`!='1' AND `company`='$filCompany' AND `brand`='$brand'"),0); }else{ //Exclude Incoming $modelCostComm = mysql_result(mysql_query("SELECT SUM(commission) FROM `db_vehicle_inventory` WHERE `brand_code`='$modelLine' AND `sold`='0' AND `returned`='0' AND `company`='$filCompany' AND `brand`='$brand'"),0); } echo number_format($modelCostComm,2,'.',','); $modelCostCommTotal = $modelCostCommTotal + $modelCostComm; echo "</td>"; echo "</tr>"; } echo "<tr>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;background:lightgray'>GRAND TOTAL</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:center;background:lightgray'>".$totalCount."</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;background:lightgray'>".number_format($modelCostTotal,2,'.',',')."</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;background:lightgray'>".number_format($modelDiscountTotal,2,'.',',')."</td>"; echo "<td style='padding:5px;border:1px solid gray;text-align:right;background:lightgray'>".number_format($modelCostCommTotal,2,'.',',')."</td>"; echo "</tr>"; echo "</table>"; echo "</table>"; echo "<br><br><br> <div style='width:100%;float:left;text-align:left'>Prepared by:_______________________</div>"; echo "<br><br><p style='float:left;text-align:left'>Date Prepared: ".date("m/d/Y")." ".date('h:i a')."</p>"; echo "</div></center>"; ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings