G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<!DOCTYPE html> <html lang="en"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <head> <script type="text/javascript"> window.onafterprint = window.close; window.print(); </script> <meta charset="utf-8" /> <style> td { vertical-align: bottom; } </style> </head> <body> <?php include('config.php'); $id = $_GET['id']; $result = $js->prepare('SELECT * FROM `customer_expense` WHERE expid = :id'); $result->execute(array(':id' => $id)); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $expid = $row['expid']; $expamount = $row['payamount']; $pieces4 = explode(".", $expamount); $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{} $expamount = $mainmenu4.".".$submenu4; $cid = $row['custid']; $expdate = date('d-m-Y', strtotime($row['paydate'])); $paidtype = $row['payhead']; if($paidtype == 'hotel') { $expheads = $row['paysubhead']; $result1 = $js->prepare('SELECT * FROM `hotelreservations` WHERE id = :expheads'); $result1->execute(array(':expheads' => $expheads)); while($row1 = $result1->fetch(PDO::FETCH_ASSOC)) { $hotel = $row1['hotel']; $voucherno = $row1['remarks']; $cindate = date('d-m-Y', strtotime($row1['cindate']));; $coutdate = date('d-m-Y', strtotime($row1['coutdate'])); $result2 = $js->prepare('SELECT * FROM `hotelvendor` WHERE id = :hotel'); $result2->execute(array(':hotel' => $hotel)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $paidto = $row2['hotelname']; $location = $row2['location']; } } $paidfor = 'ACCOMMODATION - '; } elseif($paidtype == 'transportation') { $paidfor = 'TRANSPORTATION'; $paidto = $row['paidto']; $against = $row['pdescription']; } elseif($paidtype == 'others') { $expheads = $row['paysubhead']; //$paidfor = 'OTHERS'; $resulto1 = $js->prepare('SELECT * FROM `otherservices` WHERE id = :expheads'); $resulto1->execute(array(':expheads' => $expheads)); while($rowo1 = $resulto1->fetch(PDO::FETCH_ASSOC)) { $paidfor = strtoupper($rowo1['services']); $descrother = strtoupper($rowo1['descr']); } $paidto = $row['paidto']; $descr = $row['pdescription']; } elseif($paidtype == 'additional') { $expheads = $row['paysubhead']; //$paidfor = 'OTHERS'; $paidfor = strtoupper($rowo1['services']); $descrother = strtoupper($rowo1['descr']); $paidto = $row['paidto']; $paidfor = $row['pdescription']; } $resultcs = $js->prepare('SELECT * FROM `customer_entry` WHERE `id` = :cid'); $resultcs->execute(array(':cid' => $cid)); while($rowcs = $resultcs->fetch(PDO::FETCH_ASSOC)) { $custname = $rowcs['custname']; } $pmode = strtoupper($row['pmode']); $premarks = $row['premarks']; } $amount = $expamount; $obj = new toWords($amount); $num = $obj->words; $inwords = strtoupper($num); ?> <script> function myFunction() { window.print(); } </script> <style type="text/css"> @media print { .noprint {display:none;} } </style> <table cellpadding='0' cellspacing='0' width="100%" style="color:#0046A5;"> <span> <tr> <td colspan="2" align="center"><img src="images/logodmc.PNG" style="margin:5px;"> <br></td> </tr> <tr> <td width="50%" align="left"><p> <span><i class="fa fa-whatsapp" aria-hidden="true"></i> <i class="fa fa-phone" aria-hidden="true"></i> Telephone : +968 7719 0959 | 94 155 255 <br> <i class="fa fa-envelope" aria-hidden="true"></i> support@thefalconexpeditions.com <br><i class="fa fa-globe" aria-hidden="true"></i> www.thefalconexpeditions.com </span> </p> </td> <td align="right"> <p style="font-size:16px;"> <br> FALCON EXPEDITIONS TRADE LLC <br> <i class="fa fa-map-marker" aria-hidden="true"></i> CR : 150383, PO Box : 102 , PC : 114<br> Muscat, Sultanate of Oman <br> </td> </tr> </span> </table> <hr style="width:100%; border-color:#0046A5; color:#0046A5"> <table style="width:100%;" > <tr> <td colspan="2">Date : <?php echo $expdate?></td> <td align="right" colspan="2">Voucher No : <?php echo $expid?></td> </tr> <tr> <td colspan='4'> <strong><h3 style="margin-top:-5px"><center>Payment Voucher</center></h3></strong> </td> </tr> <tr> <td style="border-bottom:1px solid #000"> <br> Paid To / المدفوعة لل </td> <?php if($paidtype == 'hotel') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidto." - ".$location?> </span></td> <?php } elseif($paidtype == 'transportation') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidto?> </span></td> <?php } elseif($paidtype == 'others' || $paidtype == 'additional') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidto?> </span></td> <?php } {} ?> </tr> <tr> <td style="border-bottom:1px solid #000"><br> Paid For / مدفوع لأجل </td> <?php if($paidtype == 'hotel') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidfor." OF ".$custname." (".$cindate." To ". $coutdate." )"?> </span></td> <?php } elseif($paidtype == 'transportation') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidfor." OF ".$custname ?> </span></td> <?php } elseif($paidtype == 'others') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidfor." OF ".$custname ?> </span></td> <?php } elseif($paidtype == 'additional') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $custname ?> </span></td> <?php } else{} ?> </tr> <tr> <td style="border-bottom:1px solid #000"><br/> Against / يجرى </td> <?php if($paidtype == 'hotel') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style="font-size:12px;"><?php echo $voucherno; ?></span></td> <?php } elseif($paidtype == 'transportation') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style="font-size:12px;"><?php echo $against; ?></span></td> <?php } elseif($paidtype == 'others') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style="font-size:12px;"><?php echo $descrother; ?></span></td> <?php } elseif($paidtype == 'additional') { ?> <td style="border-bottom:1px solid #000" colspan='3'><span style="font-size:12px;"><?php echo $paidfor; ?></span></td> <?php } else{} ?> </tr> <tr> <td style="border-bottom:1px solid #000" ><br/> An amount of / كمية من </td> <td style="border-bottom:1px solid #000" colspan='2'> <span style=" font-size:12px;"> <?php echo $inwords?> </span></td> <td style="border-bottom:1px solid #000"> <table frame="box"> <tr> <td style="vertical-align: middle;"></td> <td><input type='text' disabled style="border: 0px solid;text-align:center; font-weight:bold; width:100px" value="<?php echo $expamount ?>"></td> </tr> </table> </td> </tr> <tr> <td style="border-bottom:1px solid #000"> <br> By / بواسطة <td style="border-bottom:1px solid #000" > <span style=" font-size:12px;"><?php echo $pmode; ?></span></td> <td style="border-bottom:1px solid #000"><br/>with reference / مع مرجع</td> <td style="border-bottom:1px solid #000"><span style=" font-size:12px;"><?php echo $premarks ?></span></td> </tr> <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr> <tr> <td colspan="5" align="right"><br><br><img src="images/STAMP AND SIGN.jpg"></td> </tr> <tr> <td colspan="5" align="right">AUTHORIZED SIGNATORY</td> </tr> </td> </table> <div class="noprint" style="margin-top:30px;"> <p align="center"><a href="#" onClick="myFunction()" style="border:5px solid; background-color:#093; color:#FFF; padding:8px; text-decoration:none;">PRINT</a> </p> <p align="center"><a href="invoices.php" style="border:5px solid; background-color:#093; color:#FFF; padding:8px; text-decoration:none;">CLOSE</a> </p> </div> </body> <?php define("Riyals", 'pounds'); define("Baise", 'p'); class toWords { var $pounds; var $pence; var $major; var $minor; var $words = ''; var $number; var $magind; var $units = array('', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); var $teens = array('ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'); var $tens = array('', 'ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'); var $mag = array('', 'thousand', 'million', 'billion', 'trillion'); function toWords($amount, $major = Riyals, $minor = Baise) { $this->__toWords__((int)($amount), $major); $whole_number_part = $this->words; #$right_of_decimal = (int)(($amount-(int)$amount) * 100); $strform = number_format($amount,3); $right_of_decimal = (int)substr($strform, strpos($strform,'.')+1); $this->__toWords__($right_of_decimal, $minor); $this->words = $whole_number_part . ' ' . $this->words; } function __toWords__($amount, $major) { $this->major = $major; #$this->minor = $minor; $this->number = number_format($amount, 3); list($this->pounds, $this->pence) = explode('.', $this->number); $this->words = " $this->major"; if ($this->pounds == 0) $this->words = "Zero $this->words"; else { $groups = explode(',', $this->pounds); $groups = array_reverse($groups); for ($this->magind = 0; $this->magind < count($groups); $this->magind++) { if (($this->magind == 1) && (strpos($this->words, 'hundred') === false) && ($groups[0] != '000')) $this->words = ' and ' . $this->words; $this->words = $this->_build($groups[$this->magind]) . $this->words; } } } function _build($n) { $res = ''; $na = str_pad("$n", 3, "0", STR_PAD_LEFT); if ($na == '000') return ''; if ($na{0} != 0) $res = ' ' . $this->units[$na{0}] . ' hundred'; if (($na{1} == '0') && ($na{2} == '0')) return $res . ' ' . $this->mag[$this->magind]; $res .= $res == '' ? '' : ' and'; $t = (int) $na{1}; $u = (int) $na{2}; switch ($t) { case 0: $res .= ' ' . $this->units[$u]; break; case 1: $res .= ' ' . $this->teens[$u]; break; default: $res .= ' ' . $this->tens[$t] . ' ' . $this->units[$u]; break; } $res .= ' ' . $this->mag[$this->magind]; return $res; } } ?>