<?php
include("code.php");
authorize();
$name=$_SESSION['admin_name'];
$bcode=$_SESSION['branchcode'];

if(isset($_GET['teller']))
$teller=$_GET['teller'];
if(isset($_GET['date']))
$date=$_GET['date'];
if(isset($_GET['time']))
$time=$_GET['time'];
$Cash=$_GET['Cash'];
$Transfer=$_GET['Transfer'];
$Pos=$_GET['Pos'];
$datetime=date('Y-m-d H:i:s');

$sql = "SELECT * FROM invoice where BranchCode='$bcode' and date='$date' and ticket='$teller' and time='$time'";
	$rst = mysqli_query($link,$sql);
	$row_just = mysqli_fetch_assoc($rst);
	$cusname=$row_just['customer'];
	//$mode=$row_just['mode'];
	$ticket=$row_just['ticket'];
	$imei=$row_just['imei'];
	$num=mysqli_num_rows($rst);


function gettotamnt($bcode,$date,$teller,$link,$time){
		$result=mysqli_query($link,"SELECT * FROM invoice where BranchCode='$bcode' and date='$date' and ticket='$teller' and time='$time'");
		$tot=0;
		while($reply = mysqli_fetch_array($result)){
			$ids=$reply['total'];
			$tot+=$ids;
		}
		return $tot;
	}
	
	function gettotamnt2($bcode,$date,$teller,$link){
		$result=mysqli_query($link,"SELECT * FROM payment where BranchCode='$bcode' and date='$date' and teller='$teller'");
		$tot=0;
		while($reply = mysqli_fetch_array($result)){
			$ids=$reply['amnt'];
			$tot+=$ids;
		}
		return $tot;
	}

function getamntpaid($bcode,$date,$teller,$link){
		$result=mysqli_query($link,"SELECT * FROM payment where BranchCode='$bcode' and date='$date' and transid='$teller'");
		$row_just = mysqli_fetch_assoc($result);
		$tot=$row_just['amount'];
		return $tot;
		
		
	}

?>

<!DOCTYPE html>
<!-- saved from url=(0037)https://my.mobilevtu.com.ng/index.php -->
<html lang="en" class="js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title><?php echo getStoreName($link); ?>  | Receipt ::</title>

    <!-- Bootstrap -->
    <link href="./dashboard_files/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="./dashboard_files/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./dashboard_files/font-awesome.min(1).css">
    <!-- NProgress -->
    <link href="./dashboard_files/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="./dashboard_files/green.css" rel="stylesheet">
	
    <!-- bootstrap-progressbar -->
    <link href="./dashboard_files/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="./dashboard_files/jqvmap.min.css" rel="stylesheet">
    
    <link href="./dashboard_files/featherlight.min.css" rel="stylesheet">
    <link href="./dashboard_files/select2.min.css" rel="stylesheet">

    <!-- bootstrap-daterangepicker -->
    <link href="./dashboard_files/daterangepicker.css" rel="stylesheet">
	<link href="./dashboard_files/sweetalert.css" rel="stylesheet" type="text/css"> 
    
	<link rel="stylesheet" href="./dashboard_files/leaflet.css">
	<script type="text/javascript" async="" src="./dashboard_files/recaptcha__en.js.download" crossorigin="anonymous" integrity="sha384-XtymsJC8H3wYh57vnHxIWSTq9LJf2d3w3WVjR2gR+rDtBuWO8zdvO/s6O6Cli/Oe"></script><script src="./dashboard_files/leaflet.js.download"></script>
    <!-- Custom Theme Style -->
    <link href="./dashboard_files/custom.min.css" rel="stylesheet">
    <meta name="theme-color" content="#036">
    <meta name="msapplication-TileColor" content="#036">   
    
    <link rel="shortcut icon" type="image/png" href="https://my.mobilevtu.com.ng/files/favicon.png">
  <style>
.se-pre-con {
	position: fixed;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	z-index: 9999;
	background: url(files/Preloader_3.gif) center no-repeat #fff;
	background-size: 120px 120px !important;
}
</style><link id="load-css-button.min.css" rel="stylesheet" type="text/css" href="./dashboard_files/button.min.css"></head>

  <body class="nav-md">
  	<div class="se-pre-con" style="display: none;"></div>
    <div class="se-pre-con2"></div>
    <div class="noconnection"></div>
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
            

            <div class="clearfix"></div>



           

          </div>
        </div>



	
        <!-- page content -->

        <div class="right_col" role="main" style="width:100%; border:0;">

        <div class="alert alert-info alert-dismissible fade in" role="alert">

          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true"></span>

          </button><font size="+3"><strong><i><?php echo getStoreName($link); ?></i></strong></font><br><font size="+1"><strong><?php echo getStoreAddress($link); ?></strong></font><br><font size="+1"><strong>TEL: <?php echo getStorePhone($link); ?></strong></font><br><font size="+1"><strong>CUSTOMER NAME</strong>: <?php echo $cusname; ?></font></div>


<div class="container">

	<div class="row">

	
       

        
 
	

    	 <div class="row">

          <!-- Recent  -->

			<div class="col-md-12 col-sm-12 col-xs-12" style="width:100%;">

              <div class="x_panel tile fixed_height_32 ">

                <div class="x_title">

                  <h4 class="green"><font size="+1"><strong>Transactions Date:<?php echo $datetime; ?></strong><br><strong>Payment Cash:<?php echo $Cash;  ?> Transfer:<?php echo $Transfer;  ?> Pos:<?php echo $Pos;  ?></strong><br><strong>Ticket No:<?php echo $ticket;  ?></strong><br><strong>RECEIPT No:<?php echo $imei;  ?></strong></font>

					<ul class="nav navbar-right panel_toolbox">

                   

                  </ul>

                  <div class="clearfix"></div>

                </div>               

<div class="col-md-12 col-sm-12 col-xs-12" style=" margin-left:-10%;width:120%;">

              <div class="x_panel tile fixed_height_32 ">

              

				<div class="table-responsive">
                  <table class="table table-striped jambo_table" border="2" width="120%" >

                  		<thead>

                          <tr class="headings">                     

                            <th class="column-title"><h2>Product</h2></th>

                            <th class="column-title"><h2>Qnt</h2></th>

                            <th class="column-title"><h2>Price</h2></th>

                            <th class="column-title"><h2>Total</h2></th>

                          </tr>

                        </thead>

                        <tbody> 
		 <?php $num = 1; do { ?>
                          <tr class="even pointer">

                            <td class=" "><font size="+1"><strong><?php echo $row_just['name']; ?></strong></font></td>

                            <td class=" "><font size="+1"><strong><?php echo $row_just['quantity']; ?></strong></font></td>

                            <td class=" "><font size="+1"><strong><?php echo $row_just['price']; ?></strong></font></td>

                            <td class=" "><font size="+1"><strong><?php echo $row_just['total']; ?></strong></font></td>

                          </tr>
                         <?php $num++; } while ($row_just = mysqli_fetch_assoc($rst)); ?>
                        </tbody>

                     </table>     

                     <h2>Total Payment: <strong><?php $tot=gettotamnt($bcode,$date,$teller,$link,$time); $tot1=gettotamnt2($bcode,$date,$teller,$link); $ans=$tot-$tot1; echo $tot1;  ?></strong></h2>
                     <h2>Payment Balance: <strong><?php $tot=gettotamnt($bcode,$date,$teller,$link,$time); $tot1=gettotamnt2($bcode,$date,$teller,$link); $ans=$tot-$tot1; echo $ans; ?></strong></h2>
                     <h2>Sales Attendant: <?php echo $name;  ?></h2>
                    
                    <h2><center> Thanks For Your Patronage</center></h2>
                     
                     

           			<a href="pos.php"><button class="btn btn-success pull-right" onClick="window.print()"><img src="img/Print.png"></i> Print Transactions</button></a>

                   </div>       

              </div>

            </div>

          <!-- Recent Transactions --> 

        </div>    
<!-- Popup for view entry -->

  


<!-- Popup for data -->

   <div id="buy_data" style="display:none; overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 99999; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.5);">

    	 <div class="row"><br><br>

           <div class="col-lg-3 col-md-2 col-sm-1 col-xs-12"> </div>

           <div class="col-lg-6 col-md-8 col-sm-10 col-xs-12">

           	    <div class="popup_closer">

                  <button type="button" onclick="$(&#39;#buy_data&#39;).fadeOut(&#39;slow&#39;);" class="pull-right btn btn-danger"><i class="fa  fa-times"></i></button>

               </div>

               <div class="x_panel">

                 <div class="x_content">

                 	<h3>Buy Data</h3>

                     <div class="ln_solid"></div>

                        <form method="post" id="dpayform" action="https://my.mobilevtu.com.ng/index.php" data-parsley-validate="" class="form-horizontal form-label-left">							

                       	<input type="hidden" id="dhash" value="ba895bb38ae495515851321c00d5647f:ZWjIH8vUDVaJWinRjHwSMGIGf1XFMSWs">

                        <input type="hidden" id="demail" value="faccomputers@yahoo.com">

                        <input type="hidden" id="damount" value="0.00">

                        <input type="hidden" id="dvalue_amount2" value="">

                        <div class="form-group doperator_logo" style="display:none">

                        	<center><img id="doperator_logo" src="./dashboard_files/ajax-loader.gif" style="width:70px;border-radius:5px;"></center>

                        </div>

                        

                        <div class="form-group">

                            <label for="dnumber" class="control-label col-md-3 col-sm-3 col-xs-12">Mobile Number</label>

                            <div class="col-md-8 col-sm-8 col-xs-12">

                                <input id="dnumber" required="required" placeholder="E.g: 2348031234567" class="form-control col-md-7 col-xs-12" type="number" value="">

                            </div>

                        </div>

                        

	                    <div class="form-group dshow_operator" style="display:none">

                        	<label class="control-label col-md-3 col-sm-3 col-xs-12">Select Operator</label>

                            <div class="col-md-8 col-sm-8 col-xs-12">

                                <select id="doperator" style="width:100%;" required="" class="select2a form-control col-md-7 col-xs-12">

								   <option disabled="" selected="" value="">Choose Network Operator</option>

                                   
										<option value="MTN">MTN Nigeria </option>

                                     
										<option value="Glo">Glo Mobile Nigeria </option>

                                     
										<option value="9mobile">9Mobile Nigeria </option>

                                     
										<option value="Airtel">Airtel Nigeria </option>

                                        

                               </select>

                            </div>

                        </div> 

                        

                        <div class="form-group show_when_op" style="display:none">

                            <label class="control-label col-md-3 col-sm-3 col-xs-12">Select Data Package</label>

                            <div class="col-md-8 col-sm-8 col-xs-12">

                                <select id="dvalue_amount" style="width:100%;" required="" class="select2a form-control col-md-7 col-xs-12">

								   <option disabled="" selected="" value="">Choose a Package</option>

                               </select>

                            </div>

                        </div>

                        

                        <div class="form-group">

                            <label for="damount2" class="control-label col-md-3 col-sm-3 col-xs-12">You Pay</label>

                            <div class="col-md-8 col-sm-8 col-xs-12">

                                <span id="damount2" class="form-control col-md-7 col-xs-12" style="border-color:#eee;">₦0.00</span>

                            </div>

                        </div>

                      

                    <div class="ln_solid"></div>

                    <div class="form-group">

                      <div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3">

                         <button type="button" id="dpaystack" onclick="payDataPaystack()" class="acting btn btn-primary"><i class="fa fa-cc-mastercard"></i> Pay Online</button>

                         <button type="button" id="dwalletpay" onclick="payDataLocal()" class="acting btn btn-pup"><i class="fa  fa-money"></i> Use My Wallet</button>

                       </div>

                     </div>

                    </form> 

                 </div>

               </div>                  

           </div>

           <div class="col-lg-3 col-md-8 col-sm-1 col-xs-12"> </div>

       </div>            	

   </div>



      </div>

    </div>

    <!-- jQuery -->

    <script src="./dashboard_files/jquery.min.js.download"></script>

    <!-- Bootstrap -->

    <script src="./dashboard_files/bootstrap.min.js.download"></script>

    <!-- FastClick -->

    <script src="./dashboard_files/fastclick.js.download"></script>

    <!-- NProgress -->

    <script src="./dashboard_files/nprogress.js.download"></script>

    <!-- Chart.js -->

    <script src="./dashboard_files/Chart.min.js.download"></script>

    <!-- gauge.js -->

    <script src="./dashboard_files/gauge.min.js.download"></script>

    <!-- bootstrap-progressbar -->

    <script src="./dashboard_files/bootstrap-progressbar.min.js.download"></script>

    <!-- iCheck -->

    <script src="./dashboard_files/icheck.min.js.download"></script>

    <!-- Skycons -->

    <script src="./dashboard_files/skycons.js.download"></script>

    <!-- Flot -->

    <script src="./dashboard_files/jquery.flot.js.download"></script>

    <script src="./dashboard_files/jquery.flot.pie.js.download"></script>

    <script src="./dashboard_files/jquery.flot.time.js.download"></script>

    <script src="./dashboard_files/jquery.flot.stack.js.download"></script>

    <script src="./dashboard_files/jquery.flot.resize.js.download"></script>

    <!-- Flot plugins -->

    <script src="./dashboard_files/jquery.flot.orderBars.js.download"></script>

    <script src="./dashboard_files/jquery.flot.spline.min.js.download"></script>

    <script src="./dashboard_files/curvedLines.js.download"></script>

    <!-- DateJS -->

    <script src="./dashboard_files/date.js.download"></script>

    <!-- JQVMap -->

    <script src="./dashboard_files/jquery.vmap.js.download"></script>

    <script src="./dashboard_files/jquery.vmap.world.js.download"></script>

    <script src="./dashboard_files/jquery.vmap.sampledata.js.download"></script>

    <!-- bootstrap-daterangepicker -->

    <script src="./dashboard_files/moment.min.js.download"></script>

    <script src="./dashboard_files/daterangepicker.js.download"></script>

    <!-- morris.js -->

    <script src="./dashboard_files/raphael.min.js.download"></script>

    <script src="./dashboard_files/morris.min.js.download"></script>

    <script src="./dashboard_files/sweetalert.min.js.download"></script>



    <script src="./dashboard_files/featherlight.min.js.download"></script>

    <!-- Custom Theme Scripts -->

    <script src="./dashboard_files/custom.js.download"></script>

	<script src="./dashboard_files/tinymce.min.js.download"></script>

    <script src="./dashboard_files/api.js.download"></script>

    <script src="./dashboard_files/select2.min.js.download"></script>

	<script src="./dashboard_files/modernizr.js.download"></script>

	 <script src="./dashboard_files/inline.js.download"></script> 

    <script src="./dashboard_files/flwpbf-inline.js.download"></script>

    <script src="./dashboard_files/google.js.download"></script>

<script>

$(document).ready(function() {

	

});

		

		

/* Initiate Functions - */

	$(document).ready(function() {				

		init_sparklines();

		init_flot_chart();

		init_sidebar();

		init_wysiwyg();

		init_InputMask();

		init_JQVmap();

		init_cropper();

		init_knob();

		init_IonRangeSlider();

		init_ColorPicker();

		init_TagsInput();

		init_parsley();

		init_SmartWizard();

		init_EasyPieChart();

		init_charts();

		init_echarts();

		init_morris_charts();

		init_skycons();

		init_select2();

		init_validator();

		init_DataTables();

		init_chart_doughnut();

		init_gauge();

		init_PNotify();

		init_starrr();

		init_calendar();

		init_compose();

		init_CustomNotification();

		init_autosize();

		init_autocomplete();		

	});	

</script>

	

        

  



</div><iframe frameborder="0" allowtransparency="true" id="GggF2" name="paystack-checkout-background-GggF2" style="z-index: 2147483647; background: rgba(0, 0, 0, 0.75); border: 0px none transparent; overflow: hidden; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; transition: opacity 0.3s ease 0s; visibility: hidden; display: none;" src="./dashboard_files/saved_resource.html"></iframe><iframe frameborder="0" allowtransparency="true" allowpaymentrequest="true" id="9bOl3" name="paystack-checkout-9bOl3" src="./dashboard_files/popup.html" style="z-index: 2147483647; background: transparent; border: 0px none transparent; overflow: hidden; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; visibility: hidden; display: none;"></iframe></body></html>