G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php include('config.php'); $fdate = $_POST['fdate']; $from = date('d-m-Y', strtotime($fdate)); $tdate = $_POST['tdate']; $to = date('d-m-Y', strtotime($tdate)); $enqstatus = 'Confirmed'; $sql = $js->prepare('SELECT * FROM customer_entry WHERE enquirystatus = :enqstatus AND plannningdate >= :fdate AND plannningdate <= :tdate ORDER BY `plannningdate` '); $sql->execute(array(':enqstatus' => $enqstatus, ':fdate' => $fdate, ':tdate' => $tdate)); ?> <style type="text/css"> @page { size: A4; margin: .6in; size:landscape; } @media print { #table{ max-width: 2480px; width:100%; } #table td{ width: auto; overflow: hidden; word-wrap: break-word; } .noprint {display:none;} } </style> <script> function myFunction() { window.print(); } </script> <div align="center" style="background-color:#FFF"> <img src="images/logodmc.png"><HR style="border-color:#5053FD" /> <h3>Upcoming Travellers List From <?php echo $from?> to <?php echo $to?></h3> <table style="border-collapse: collapse; " id="table" border="1" cellpadding="5"> <thead> <tr style="background-color:#555; color:#fff"> <th>Sl No</th> <th>Arrival Date</th> <th>Departure Date</th> <th>Cust Name</th> <th>No of Pax</th> <th>Location</th> <th>Description</th> <th>Invoice Amount</th> <th>Received Amount</th> <th>Balance Amount</th> </tr> </thead> <tbody> <?php $x = 1; while($row = $sql->fetch(PDO::FETCH_ASSOC)) { $cid = $row['id']; $custid = $row['custid']; $custname = strtoupper($row['custname']); $location = strtoupper($row['location']); $phone = $row['phone']; $email = $row['email']; $email = $row['email']; $phone = $row['phone']; $pdate = $row['plannningdate']; $plandate = date('d-m-Y', strtotime($pdate)); $days = $row['daysplanning']; $adate = date('d-m-Y', strtotime($pdate.' + '.$days.' days - 1 day')); $pax = strtoupper($row['pax']); $results = $js->prepare('SELECT * FROM `invoiced` WHERE cust = :cid '); $results->execute(array(':cid' => $cid)); while($rows = $results->fetch(PDO::FETCH_ASSOC)) { $invid = $rows['id']; $descr = strtoupper($rows['descr']); $invamount = $rows['invamount']; } $result = $js->prepare('SELECT * FROM `invoicepayments` WHERE invoiceid = :invid'); $result->execute(array(':invid' => $invid)); while($rowinv0 = $result->fetch(PDO::FETCH_ASSOC)) { $payamount = $rowinv0['payamount']; $received += $payamount; } $balance = $invamount - $received; $totbalance += $balance; $totinvoice += $invamount; $totreceived += $received; $totalbalance += $balance; echo "<tr>"; echo "<td>$x</td>"; echo "<td>$plandate</td>"; echo "<td>$adate</td>"; echo "<td>$custname</td>"; echo "<td>$pax</td>"; echo "<td>$location</td>"; echo "<td>$descr</td>"; echo "<td align='right' style='padding-right:10px;'>$invamount</td>"; echo "<td align='right' style='padding-right:10px;'>$received</td>"; echo "<td align='right' style='padding-right:10px;'>$balance</td>"; echo "</tr>"; $x++; $invamount = ''; $received = ''; $balance = ''; } ?> <tr> <td colspan="7" align="right"> Total</td> <td align='right' style='padding-right:10px;'><?php echo $totinvoice?></td> <td align='right' style='padding-right:10px;'><?php echo $totreceived?></td> <td align='right' style='padding-right:10px;'><?php echo $totalbalance?></td> </tr> </tbody> </table> <div class="noprint"> <p align="center"> <a href="#" onClick="myFunction()" style="border:5px solid; background-color:#093; color:#FFF; padding:8px; text-decoration:none;">PRINT</a> <a href="home.php" style="border:5px solid; background-color:#F00; color:#FFF; padding:8px; text-decoration:none;">CLOSE</a> </p> </div> </div>