<?php 
include "includes/header.php"; 

if(isset($_REQUEST['s_bill_no']) && !empty($_REQUEST['s_bill_no']) ){
	$s_bill_no = base64_decode($_REQUEST['s_bill_no']);
	//$s_bill_no = $_REQUEST['s_bill_no'];
	// echo " select t1.*,DATE_FORMAT(t1.s_bill_date,'%d-%b-%Y') AS disp_bill_date, t2.company_name, t2.c_address, t2.c_city, t2.c_state, t2.c_country, t2.c_landline, t2.c_mobile, t3.cus_name, t3.cus_address, t3.cus_city, t3.cus_state, t3.cus_country from t_sales_entry_main t1 inner join m_company t2 on t1.company_id=t2.company_id inner join m_customer t3 on t1.cus_id = t3.cus_id  where 1=1 and t1.IsActive=1 and t1.s_bill_no='".$s_bill_no."' ";
	$rslt_main_det = $db->get_a_line(" select t1.*,DATE_FORMAT(t1.s_bill_date,'%d-%b-%Y') AS disp_bill_date, t2.company_name, t2.c_address, t2.c_city, t2.c_state, t2.c_country, t2.c_landline, t2.c_mobile, t3.cus_name, t3.cus_address, t3.cus_city, t3.cus_state, t3.cus_country from t_sales_entry_main t1 inner join m_company t2 on t1.company_id=t2.company_id inner join m_customer t3 on t1.cus_id = t3.cus_id  where 1=1 and t1.IsActive=1 and t1.s_bill_no='".$s_bill_no."' ");
	
	$rslt_pdt_det =$db->get_rsltset("select * from t_sales_entry_details where 1=1 and IsActive=1 and s_bill_no='".$s_bill_no."'  ");
	
	
}
?> 

<div class="wrapper">
    <div class="container">
        <!-- Page-Title - START -->
        <div class="row">
            <div class="col-sm-12">  						
                <h4 class="page-title">Bill <a target="_new" class="btn btn-danger"href="http://srisaraswathisilks.com/admin/sales_invoice_print_mode.php?billinfo=<?php echo $_REQUEST['s_bill_no'];?>"><i class="fa fa-print" aria-hidden="true"></i> Print</a></h4>
            </div>
        </div>
		<!-- Page-Title - END -->	
			
		
		
        <div class="row">
            <div class="col-xs-12">
                <div class="card-box">                           
                    <div class="panel-body">
                        <iframe src="../admin/generate-pdf.php?billinfo=<?php echo $_REQUEST['s_bill_no'];?>" width="100%" style="min-height: 768px;overflow-y: scroll;"></iframe>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->
				
			

<?php include "includes/footer.php";  ?> 
	</div> <!-- container -->
</div> <!-- End wrapper -->

<?php include "includes/footer_script.php";  ?> 


<script>
$(function () {   		
	//datatblCal();		
});
</script>	

</body>
</html>
