459 lines
18 KiB
PHP
459 lines
18 KiB
PHP
<!--
|
|
=========================================================
|
|
Light Bootstrap Dashboard - v2.0.1
|
|
=========================================================
|
|
|
|
Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard
|
|
Copyright 2019 Creative Tim (https://www.creative-tim.com)
|
|
Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE)
|
|
|
|
Coded by Creative Tim
|
|
|
|
=========================================================
|
|
|
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -->
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>A simple, clean, and responsive HTML invoice template</title>
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.hover-btn button{
|
|
margin:10px;
|
|
color:#FFF;
|
|
padding:10px 40px;
|
|
}
|
|
|
|
.hover-btn button:hover{
|
|
background:#5a5a5a;
|
|
}
|
|
|
|
.btn-one{
|
|
color : black;
|
|
width: 150px;
|
|
}
|
|
|
|
.btn-two{
|
|
background: #5863db;
|
|
width: 150px;
|
|
}
|
|
|
|
.btn-three{
|
|
background: #c41f26;
|
|
width: 150px;
|
|
}
|
|
|
|
.btn-four{
|
|
background: #58cadb;
|
|
width: 150px;
|
|
}
|
|
.mailfont{
|
|
font-size: 15px;
|
|
}
|
|
</style>
|
|
<style>
|
|
.invoice-box {
|
|
max-width: 800px;
|
|
margin: auto;
|
|
padding: 30px;
|
|
border: 1px solid black;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, .15);
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
|
color: #555;
|
|
background-color: white;
|
|
}
|
|
|
|
|
|
.donation {
|
|
font-size: 30px;
|
|
}
|
|
.date{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 20%;
|
|
}
|
|
.receiptno{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 12%;
|
|
}
|
|
.donatedby{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 75%;
|
|
}
|
|
.address{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 72%;
|
|
}
|
|
.city{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 31%;
|
|
}
|
|
.state{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 26%;
|
|
}
|
|
.pincode{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 13%;
|
|
}
|
|
.amt{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 50%;
|
|
}
|
|
.amtinword{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 71%;
|
|
}
|
|
.cause{
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #000000;
|
|
width: 58%;
|
|
}
|
|
</style>
|
|
<meta charset="utf-8" />
|
|
<link rel="apple-touch-icon" sizes="76x76" href="<?= base_url() ?>/public/assets/img/apple-icon.png">
|
|
<link rel="icon" type="image/png" href="<?= base_url() ?>/public/assets/img/favicon.ico">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
<title>Donar App</title>
|
|
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
|
|
<!-- Fonts and icons -->
|
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
|
|
<!-- CSS Files -->
|
|
<link href="<?= base_url() ?>/public/assets/css/bootstrap.min.css" rel="stylesheet" />
|
|
<link href="<?= base_url() ?>/public/assets/css/light-bootstrap-dashboard.css?v=2.0.0 " rel="stylesheet" />
|
|
<!-- CSS Just for demo purpose, don't include it in your project -->
|
|
<link href="<?= base_url() ?>/public/assets/css/demo.css" rel="stylesheet" />
|
|
</head>
|
|
|
|
<body>
|
|
<div class="wrapper">
|
|
<div class="sidebar" data-image="<?= base_url() ?>/public/assets/img/sidebar-5.jpg">
|
|
<!--
|
|
Tip 1: You can change the color of the sidebar using: data-color="purple | blue | green | orange | red"
|
|
|
|
Tip 2: you can also add an image using data-image tag
|
|
-->
|
|
<div class="sidebar-wrapper">
|
|
<div class="logo">
|
|
<!-- <a href="http://www.creative-tim.com" class="simple-text"> -->
|
|
Donation
|
|
</a>
|
|
</div>
|
|
<ul class="nav">
|
|
<li class="nav-item active">
|
|
<a class="nav-link" href="<?= base_url() ?>/dashboard">
|
|
<i class="nc-icon nc-chart-pie-35"></i>
|
|
<p>Dashboard</p>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown ">
|
|
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-user fa-lg"></i>
|
|
|
|
<span>Donor Management</span>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
<a class="dropdown-item" href="<?= base_url() ?>/all_donor"> View Donors </a>
|
|
<a class="dropdown-item" href="<?= base_url() ?>/donor_register"> Add New Donor </a>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown ">
|
|
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-book fa-lg"></i>
|
|
|
|
<span >Receipts</span>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
<a class="dropdown-item" href="<?= base_url() ?>/all_receipt"> All Receipts </a>
|
|
<a class="dropdown-item" href="<?= base_url() ?>/receipts"> Generate Receipts </a>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown ">
|
|
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-newspaper-o fa-lg"></i>
|
|
|
|
<span >Transaction</span>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
<a class="dropdown-item" href="<?= base_url() ?>/all_transaction"> All Transaction </a>
|
|
<a class="dropdown-item" href="<?= base_url() ?>/transaction"> Upload Transaction </a>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown ">
|
|
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-money fa-lg"></i>
|
|
|
|
<span>Donation Data</span>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
<a class="dropdown-item" href="<?= base_url() ?>/all_donation_data"> Donation Data List </a>
|
|
<a class="dropdown-item" href="<?= base_url() ?>/donation_data"> Add Donation Data </a>
|
|
</div>
|
|
</li>
|
|
<li class="nav-item dropdown ">
|
|
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-pencil-square-o fa-lg"></i>
|
|
|
|
<span>DonationCause</span>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
<a class="dropdown-item" href="<?= base_url() ?>/donation_cause"> Add Donation Cause </a>
|
|
<a class="dropdown-item" href="<?= base_url() ?>/all_donation_cause"> View Donation Cause </a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#" class="nav-link">
|
|
<i class="fa fa-user fa-lg"></i>
|
|
<span class="d-lg-block"> Profile</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="<?= base_url() ?>/logout" class="nav-link">
|
|
|
|
<span class="d-lg-block"> Logout</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="main-panel">
|
|
|
|
<nav class="navbar navbar-expand-lg " color-on-scroll="500">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="#pablo"> </a>
|
|
<button href="" class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-bar burger-lines"></span>
|
|
<span class="navbar-toggler-bar burger-lines"></span>
|
|
<span class="navbar-toggler-bar burger-lines"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse justify-content-end" id="navigation">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="content">
|
|
|
|
|
|
<center><h2>RECEIPT</h2></center>
|
|
<div class="hover-btn">
|
|
|
|
<div class="wrapper wrapper--w790">
|
|
<div class="row" style="margin-bottom: 20px;">
|
|
<div class="col-md-3 col-sm-6">
|
|
<button type="button" class="btn btn-info " style="background-color: crimson; width: 160px; padding: 0px; line-height: 40px;">Edit Receipt</button>
|
|
</div>
|
|
<div class="col-md-3 col-sm-6">
|
|
<button type="button" class="btn btn-info "style="background-color: green; width: 160px; padding: 0px; line-height: 40px;">Download</button>
|
|
</div>
|
|
<div class="col-md-3 col-sm-6">
|
|
<button type="button" class="btn btn-info " style="background-color: orange; width: 160px; padding: 0px; line-height: 40px;">Send Mail</button>
|
|
</div>
|
|
<div class="col-md-3 col-sm-6">
|
|
<button type="button" class="btn btn-info "style="background-color: blue; width: 160px; padding: 0px; line-height: 40px;">Exit</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="invoice-box">
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
</br></br></br>
|
|
<center> <img src="<?=base_url()?>/public/assets/logo.jpg" alt="Girl in a jacket" width="100" height="100"></center> </br>
|
|
<center> <h3><?= $admindata['org_name'] ?></h3></center>
|
|
<center> <?= $admindata['address'] ?>,<?= $admindata['city'] ?>,</center>
|
|
<center> <?= $admindata['state'] ?>-<?= $admindata['pin_code'] ?>.</center>
|
|
<center class="mailfont"> Email :<?= $admindata['email'] ?></center>
|
|
<center class="mailfont"> GSTIN :<?= $admindata['gstin'] ?></center>
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
<center> <h3>Donation Receipt</h3></center></br>
|
|
Date : <input type="text" class="date" value="<?= $receipt['date'] ?>" readonly>
|
|
|
|
|
|
Receipt No : <input type="text" class="receiptno" value=" <?= $receipt['receipt_id'] ?>" readonly> </br></br>
|
|
Donated by : <input type="text" class="donatedby" value=" <?= $donordata['name'] ?>" readonly></br></br>
|
|
Street Address : <input type="text" class="address" value=" <?= $donordata['address'] ?>" readonly> </br>
|
|
City :
|
|
<input type="text" class="city" value="<?= $donordata['city'] ?>" readonly>
|
|
State : <input type="text" class="state" value="<?= $donordata['state'] ?>" readonly>
|
|
Pin : <input type="text" class="pincode" value="<?= $donordata['pin_code'] ?>" readonly></br>
|
|
Amount Received By Charity :
|
|
<input type="text" class="amt" value=" <?= $receipt['amount'] ?>" readonly></br>
|
|
|
|
Amount in Words :
|
|
<!-- call the function here -->
|
|
<?php $amt_words= $receipt['amount'];
|
|
// nummeric value in variable
|
|
$get_amount= numberTowords($amt_words);
|
|
?><input type="text" class="amtinword" value="<?= $get_amount ?>" readonly> </br>
|
|
Discription of Donation :
|
|
<input type="text" class="cause" value="<?= $causedata['cause_name']; ?>" readonly></br></br></br>
|
|
Authorized Signature : <img src="<?=base_url()?>/<?=$admindata['signature']?>.png" alt="Girl in a jacket" width="200" height="40">
|
|
</br></br>
|
|
<center class="mailfont">"Thank You For Your Donation"</center>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<!-- Core JS Files -->
|
|
<script src="<?= base_url() ?>/public/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
|
|
<script src="<?= base_url() ?>/public/assets/js/core/popper.min.js" type="text/javascript"></script>
|
|
<script src="<?= base_url() ?>/public/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
|
|
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
|
|
<script src="<?= base_url() ?>/public/assets/js/plugins/bootstrap-switch.js"></script>
|
|
<!-- Google Maps Plugin -->
|
|
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
|
|
<!-- Chartist Plugin -->
|
|
<script src="<?= base_url() ?>/public/assets/js/plugins/chartist.min.js"></script>
|
|
<!-- Notifications Plugin -->
|
|
<script src="<?= base_url() ?>/public/assets/js/plugins/bootstrap-notify.js"></script>
|
|
<!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc -->
|
|
<script src="<?= base_url() ?>/public/assets/js/light-bootstrap-dashboard.js?v=2.0.0 " type="text/javascript"></script>
|
|
<!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
|
|
<script src="<?= base_url() ?>/public/assets/js/demo.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
// Javascript method's body can be found in assets/js/demos.js
|
|
demo.initDashboardPageCharts();
|
|
|
|
demo.showNotification();
|
|
|
|
});
|
|
</script>
|
|
|
|
</html>
|
|
<?php
|
|
function numberTowords($num)
|
|
{
|
|
|
|
$ones = array(
|
|
0 =>"ZERO",
|
|
1 => "ONE",
|
|
2 => "TWO",
|
|
3 => "THREE",
|
|
4 => "FOUR",
|
|
5 => "FIVE",
|
|
6 => "SIX",
|
|
7 => "SEVEN",
|
|
8 => "EIGHT",
|
|
9 => "NINE",
|
|
10 => "TEN",
|
|
11 => "ELEVEN",
|
|
12 => "TWELVE",
|
|
13 => "THIRTEEN",
|
|
14 => "FOURTEEN",
|
|
15 => "FIFTEEN",
|
|
16 => "SIXTEEN",
|
|
17 => "SEVENTEEN",
|
|
18 => "EIGHTEEN",
|
|
19 => "NINETEEN",
|
|
"014" => "FOURTEEN"
|
|
);
|
|
$tens = array(
|
|
0 => "ZERO",
|
|
1 => "TEN",
|
|
2 => "TWENTY",
|
|
3 => "THIRTY",
|
|
4 => "FORTY",
|
|
5 => "FIFTY",
|
|
6 => "SIXTY",
|
|
7 => "SEVENTY",
|
|
8 => "EIGHTY",
|
|
9 => "NINETY"
|
|
);
|
|
$hundreds = array(
|
|
"HUNDRED",
|
|
"THOUSAND",
|
|
"MILLION",
|
|
"BILLION",
|
|
"TRILLION",
|
|
"QUARDRILLION"
|
|
); /*limit t quadrillion */
|
|
$num = number_format($num,2,".",",");
|
|
$num_arr = explode(".",$num);
|
|
$wholenum = $num_arr[0];
|
|
$decnum = $num_arr[1];
|
|
$whole_arr = array_reverse(explode(",",$wholenum));
|
|
krsort($whole_arr,1);
|
|
$rettxt = "";
|
|
foreach($whole_arr as $key => $i){
|
|
|
|
while(substr($i,0,1)=="0")
|
|
$i=substr($i,1,5);
|
|
if($i < 20){
|
|
/* echo "getting:".$i; */
|
|
$rettxt .= $ones[$i];
|
|
}elseif($i < 100){
|
|
if(substr($i,0,1)!="0") $rettxt .= $tens[substr($i,0,1)];
|
|
if(substr($i,1,1)!="0") $rettxt .= " ".$ones[substr($i,1,1)];
|
|
}else{
|
|
if(substr($i,0,1)!="0") $rettxt .= $ones[substr($i,0,1)]." ".$hundreds[0];
|
|
if(substr($i,1,1)!="0")$rettxt .= " ".$tens[substr($i,1,1)];
|
|
if(substr($i,2,1)!="0")$rettxt .= " ".$ones[substr($i,2,1)];
|
|
}
|
|
if($key > 0){
|
|
$rettxt .= " ".$hundreds[$key]." ";
|
|
}
|
|
}
|
|
if($decnum > 0){
|
|
$rettxt .= " and ";
|
|
if($decnum < 20){
|
|
$rettxt .= $ones[$decnum];
|
|
}elseif($decnum < 100){
|
|
$rettxt .= $tens[substr($decnum,0,1)];
|
|
$rettxt .= " ".$ones[substr($decnum,1,1)];
|
|
}
|
|
}
|
|
return $rettxt;
|
|
}
|
|
extract($_POST);
|
|
if(isset($convert))
|
|
{
|
|
echo "<p align=''>".numberTowords("$num")."</p>";
|
|
}
|
|
?>
|