G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php include("config.php"); include("innerpageheader.php"); $cid = $_POST['client']; $resultserp = $js->prepare('SELECT * FROM `hotelreservations` WHERE custid = :cid ORDER BY `cindate` '); $resultserp->execute(array(':cid' => $cid)); $result = $js->prepare('SELECT * FROM `customer_entry` WHERE `id` = :cid'); $result->execute(array(':cid' => $cid)); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $custname = $row['custname']; } ?> <section> <div class="content add-details"> <div class="in-content-wrapper"> <div class="box"> <div class="hotel-listing-form"> <div class="row"> <div class="col"> <div class="details-text"> <h4>Details of <?php echo $custname?></h4> </div><!-- end details-text --> </div><!-- End column --> </div><!-- end row --> <form class="text-center" method="post" action="add_customerexpense.php"> <table border='1' style="width:100%;font-size:13px;" cellpadding="8"> <tr style="border:none;"> <th colspan="12" style="color:#FFF; background-color:#676A6A;">HOTEL RESERVATIONS</th> </tr> <tr> <th style='width:3%'>#</th> <th style='width:9%'>Location</th> <th style='width:8%'>Hotel Name</th> <th style='width:7%'>Check-In Date</th> <th style='width:7%'>Check-Out Date</th> <th style='width:8%'>Room Type</th> <th style='width:8%'>No. Of Rooms</th> <th style='width:4%'>Plan</th> <th style='width:8%'>Confirmation Number</th> <th style='width:10%'>Additional Services</th> <th style='width:6%'>Cost</th> <th style="width:8%">Pay Now</th> </tr> <?php $x = 1; $payamount = 0; $$totalpaid = 0; $hotels = 'hotel'; while($rowserp = $resultserp->fetch(PDO::FETCH_ASSOC)) { $id = $rowserp['id']; $hotel = $rowserp['hotel']; $cindate = date('d-m-Y', strtotime($rowserp['cindate'])); $coutdate = date('d-m-Y', strtotime($rowserp['coutdate'])); $roomtype = $rowserp['roomtype']; $norooms = $rowserp['norooms']; $noebs = $rowserp['noebs']; if($noebs != '') { $rooms = $norooms.' + '.$noebs.' Extra-Bed'; } else { $rooms = $norooms." Room(s)"; } $meals = $rowserp['meals']; $roomrate = $rowserp['roomrate']; $remhotel = $rowserp['remarks']; $ebrate = $rowserp['ebrate']; if($ebrate != '') { $roomrate += $ebrate; } else { $roomrate = $roomrate; } $addservices = $rowserp['addservices']; $totals = $roomrate; $resultr = $js->prepare('SELECT * FROM `customer_expense` WHERE custid = :cid AND paysubhead = :id AND payhead = :hotels '); $resultr->execute(array(':cid' => $cid, ':id' => $id, ':hotels' => $hotels)); while($rowr = $resultr->fetch(PDO::FETCH_ASSOC)) { $payamount = $rowr['payamount']; $totalpaid += $payamount; } $grand_total += $totals; $resultprod = $js->prepare('SELECT * FROM `hotelvendor` WHERE id = :hotel '); $resultprod->execute(array(':hotel' => $hotel)); while($rowprod = $resultprod->fetch(PDO::FETCH_ASSOC)) { $location = $rowprod['location']; $hotelname = $rowprod['hotelname']; } $pieces4 = explode(".", $totals); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $totals = $mainmenu4.".".$submenu4; echo "<tr>"; echo "<td align='center'>$x</td>"; echo "<td align='center'>$location</td>"; echo "<td align='center'>$hotelname</td>"; echo "<td align='center'>$cindate</td>"; echo "<td align='center'>$coutdate</td>"; echo "<td align='center'>$roomtype</td>"; echo "<td align='center'>$rooms</td>"; echo "<td align='center'>$meals</td>"; echo "<td>$remhotel</td> <td>$addservices</td>"; echo "<td align='right' style='padding-right:10px;'>$totals</td>"; echo "<td>"; if($totalpaid == $totals) { echo "PAID ".$totals; } elseif($totalpaid == '0' || $totalpaid == '') { echo "<a href='PayNowCustExpense.php?type=hotel&&id=$id&&cust=$cid&&special=$totals' style='background-color: #085AA3; color: white; padding: 10px;'>Pay Now</a>"; } else { $balance = $totals - $totalpaid; $pieces4 = explode(".", $balance); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $balance = $mainmenu4.".".$submenu4; echo "<a href='PayNowCustExpense.php?type=hotel&&id=$id&&cust=$cid&&special=$balance' style='background-color: #085AA3; color: white; padding: 10px; margin-top:5px;'>Pay Now </a> <br><br><center> <span style='color:red;'><strong>BALANCE $balance</strong></span></center>"; } echo "</td>"; echo "</tr>"; $x++; $totalpaid = 0; } ?> <!--<tr> <td colspan='8'>Total</td> <td colspan='4' style="font-weight:bolder;padding-left: 20px;"><?php echo $grand_total.'/-';?></td> </tr>--> </table> <br /> <table border="1" style="width:100%;font-size:13px;"> <tr> <th colspan="7" style="color:#FFF; background-color:#676A6A; padding:8px;">TRANSFERS & SIGHTSEEING</th> </tr> <tr> <th style='width:5%'>Sl_No</th> <th style='width:15%'>Vehicle Type</th> <th style='width:40%'>Description</th> <th style='width:10%'>Cab Charges</th> <th style='width:10%'>Paid</th> <th style='width:10%'>Balance</th> <th style='width:10%'>Pay Now</th> </tr> <?php $resultserpt = $js->prepare('SELECT * FROM `travelassistance` WHERE custid = :cid ORDER BY `id` '); $resultserpt->execute(array(':cid' => $cid)); ?> <?php $x = 1; $transportation = 'transportation'; while($rowserp = $resultserpt->fetch(PDO::FETCH_ASSOC)) { $tid = $rowserp['id']; $vehicle = $rowserp['vehicle']; $advance = $rowserp['advance']; $descr = $rowserp['descr']; $des = nl2br($descr); $charge = $rowserp['vehiclecharge']; $resultrt = $js->prepare('SELECT * FROM `customer_expense` WHERE custid = :cid AND paysubhead = :tid AND payhead = :transportation '); $resultrt->execute(array(':cid' => $cid, ':tid' => $tid, ':transportation' => $transportation)); while($rowrt = $resultrt->fetch(PDO::FETCH_ASSOC)) { $payamountt = $rowrt['payamount']; $paydate = $rowrt['paydate']; $mode = $rowrt['pmode']; $totalpaidtr += $payamountt; } $balanceveh = $charge - $advance - $totalpaidtr; $totalvehicle += $vehicle; $advance += $totalpaidtr; $pieces4 = explode(".", $charge); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $charge = $mainmenu4.".".$submenu4; $pieces4 = explode(".", $advance); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $advance = $mainmenu4.".".$submenu4; $pieces4 = explode(".", $balanceveh); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $balanceveh = $mainmenu4.".".$submenu4; echo "<tr>"; echo "<td align='center'>$x</td>"; echo "<td style='padding-left:10px; padding-top:10px; padding-bottom:10px; padding-right:10px;'>$vehicle</td>"; echo "<td style='padding-left:10px; padding-top:10px; padding-bottom:10px; padding-right:10px;'>$des</td>"; echo "<td align='center'>$charge</td> <td>$advance</td> <td>$balanceveh</td> <td>"; if($balanceveh == '0.000') { echo "PAID"; } else { echo "<a href='PayNowCustExpense.php?type=transportation&&id=$tid&&cust=$cid&&special=$balanceveh' style='background-color: #085AA3; color: white; padding: 10px;'>Pay Now</a>"; } echo "</td>"; echo "</tr>"; $x++; $payamountt = 0; $totalpaidtr = 0; } ?> </table> <br /> <table border="1" style="font-size:13px;width:100%"> <tr> <th colspan="6" style="font-size:14px; color:#FFF; background-color:#676A6A; padding:8px;">OTHER SERVICES</th> </tr> <tr> <th style='width:5%'>#</th> <th style='width:20%'>Item</th> <th style='width:45%'>Description</th> <th style='width:10%'>Cost</th> <th style='width:10%'>Paid</th> <th style='width:10%'>Pay Now</th> </tr> <?php $resultother = $js->prepare('SELECT * FROM `otherservices` WHERE custid = :cid ORDER BY `id` '); $resultother->execute(array(':cid' => $cid)); ?> <?php $x = 1; $others = 'others'; while($rowserpo = $resultother->fetch(PDO::FETCH_ASSOC)) { $oid = $rowserpo['id']; $services = $rowserpo['services']; $descr = $rowserpo['descr']; $oamount = $rowserpo['amount']; $totother += $oamount; $resultort = $js->prepare('SELECT * FROM `customer_expense` WHERE custid = :cid AND paysubhead = :oid AND payhead = :others '); $resultort->execute(array(':cid' => $cid, ':oid' => $oid, ':others' => $others)); while($rowort = $resultort->fetch(PDO::FETCH_ASSOC)) { $opayamountt = $rowort['payamount']; $totalpaidotr += $opayamountt; } $obalance = $oamount - $totalpaidotr; echo "<tr style='line-height:28px;'>"; echo "<td align='center'>$x</td>"; echo "<td align='center'>$services</td>"; echo "<td align='center'>$descr</td>"; echo "<td align='right' style='padding-right:10px;'>$oamount</td>"; echo "<td>$totalpaidotr</td>"; echo "<td>"; if($obalance == '0') { echo "PAID"; } else { echo "<a href='PayNowCustExpense.php?type=others&&id=$oid&&cust=$cid&&special=$obalance' style='background-color: #085AA3; color: white; padding: 10px;'>Pay Now</a>"; } echo "</td>"; echo "</tr>"; $x++; $opayamountt = 0; $oamount=0; $totalpaidotr = 0; } $totexp = $totother + $vehcharge + $grand_total; $profit = $package - $totexp; ?> <!-- <tr> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:400px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> </tr> <tr> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:400px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> <td><input type='text' style='border:none;width:100px;'></td> </tr> --> </table> <br> <?php $add = 'additional'; $resultadd = $js->prepare('SELECT * FROM `customer_expense` WHERE custid = :cid AND payhead = :add '); $resultadd->execute(array(':cid' => $cid, ':add' => $add)); $addcount = $resultadd->rowCount(); if($addcount > '0') { $z=1; ?> <table border="1" style="font-size:13px;width:100%"> <tr> <th colspan="6" style="font-size:14px; color:#FFF; background-color:#676A6A; padding:8px;">ADDITIONAL EXPENSES</th> </tr> <tr> <th style='width:5%'>#</th> <th style='width:20%'>Paid To</th> <th style='width:45%'>Paid for / Description</th> <th style='width:10%'>Payment Mode</th> <th style='width:10%'>Paid</th> </tr> <?php while($rowadd = $resultadd->fetch(PDO::FETCH_ASSOC)) { $paidto = $rowadd['paidto']; $paidfor = $rowadd['pdescription']; $addamount = $rowadd['payamount']; $pmode = $rowadd['pmode']; echo "<tr>"; echo "<td>$z</td>"; echo "<td>$paidto</td>"; echo "<td>$paidfor</td>"; echo "<td>$pmode</td>"; echo "<td>$addamount</td>"; echo "</tr>"; $z++; } ?> </table> <?php } ?> <a href='PayNowCustExpense.php?type=additional&&cust=<?php echo $cid?>' style='background-color: #0D93B4; color:#fff; padding: 10px;'>Pay Additional Expense</a><!-- Optional JavaScript, Not optional it's need too --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap-5.3.2.min.js"></script> <script src="vendors/datatables/datatables.min.js"></script> <script src="js/customscriptfile.js"></script> <!-- Page Scripts Ends --> <script> $(document).ready(function () { $('#example').DataTable(); }); </script> <?php include('footer.php'); ?>