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 `expenses` WHERE id = :id'); $result->execute(array(':id' => $id)); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $expid = $row['expid']; $expdate = date('d-m-Y', strtotime($row['expdate'])); $expheads = $row['expheads']; $result1 = $js->prepare('SELECT * FROM `heads` WHERE headid = :expheads'); $result1->execute(array(':expheads' => $expheads)); while($row1 = $result1->fetch(PDO::FETCH_ASSOC)) { $heads = $row1['name']; } $expsubheads = $row['expsubheads']; $result2 = $js->prepare('SELECT * FROM `subheads` WHERE subid = :expsubheads'); $result2->execute(array(':expsubheads' => $expsubheads)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $subheads = $row2['subname']; } $tot = $row['expamount']; $expamount = $tot; $pmode = $row['pmode']; $paidto = $row['vatpaidto']; $premarks = $row['premarks']; $enteredby = $row['enteredby']; } $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> +968 941 55255 <i class="fa fa-phone" aria-hidden="true"></i> +968 7719 0959 <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> THE FALCON EXPEDITIONS TRADE LLC <br> <i class="fa fa-map-marker" aria-hidden="true"></i> CR Number : 150383Po Box: 102 , Postal Code: 114, 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> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $paidto?> </span></td> </td> </tr> <tr> <td style="border-bottom:1px solid #000"><br> Paid For / مدفوع لأجل </td> <td style="border-bottom:1px solid #000" colspan='3'><span style=" font-size:12px;"><?php echo $heads?> </span></td> </td> </tr> <tr> <td style="border-bottom:1px solid #000"><br/> Being / يجرى </td> <td style="border-bottom:1px solid #000" colspan='3'><span style="font-size:12px;"><?php echo ' FOR '.$subheads; ?></span></td> </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><br><br><img src="images/STAMP AND SIGN.jpg"></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; } } ?>