<?php

include('common/db_connection.php');

$Mainclass=new DB_Controller();

$Mainclass->Check_Login();

$Dealer=$_COOKIE['O_Code'];
$Challan=base64_decode($_REQUEST['ch']);
?>
<!DOCTYPE html>
<html lang="en">
 
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chandrani Pearls | Stock Register Report</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="" />
<meta name="keywords" content="bootstrap, bootstrap admin template, admin theme, admin dashboard, dashboard template, admin template, responsive" />
<meta name="author" content="" />
<link rel="icon" type="image/png" href="images/chandrani-logo1.png">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Quicksand:500,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="files/bower_components/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="files/assets/pages/waves/css/waves.min.css" type="text/css" media="all">
<link rel="stylesheet" type="text/css" href="files/assets/icon/feather/css/feather.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/themify-icons/themify-icons.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/icofont/css/icofont.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/pages/data-table/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/pages/data-table/extensions/buttons/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/pages.css">
<link rel="stylesheet" href="files/assets/css/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="source/jquery.fancybox.css?v=2.1.5" media="screen" />
<style type="text/css">
	.fancybox-custom .fancybox-skin {
		box-shadow: 0 0 50px #222;
	}
.fancybox-skin{
padding:0px;
}
a .dt-button .buttons-copy{
display:none !important;
}
.table td, .table th {
padding: 0.40rem .50rem;
font-size: 8px !important;
}
</style> 
<style type="text/css">
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}
#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}
#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}
#tooltip.left:after
{
left: 10px;
margin: 0;
}
#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}
.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}
		</style>
 <style type="text/css">
 
 
 
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}
#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}
#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}
#tooltip.left:after
{
left: 10px;
margin: 0;
}
#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}
.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}
</style>
<script>
function isNumberKey(evt) 
{
	var charCode = (evt.which) ? evt.which : event.keyCode; 
	if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) 
	{
		return false;
	} 
	else 
	{
		return true;
	} 
} 
</script> 
<script>
 function Print() 
	  { 
	  // alert(1);  
	  var divToPrint = document.getElementById('printdiv');              
	  
	  var popupWin = window.open('', '_blank');      
	  
	  popupWin.document.open();
	  
	  popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>');
	  
	  popupWin.document.close();
	  }  
</script> 
<style type="text/css">
.table_header{
background-color:#263544;
text-align:center;
color:#FFFFFF;
font-size:13px;
padding:4px 0px;
}
.table_body{
background-color:#e7eef6;
text-align:center;
color:#000000;
font-size:13px;
padding:4px 0px;
}
.total_leftdiv{
float:left;
padding-left:10px;
text-align:left;
font-size:13px;
color:#000000;
padding-bottom:4px;
font-weight:500;
}
.total_rightdiv{
float:right;
padding-left:10px;
text-align:right;
font-size:13px;
color:#000000;
padding-bottom:4px;
font-weight:600;
}
.btn_div{
background-color:#FFFFFF;
border:0px;
text-align:left;
font-weight:600px !important;
outline:0px !important;
cursor:pointer;
}
</style>
</head>
<body>
<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">
<?php include('register-top-header.php'); ?>
<div class="pcoded-main-container">
<div class="pcoded-wrapper">
<?php include('register-side-menu.php'); ?>
<div class="pcoded-content">
<div class="page-header card">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<div class="d-inline">
<h5 style="text-transform:uppercase; font-size:25px; font-weight:600;">IMPORT CONSUMABLE CHALLAN</h5>
</div>
</div>
</div>
</div>
</div>
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-block">
<form method="post">
<div class="row" style="margin-bottom:20px;">



<div><span id="err_div" style="font-weight:bold; color:#F00;"></span></div>
<!--<div class="col-sm-2" style="margin-top:30px;"><div class="form-group row">
<label class="col-sm-12 col-form-label">&nbsp;</label>
<div class="col-sm-12" style="text-align:right;">
Item Received
</div>
</div></div>-->
<!--<div class="col-sm-1" style="margin-top:30px;"><div class="form-group row">
<label class="col-sm-12 col-form-label">&nbsp;</label>
<div class="col-sm-12" style="text-align:right;">
<input type="text" class="form-control" name="item_received" id="item_received" placeholder="" autocomplete="off" value="" >
</div>
</div></div>-->

</div>
</form>
<!-- ############# Print Section ################-->
	<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-top:20px;">
   <tr><td><input name="save_submit" type="button" class="btn btn-primary m-b-0" value="PRINT" style="float:right; padding: 3px 14px; font-size:13px; margin-right: 80px;" onClick="Print()"></td></tr> 
</table>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center"  id="printdiv">
   <tr><td><table width="300" border="0" cellspacing="0" cellpadding="0" align="center"> 
  
</table> </td></tr>
<tr><td  style="color:#333; font-size:15px; font-weight: 700; font-family:Arial, Helvetica, sans-serif; padding-bottom:5px; text-align:center;"><h3>The Following Consumables Has Been Received Successfully</h3></td></tr>
<tr><td>
    
 <table width="1000" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#d6dde1" style="border-collapse:collapse">
  <tr>
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">SLN</td>
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Challan No</td>    
    <!--<td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">GRN No</td>-->    
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Category</td> 
	  <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Product Code</td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Quantity</td>
    
  </tr>
  <?php
$condition="Dealer_Code='".$Dealer."' and Challan_No='".$Challan."'";

$condition.=" order by Product_Code asc";
$Get_Dealers_Stock=$Mainclass->Challan_det_return('dealer_challan_details',$condition);
if($Get_Dealers_Stock>0)
{	
$i=1;
foreach($Get_Dealers_Stock as $stock)
	{
	$Condition="Dealer_Code='".$Dealer."' and Challan_No='".$Challan."'";
	$Get_Customer_Details=$Mainclass->Challan_Details('dealer_challan_master',$Condition);//customer data//
	$Condition1=" Order_Code='".$stock['Dealer_Code']."'";
	$Dealer_Details=$Mainclass->Challan_Details('dealer_master',$Condition1);	
	$Categeory=$Mainclass->Fetch_needed_datas('product_category_master','Category','SLN',$stock['Category_Code'],'','');
?>
  <tr>
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $i;?></td>
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $Challan;?></td>    
    <!--<td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $stock['GRN_NO'];?></td>-->    
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $Categeory['Category'];?></td>
	  <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $stock['Product_Code'];?></td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $stock['Quantity'];?></td>
    
  </tr>
  <?php
$i++;
}
}	
	?> 
</table>    
    
</td></tr>
</table>






<!-- ############# Print Section ################-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="styleSelector">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="files/bower_components/jquery/js/jquery.min.js"></script>
<!--<script src="files/assets/js/jquery.js"></script>-->
<script type="text/javascript" src="files/bower_components/jquery-ui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="files/bower_components/popper.js/js/popper.min.js"></script>
<script type="text/javascript" src="files/bower_components/bootstrap/js/bootstrap.min.js"></script>
<script src="../files/assets/pages/waves/js/waves.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>
<script type="text/javascript" src="files/bower_components/modernizr/js/modernizr.js"></script>
<script type="text/javascript" src="files/bower_components/modernizr/js/css-scrollbars.js"></script>
<!--<script src="../../../../cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"></script>
<script src="../../../../cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js" type="text/javascript"></script>-->
<!--<script type="text/javascript" src="files/assets/pages/form-validation/validate.js"></script>
<script type="text/javascript" src="files/assets/pages/form-validation/form-validation.js"></script>-->
<script src="files/assets/js/pcoded.min.js" type="text/javascript"></script>
<script src="files/assets/js/vertical/vertical-layout.min.js" type="text/javascript"></script>
<script src="files/assets/js/jquery.mCustomScrollbar.concat.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/assets/js/script.js"></script>
<script src="files/bower_components/datatables.net/js/jquery.dataTables.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/jszip.min.js" ></script>
<script src="files/assets/pages/data-table/js/pdfmake.min.js" ></script>
<script src="files/assets/pages/data-table/js/vfs_fonts.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/dataTables.buttons.min.js"></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/buttons.flash.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/jszip.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/vfs_fonts.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/buttons.colVis.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.print.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.html5.min.js" ></script>
<script src="files/bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" ></script>
<script src="files/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js" ></script>
<script src="files/bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/extension-btns-custom.js" ></script>
<!--<script src="files/bower_components/datatables.net/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/jszip.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/pdfmake.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/vfs_fonts.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.print.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.html5.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/data-table-custom.js" type="text/javascript"></script>-->
<script src="files/assets/js/rocket-loader.min.js" data-cf-settings="49" defer=""></script>
<script src="files/assets/js/jquery-ui.js"></script>
<script src="js/notify.min.js"></script>
 
<script>
$(function() {
$( "#from-date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy'
//dateFormat: 'd MM, yy'
});
});
</script>
<script>
$(function() {
$( "#to-date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy'
//dateFormat: 'd MM, yy'
});
});
</script>
<script type="text/javascript" src="source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script>
$(document).ready(function() {
	$(".various3").fancybox({
		maxWidth	: 1000,
		maxHeight	: 800,
		fitToView	: true,
		width		: '100%',
		height		: '100%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none',
		
	});
});
</script>
<script type="text/javascript">
    $(document).ready(function () {
 
      $('input').keyup(function (e) {
        if (e.which == 39) { // right arrow
          $(this).closest('td').next().find('input').focus();
 
        } else if (e.which == 37) { // left arrow
          $(this).closest('td').prev().find('input').focus();
 
        } else if (e.which == 40) { // down arrow
          $(this).closest('tr').next().find('td:eq(' + $(this).closest('td').index() + ')').find('input').focus();
 
        } else if (e.which == 38) { // up arrow
          $(this).closest('tr').prev().find('td:eq(' + $(this).closest('td').index() + ')').find('input').focus();
        }
      });
 
    // un-comment to display key code
    // $("input").keydown(function (e) {
    //   console.log(e.which);
    // });
    });
  </script>
<script src="../../../../ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js" data-cf-settings="49" defer=""></script>
</body>
<!-- Mirrored from colorlib.com//polygon/admindek/default/form-validation.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 23 Nov 2019 12:53:50 GMT -->
</html><?php
include('common/db_connection.php');
$Mainclass=new DB_Controller();
$Mainclass->Check_Login();
if($_REQUEST['from-date']!='')
{
$From_Date=date('Y-m-d',strtotime($_REQUEST['from-date']));	
}
else
{
$From_Date=date('Y-m-d');
}
if(strtoupper($_COOKIE['Type'])=="ADMIN")
{
$Condition_Dealer=" Order_Code='".$_REQUEST['dealer']."'";
}
else
{
	$Condition_Dealer=" Order_Code='".$_COOKIE['O_Code']."'";
}
$Get_Dealer_Info=$Mainclass->Challan_Details('dealer_master',$Condition_Dealer);//dealer data//
?>
<!DOCTYPE html>
<html lang="en">
 
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chandrani Pearls | Stock Register Report</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="" />
<meta name="keywords" content="bootstrap, bootstrap admin template, admin theme, admin dashboard, dashboard template, admin template, responsive" />
<meta name="author" content="" />
<link rel="icon" type="image/png" href="images/chandrani-logo1.png">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Quicksand:500,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="files/bower_components/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="files/assets/pages/waves/css/waves.min.css" type="text/css" media="all">
<link rel="stylesheet" type="text/css" href="files/assets/icon/feather/css/feather.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/themify-icons/themify-icons.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/icofont/css/icofont.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/pages/data-table/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/pages/data-table/extensions/buttons/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/pages.css">
<link rel="stylesheet" href="files/assets/css/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="source/jquery.fancybox.css?v=2.1.5" media="screen" />
<style type="text/css">
	.fancybox-custom .fancybox-skin {
		box-shadow: 0 0 50px #222;
	}
.fancybox-skin{
padding:0px;
}
a .dt-button .buttons-copy{
display:none !important;
}
.table td, .table th {
padding: 0.40rem .50rem;
font-size: 8px !important;
}
</style> 
<style type="text/css">
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}
#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}
#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}
#tooltip.left:after
{
left: 10px;
margin: 0;
}
#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}
.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}
		</style>
 <style type="text/css">
 
 
 
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}
#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}
#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}
#tooltip.left:after
{
left: 10px;
margin: 0;
}
#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}
.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}
</style>
<script>
function isNumberKey(evt) 
{
	var charCode = (evt.which) ? evt.which : event.keyCode; 
	if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) 
	{
		return false;
	} 
	else 
	{
		return true;
	} 
} 
</script> 
<script>
 function Print() 
	  { 
	  // alert(1);  
	  var divToPrint = document.getElementById('printdiv');              
	  
	  var popupWin = window.open('', '_blank');      
	  
	  popupWin.document.open();
	  
	  popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>');
	  
	  popupWin.document.close();
	  }  
</script> 
<style type="text/css">
.table_header{
background-color:#263544;
text-align:center;
color:#FFFFFF;
font-size:13px;
padding:4px 0px;
}
.table_body{
background-color:#e7eef6;
text-align:center;
color:#000000;
font-size:13px;
padding:4px 0px;
}
.total_leftdiv{
float:left;
padding-left:10px;
text-align:left;
font-size:13px;
color:#000000;
padding-bottom:4px;
font-weight:500;
}
.total_rightdiv{
float:right;
padding-left:10px;
text-align:right;
font-size:13px;
color:#000000;
padding-bottom:4px;
font-weight:600;
}
.btn_div{
background-color:#FFFFFF;
border:0px;
text-align:left;
font-weight:600px !important;
outline:0px !important;
cursor:pointer;
}
</style>
</head>
<body>
<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">
<?php include('register-top-header.php'); ?>
<div class="pcoded-main-container">
<div class="pcoded-wrapper">
<?php include('register-side-menu.php'); ?>
<div class="pcoded-content">
<div class="page-header card">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<div class="d-inline">
<h5 style="text-transform:uppercase; font-size:25px; font-weight:600;">Credit Card Sale/Booking</h5>
</div>
</div>
</div>
</div>
</div>
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-block">
<form method="post">
<div class="row" style="margin-bottom:20px;">
<?php
if(strtoupper($_COOKIE['Type'])=='ADMIN')
{
	?>
<div class="col-sm-3" ><div class="form-group row">
<label class="col-sm-12 col-form-label" >Select Dealer</label>
<div class="col-sm-12">
<select class="form-control" name="dealer" id="dealer">
<option value="">Select Dealer</option>
<?php
$dealer_List=$Mainclass->Fetch_All_datas('dealer_master','','','Dealer_Name');
foreach($dealer_List as $get_dealer)
{
?>
<option value="<?php echo $get_dealer['Order_Code'];?>"<?php if($get_dealer['Order_Code']==$_REQUEST['dealer']){echo "selected";}?>><?php echo $get_dealer['Dealer_Name'];?></option>
<?php
}
?>
    
</select>
</div>
</div></div>
<?php
}
?>
<div class="col-sm-3" ><div class="form-group row">
<label class="col-sm-12 col-form-label">Date </label>
<div class="col-sm-12">
<input type="text" class="form-control" name="from-date" id="from-date" placeholder="Select From Date" autocomplete="off" value="<?php echo $_REQUEST['from-date'];?>" onKeyPress="return false;" onChange="remove_border()" >
</div>
</div></div>
<div class="col-sm-1" ><div class="form-group row">
<label class="col-sm-12 col-form-label">&nbsp;</label>
<div class="col-sm-12">
<input name="save_submit" type="submit" class="btn btn-primary m-b-0" value="SEARCH" style="float:left; padding: 3px 14px; font-size:13px;">
</div>
</div></div>
<div><span id="err_div" style="font-weight:bold; color:#F00;"></span></div>
<!--<div class="col-sm-2" style="margin-top:30px;"><div class="form-group row">
<label class="col-sm-12 col-form-label">&nbsp;</label>
<div class="col-sm-12" style="text-align:right;">
Item Received
</div>
</div></div>-->
<!--<div class="col-sm-1" style="margin-top:30px;"><div class="form-group row">
<label class="col-sm-12 col-form-label">&nbsp;</label>
<div class="col-sm-12" style="text-align:right;">
<input type="text" class="form-control" name="item_received" id="item_received" placeholder="" autocomplete="off" value="" >
</div>
</div></div>-->

</div>
</form>
<!-- ############# Print Section ################-->
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center"  id="printdiv">
   <tr><td><table width="300" border="0" cellspacing="0" cellpadding="0" align="center"> 
  <tr>
    <td> <img src="images/logo.png" width="100%"></td>
  </tr>
</table> </td></tr>
<tr><td  style="color:#333; font-size:15px; font-weight: 700; font-family:Arial, Helvetica, sans-serif; padding-bottom:5px; text-align:center;">Dealership Name: <?php echo $Get_Dealer_Info['Dealer_Name'];?></td></tr>
<tr><td style="color:#333; font-size:15px; font-weight: 700; font-family:Arial, Helvetica, sans-serif; padding-bottom:5px; text-align:center;">Credit Card Sale / Booking List Dated <?php echo date('d-m-Y',strtotime($From_Date));?> </td></tr>
<tr><td>
    
 <table width="1000" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#d6dde1" style="border-collapse:collapse">
  <tr>
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Bill/Order No.</td>
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Card No.</td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Bank</td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Chg.Amt</td>       
    
  </tr>
  <?php
$Start=$From_Date." "."00:00:00";
$End=$From_Date." "."23:59:59";
if(strtoupper($_COOKIE['Type'])!='ADMIN')
{
	$Condition=" Dealer_Code='".$_COOKIE['O_Code']."' and ";
}
else
{
	if($_REQUEST['dealer']!='')
	{
		 $Condition=" Dealer_Code='".$_REQUEST['dealer']."' and ";
	}
	
}
$Condition.=" Payment_Date='".$From_Date."' and Complete='Yes' and Bank_Amount!='0.00' order by SLN desc";
$Field_Needed="Invoice_Id,Card_Number,Bank_Name,Bank_Amount";
$Card_Payment=$Mainclass->Get_Required_Field('payment_master',$Field_Needed,$Condition);
	//if($Get_Repair_Report>0)
	//{
		foreach($Card_Payment as $get_payment)
		{	
			
?>
  <tr>
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $get_payment['Invoice_Id'];?></td>
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $get_payment['Card_Number'];?></td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo $get_payment['Bank_Name'];?></td>    
    <td style="padding: .5rem .2rem; text-align:left; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;"><?php echo number_format($get_payment['Bank_Amount'],2);?></td>    
    
  </tr>
  <?php		
	}	
	?>
    <?php
$condition1=" Payment_Date='".$From_Date."' and Bank_Amount!='0.00' and Complete='Yes'";
if($_REQUEST['dealer']!='')
	{
		 $condition1.=" and Dealer_Code='".$_REQUEST['dealer']."'";
	}
$Sum=$Mainclass->get_sum('payment_master','Bank_Amount',$condition1);
?>
  <tr>
    <td colspan="3" style="padding: .5rem .2rem; text-align:right; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Total</td>
    
    <td style="padding: .5rem .2rem; text-align:left; font-size:11px; font-weight:600; font-family:Arial, Helvetica, sans-serif; color:#333; backbround-color:#fff;">Rs. <?php echo number_format($Sum,2);?>
</td>
  </tr>
</table>    
    
</td></tr>
</table>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-top:20px;">
   <tr><td><input name="save_submit" type="button" class="btn btn-primary m-b-0" value="PRINT" style="float:right; padding: 3px 14px; font-size:13px;" onClick="Print()"></td></tr> 
</table>
<!-- ############# Print Section ################-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="styleSelector">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="files/bower_components/jquery/js/jquery.min.js"></script>
<!--<script src="files/assets/js/jquery.js"></script>-->
<script type="text/javascript" src="files/bower_components/jquery-ui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="files/bower_components/popper.js/js/popper.min.js"></script>
<script type="text/javascript" src="files/bower_components/bootstrap/js/bootstrap.min.js"></script>
<script src="../files/assets/pages/waves/js/waves.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>
<script type="text/javascript" src="files/bower_components/modernizr/js/modernizr.js"></script>
<script type="text/javascript" src="files/bower_components/modernizr/js/css-scrollbars.js"></script>
<!--<script src="../../../../cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"></script>
<script src="../../../../cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js" type="text/javascript"></script>-->
<!--<script type="text/javascript" src="files/assets/pages/form-validation/validate.js"></script>
<script type="text/javascript" src="files/assets/pages/form-validation/form-validation.js"></script>-->
<script src="files/assets/js/pcoded.min.js" type="text/javascript"></script>
<script src="files/assets/js/vertical/vertical-layout.min.js" type="text/javascript"></script>
<script src="files/assets/js/jquery.mCustomScrollbar.concat.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/assets/js/script.js"></script>
<script src="files/bower_components/datatables.net/js/jquery.dataTables.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/jszip.min.js" ></script>
<script src="files/assets/pages/data-table/js/pdfmake.min.js" ></script>
<script src="files/assets/pages/data-table/js/vfs_fonts.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/dataTables.buttons.min.js"></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/buttons.flash.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/jszip.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/vfs_fonts.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/buttons.colVis.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.print.min.js" ></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.html5.min.js" ></script>
<script src="files/bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" ></script>
<script src="files/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js" ></script>
<script src="files/bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" ></script>
<script src="files/assets/pages/data-table/extensions/buttons/js/extension-btns-custom.js" ></script>
<!--<script src="files/bower_components/datatables.net/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/jszip.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/pdfmake.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/vfs_fonts.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.print.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.html5.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/data-table-custom.js" type="text/javascript"></script>-->
<script src="files/assets/js/rocket-loader.min.js" data-cf-settings="49" defer=""></script>
<script src="files/assets/js/jquery-ui.js"></script>
<script src="js/notify.min.js"></script>
 
<script>
$(function() {
$( "#from-date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy'
//dateFormat: 'd MM, yy'
});
});
</script>
<script>
$(function() {
$( "#to-date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy'
//dateFormat: 'd MM, yy'
});
});
</script>
<script type="text/javascript" src="source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script>
$(document).ready(function() {
	$(".various3").fancybox({
		maxWidth	: 1000,
		maxHeight	: 800,
		fitToView	: true,
		width		: '100%',
		height		: '100%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none',
		
	});
});
</script>
<script type="text/javascript">
    $(document).ready(function () {
 
      $('input').keyup(function (e) {
        if (e.which == 39) { // right arrow
          $(this).closest('td').next().find('input').focus();
 
        } else if (e.which == 37) { // left arrow
          $(this).closest('td').prev().find('input').focus();
 
        } else if (e.which == 40) { // down arrow
          $(this).closest('tr').next().find('td:eq(' + $(this).closest('td').index() + ')').find('input').focus();
 
        } else if (e.which == 38) { // up arrow
          $(this).closest('tr').prev().find('td:eq(' + $(this).closest('td').index() + ')').find('input').focus();
        }
      });
 
    // un-comment to display key code
    // $("input").keydown(function (e) {
    //   console.log(e.which);
    // });
    });
  </script>
<script src="../../../../ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js" data-cf-settings="49" defer=""></script>
</body>
<!-- Mirrored from colorlib.com//polygon/admindek/default/form-validation.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 23 Nov 2019 12:53:50 GMT -->
</html>