PK

ADDRLIN : /home/questend/public_html/subdomain/trufflenation.questend.com/useradmin/
FLL :
Current File : /home/questend/public_html/subdomain/trufflenation.questend.com/useradmin/invoice.php

<?php 
	ob_start();
	//error_reporting(E_ALL ^ E_NOTICE);
	@session_start();
	ini_set('allow_url_include',1);    
	date_default_timezone_set("Asia/Kolkata");
	set_time_limit(600);
	ini_set('max_execution_time',600);
	require_once '../admin/includes/settings/PDODB.php';
	include '../admin/includes/modules/functions.php';

	$function = new FUNCTIONS();
	
	$accountdata = $function->getAccountDetails($ac_id=$_GET['id'],$uid=$_GET['uid'],$isActive=1,$orderBy='ASC');


	//print_r($accountdata[0]); exit;
 	$orderdata = $function->getStudentJoinCourseList($id=$accountdata[0]['demand_id'],$studentId=NULL,$isActive=1,$orderBy='DESC');
 	//print_r($orderdata[0]); exit;
	$batchTiming = $orderdata[0]['batchTiming'];
  $batchMonth = $orderdata[0]['batchMonth'];
  $batchYear = $orderdata[0]['batchYear'];
	

	$startDate = $orderdata[0]['startDate'];
	$endDate = $orderdata[0]['endDate'];


	$batch = $batchMonth." ".$batchYear." (".$batchTiming.")";

	$user = $function->getStudent($id=$_GET['uid'],$isActive=1,$orderBy='ASC');
	$uemail = $user[0]['uemail'];
	$mobileno = $user[0]['mobileno'];
	
	$paymentMode = $accountdata[0]['paymentMode'];
	//print_r($accountdata[0]);
	$forcompanyname = 'For Bake Better Network LLP.';


	$courselistdata = $function->getOrderItem($id=NULL,$orderid=$accountdata[0]['demand_id'],$courseid=NULL,$studentId=NULL,$isActive=1,$orderBy='DESC');
	$courseName2 ="";
  for($i=0;$i<count($courselistdata);$i++){
    $orderdata = $function->getStudentJoinCourseList($id=$courselistdata[$i]['orderid'],$studentId=NULL,$isActive=NULL,$orderBy='ASC');

    $course = $function->getCourse($id=$courselistdata[$i]['courseid'],$isActive=1,$orderBy='ASC');
    $courseName = $course[0]['courseName'];
    $courseName2 .= "<b> " . ($i + 1) . " )" . $courseName . "</b> <br>";
    
  }
  //print_r($courseName2); exit;

	if ($_GET['invoicetype']=='Paid') {
		if ($accountdata[0]['is_adjustment']==2) {
			$amount = $accountdata[0]['debit'];
		}else {
			$amount = $accountdata[0]['credit'];
		}
		$gstNo = $accountdata[0]['gstNo'];
		
		$invoice = $accountdata[0]['invoice'];
		$date =  date('jS M, Y', strtotime($accountdata[0]['date']));
		$percent = '18';
		/*$sgst = '18';
		$cgst = '9';*/
		//$grand = $amount  * ((100 + $percent) / 100);
		$amountinword = $function->numbertoWords($number=$amount);

		$gstamt = $amount-($amount*(100/(100+$percent)));
		$total = number_format(round($amount-$gstamt));
		$amount = number_format($amount);

		//print_r($gstamt); //exit;
		/*if ($accountdata[0]['paymentMode']=='Cash') {
         $mailmsg = " Cash, dated ".$date;
	  }elseif ($accountdata[0]['paymentMode']=='Card') {
	     $mailmsg = " Card, TXN Id ".$accountdata[0]['transaction_id']." dated ".$date;
	  }elseif ($accountdata[0]['paymentMode']=='Cheque') {
	     $mailmsg = " Cheque No. ".$accountdata[0]['chequeno'].", Bank Name. ".$accountdata[0]['bankname']." dated ".$date;
	  }elseif ($accountdata[0]['paymentMode']=='UPI') {
	     $mailmsg = " UPI, TXN Id ".$accountdata[0]['transaction_id']." dated ".$date;
	  }*/
		if (!empty($gstNo)) {
			//echo "gst invoice"; //exit();
			$gstNo = $accountdata[0]['gstNo'];
			$companyName = $accountdata[0]['companyName'];
			$address = $accountdata[0]['companyAddress'];
			$state = $accountdata[0]['companyState'];

			$statename = $function->getStateList($id=$state,$isActive=1);
	   		$statename  = $statename[0]['state'];

			if ($state==9) {
				$cgstamt = number_format(round($gstamt/2));
				$sgstamt = number_format(round($gstamt/2));
				$igstamt = "";
			}else {
				$igstamt = number_format(round($gstamt));
				$cgstamt = "";
				$sgstamt = "";
			}
			$html ="
				<html lang='en'>
				   <head>
				      <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
				      <title itemprop='name'>Preview bootstrap html snippet. Invoice with ribbon</title>      
				      <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'>
				      <meta name='viewport' content='width=device-width'>
				      <script src='https://printjs-4de6.kxcdn.com/print.min.js'></script>
				      <style type='text/css'>
				         	body{margin-top:20px;
				            	background:#eee;
				            }				            
				            .invoice .top-left {
				            font-size:65px;
				            color:#3ba0ff;
				            }
				            .invoice .top-right {
				            text-align:right;
				            padding-right:20px;
				            }
				            .invoice .table-row {
				            margin-left:-15px;
				            margin-right:-15px;
				            margin-top:25px;
				            }
				            .invoice .payment-info {
				            font-weight:500;
				            }
				            .invoice .table-row .table>thead {
				            border-top:1px solid #ddd;
				            }
				            .invoice .table-row .table>thead>tr>th {
				            border-bottom:none;
				            }
				            .invoice .table>tbody>tr>td {
				            padding:8px 20px;
				            }
				            .invoice .invoice-total {
				            margin-right:-10px;
				            font-size:16px;
				            }
				            .invoice .last-row {
				            border-bottom:1px solid #ddd;
				            }
				            .invoice-ribbon {
				            width:85px;
				            height:88px;
				            overflow:hidden;
				            position:absolute;
				            top:-1px;
				            right:14px;
				            }
				            .ribbon-inner {
				            text-align:center;
				            -webkit-transform:rotate(45deg);
				            -moz-transform:rotate(45deg);
				            -ms-transform:rotate(45deg);
				            -o-transform:rotate(45deg);
				            position:relative;
				            padding:7px 0;
				            left:-5px;
				            top:11px;
				            width:120px;
				            background-color:#66c591;
				            font-size:15px;
				            color:#fff;
				            }
				            .ribbon-inner:before,.ribbon-inner:after {
				            content:'';
				            position:absolute;
				            }
				            .ribbon-inner:before {
				            left:0;
				            }
				            .ribbon-inner:after {
				            right:0;
				            }
				            @media(max-width:575px) {
				            .invoice .top-left,.invoice .top-right,.invoice .payment-details {
				            text-align:center;
				            }
				            .invoice .from,.invoice .to,.invoice .payment-details {
				            float:none;
				            width:100%;
				            text-align:center;
				            margin-bottom:25px;
				            }
				            .invoice p.lead,.invoice .from p.lead,.invoice .to p.lead,.invoice .payment-details p.lead {
				            font-size:22px;
				            }
				            .invoice .btn {
				            margin-top:10px;
				            }
				            }
				            @media print {
				            .invoice {
				            width:900px;
				            height:800px;
				            }
				            }
				         </style>
				   </head>
				   <body>
				      <div id='snippetContent'>
				         <link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
				         <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'></script>
				         <script src='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script> 
				         <link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' rel='stylesheet'>
				         <div class='container bootstrap snippets bootdeys' style='width: 210mm;'>
				            <div class='row'>
				               <div class='col-sm-12'>
				                  <div class='panel panel-default' style='border: 1px solid transparent; border-color: #ddd; padding:5%'>
				                     <div class='panel-body'>
				                        <div class='invoice-ribbon'>
				                           <div class='ribbon-inner' style='background-color: #66c591;'>PAID</div>
				                        </div>		                        
				                        <div class='row'>
			                    			<div class='col-xs-6 from'>
			                    				<img src='../images/truffle-nation-logo-1.png' width='100px;'>
				                              	<h3 style='font-size: 22px; font-style: italic; color: #000;'>Bake Better Network LLP.</h3>
				                           		<p style='font-size: 18px; color: #000;'>(Truffle Nation)</p>
				                           	</div>
				                           	<div class='col-xs-6 to' style='text-align: right;'>
				                           	  <img src='../images/bake-better-logo.png' width='100px;'>
				                              <p class='marginright'>
				                              	133-A, First Floor, Lane No. 1,<br>
				                              	Western Marg, Saidulajab,<br>
				                              	Back side Saket Metro Station,<br>
				                              	New Delhi - 110030 <br>
				                              	Tel.: 08700939817
				                              </p>
				                           	</div>
			                    		</div>
				                        <hr>
				                        <div class='row text-center'>
										   							<h3 class='text-uppercase text-center mt-3' style='font-size: 40px;'>Invoice</h3>
																</div>								
				                        <div class='row'>
			                    			<div class='col-xs-6 from table-bordered' style='min-height: 140px;'>
				                              <p class='lead marginbottom'>$companyName</p>
				                              <p> $address, <br> $statename</p>
				                              <p> <b> GSTN :</b> $gstNo </p>
				                           	</div>
				                           	<div class='col-xs-6 to table-bordered' style='min-height: 140px;'>
				                              <p class='lead marginbottom'>Invoice No : $invoice </p>
				                              <p><b>Date :</b> $date</p>			                              
				                           	</div>
			                    			</div>				                    	
				                        <div class='row table-row' style='margin-top: 30px;'>
				                           	<table class='table table-bordered' style='min-height: 300px; margin-bottom: 0px;'>
																		  <thead>
																		     <tr>
																		        <th class='text-center' style='width:5%'> S.No. </th>
																		        <th style='width:50%'> Description</th>
																		        <th class='text-right' style='width:25%'> Amount </th>
																		     </tr>
																		  </thead>
																		  <tbody>
																		     <tr>
																		        <td class='text-center'></td>
																		        <td style='font-size:14px' rowspan='2'>
																		          Towards Course <br>
																		        	$courseName2		<br>
																		        	Course Start Date :  $startDate <br>
																		        	Course End Date : $endDate<br>
																		        	Batch Timings : $batch
																		        </td>
																		        <td style='width:40%' class='text-right'> $total </td>
																		     </tr>
																		     <tr>
																		        <td class='text-center'></td>
																		        <td style='width:40%'>
																		        	<table style='width:100%' class='table table-bordered'>
																		        		<tr>
																		        			<td style='width:50%'> TOTAL</td>
																		        			<td style='width:50%'  class='text-right'> $total </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> CGST @ 9 % :</td>
																		        			<td style='width:50%'  class='text-right'> $cgstamt </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> SGST @ 9 % :</td>
																		        			<td style='width:50%'  class='text-right'> $sgstamt </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> IGST @ 18%</td>
																		        			<td style='width:50%'  class='text-right'> $igstamt </td>
																		        		</tr>			                                    		
																		        		<tr>
																		        			<td style='width:50%' >GRAND TOTAL</td>
																		        			<td style='width:50%'  class='text-right'> $amount </td>
																		        		</tr>
																		        	</table>
																		        </td>
																		     </tr>
																		     <tr>
																		     	<td colspan=3>
																		     		(in Word) 
																		        	  <B> $amountinword Rupees only. </b>
																		     	</td>
																		     </tr>
																		     <tr>
                                           <td colspan=3>
                                              (Payment Mode) : 
                                                <B> $paymentMode </b>
                                           </td>
                                         </tr>
                                         <tr>
                                           <td colspan=3 style='text-align:right;'>
                                                <B> $forcompanyname </b>
                                                <p style='margin-top:100px;'>Authorised Signatory</p>
                                           </td>
                                          </tr>
																		  </tbody>
																	</table>
				                        </div>		                        
				                     </div>
				                  </div>
				               </div>			               
				            </div>
				         </div>			         
				      </div>			      
				   </body>
				</html>";
		} else {
			//echo "without gst invoice"; //exit();
			$name = $accountdata[0]['studentName'];
			$address = $accountdata[0]['studentAddress'];
			$state = $accountdata[0]['studentState'];

			$statename = $function->getStateList($id=$state,$isActive=1);
	   	$statename  = $statename[0]['state'];

			if ($state==9) {
				$cgstamt = number_format(round($gstamt/2));
				$sgstamt = number_format(round($gstamt/2));
				$igstamt = "";
			}else {
				$igstamt = number_format(round($gstamt));
				$cgstamt = "";
				$sgstamt = "";
			}
			
			$html ="
				<html lang='en'>
				   <head>
				      <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
				      <title itemprop='name'>Preview bootstrap html snippet. Invoice with ribbon</title>      
				      <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'>
				      <meta name='viewport' content='width=device-width'>
				      <script src='https://printjs-4de6.kxcdn.com/print.min.js'></script>
				      <style type='text/css'>
				         	body{margin-top:20px;
				            	background:#eee;
				            }
				            .invoice .top-left {
				            font-size:65px;
				            color:#3ba0ff;
				            }
				            .invoice .top-right {
				            text-align:right;
				            padding-right:20px;
				            }
				            .invoice .table-row {
				            margin-left:-15px;
				            margin-right:-15px;
				            margin-top:25px;
				            }
				            .invoice .payment-info {
				            font-weight:500;
				            }
				            .invoice .table-row .table>thead {
				            border-top:1px solid #ddd;
				            }
				            .invoice .table-row .table>thead>tr>th {
				            border-bottom:none;
				            }
				            .invoice .table>tbody>tr>td {
				            padding:8px 20px;
				            }
				            .invoice .invoice-total {
				            margin-right:-10px;
				            font-size:16px;
				            }
				            .invoice .last-row {
				            border-bottom:1px solid #ddd;
				            }
				            .invoice-ribbon {
				            width:85px;
				            height:88px;
				            overflow:hidden;
				            position:absolute;
				            top:-1px;
				            right:14px;
				            }
				            .ribbon-inner {
				            text-align:center;
				            -webkit-transform:rotate(45deg);
				            -moz-transform:rotate(45deg);
				            -ms-transform:rotate(45deg);
				            -o-transform:rotate(45deg);
				            position:relative;
				            padding:7px 0;
				            left:-5px;
				            top:11px;
				            width:120px;
				            background-color:#66c591;
				            font-size:15px;
				            color:#fff;
				            }
				            .ribbon-inner:before,.ribbon-inner:after {
				            content:'';
				            position:absolute;
				            }
				            .ribbon-inner:before {
				            left:0;
				            }
				            .ribbon-inner:after {
				            right:0;
				            }
				            @media(max-width:575px) {
				            .invoice .top-left,.invoice .top-right,.invoice .payment-details {
				            text-align:center;
				            }
				            .invoice .from,.invoice .to,.invoice .payment-details {
				            float:none;
				            width:100%;
				            text-align:center;
				            margin-bottom:25px;
				            }
				            .invoice p.lead,.invoice .from p.lead,.invoice .to p.lead,.invoice .payment-details p.lead {
				            font-size:22px;
				            }
				            .invoice .btn {
				            margin-top:10px;
				            }
				            }
				            @media print {
				            .invoice {
				            width:900px;
				            height:800px;
				            }
				            }
				         </style>
				   </head>
				   <body>
				      <div id='snippetContent'>
				         <link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
				         <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'></script>
				         <script src='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script> 
				         <link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' rel='stylesheet'>
				         <div class='container bootstrap snippets bootdeys' style='width: 210mm;'>
				            <div class='row'>
				               <div class='col-sm-12'>
				                  <div class='panel panel-default' style='border: 1px solid transparent; border-color: #ddd; padding:5%'>
				                     <div class='panel-body'>
				                        <div class='invoice-ribbon'>
				                           <div class='ribbon-inner' style='background-color: #66c591;'>PAID</div>
				                        </div>		                        
				                        <div class='row'>
			                    			<div class='col-xs-6 from'>
			                    				<img src='../images/truffle-nation-logo-1.png' width='100px;'>
				                              	<h3 style='font-size: 22px; font-style: italic; color: #000;'>Bake Better Network LLP.</h3>
				                           		<p style='font-size: 18px; color: #000;'>(Truffle Nation)</p>
				                           	</div>
				                           	<div class='col-xs-6 to' style='text-align: right;'>
				                           	  <img src='../images/bake-better-logo.png' width='100px;'>
				                              <p class='marginright'>
				                              	133-A, First Floor, Lane No. 1,<br>
				                              	Western Marg, Saidulajab,<br>
				                              	Back side Saket Metro Station,<br>
				                              	New Delhi - 110030 <br>
				                              	Tel.: 08700939817
				                              </p>
				                           	</div>
			                    		</div>
				                        <hr>
				                        <div class='row text-center'>
										   						<h3 class='text-uppercase text-center mt-3' style='font-size: 40px;'>Invoice</h3>
																</div>								
				                        <div class='row'>
			                    			<div class='col-xs-6 from table-bordered' style='min-height: 140px;'>
				                              <p class='lead marginbottom'> $name</p>
				                              <p> $address </p>
				                              <p> $statename </p>
				                           	</div>
				                           	<div class='col-xs-6 to table-bordered' style='min-height: 140px;'>
				                              <p class='lead marginbottom'>Invoice No : $invoice </p>
				                              <p><b>Date :</b> $date</p>			                              
				                           	</div>
			                    		</div>			                    	
				                        <div class='row table-row' style='margin-top: 30px;'>
				                           <table class='table table-bordered' style='min-height: 300px; margin-bottom: 0px;'>
																		  <thead>
																		     <tr>
																		        <th class='text-center' style='width:5%'> S.No. </th>
																		        <th style='width:50%'> Description</th>
																		        <th class='text-right' style='width:25%'> Amount </th>
																		     </tr>
																		  </thead>
																		  <tbody>
																		     <tr>
																		        <td class='text-center'></td>
																		        <td style='font-size:14px' rowspan='2'>
																		        	Towards Course <br>
																		        	$courseName2		<br>
																		        	Course Start Date :  $startDate <br>
																		        	Course End Date : $endDate<br>
																		        	Batch Timings : $batch
																		        </td>
																		        <td style='width:40%' class='text-right'> $total </td>
																		     </tr>
																		     <tr>
																		        <td class='text-center'></td>
																		        <td style='width:40%'>
																		        	<table style='width:100%' class='table table-bordered'>
																		        		<tr>
																		        			<td style='width:50%'> TOTAL</td>
																		        			<td style='width:50%'  class='text-right'> $total </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> CGST @ 9 % :</td>
																		        			<td style='width:50%'  class='text-right'> $cgstamt </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> SGST @ 9 % :</td>
																		        			<td style='width:50%'  class='text-right'> $sgstamt </td>
																		        		</tr>
																		        		<tr>
																		        			<td style='width:50%'> IGST @ 18%</td>
																		        			<td style='width:50%'  class='text-right'> $igstamt </td>
																		        		</tr>			                                    		
																		        		<tr>
																		        			<td style='width:50%' >GRAND TOTAL</td>
																		        			<td style='width:50%'  class='text-right'> $amount </td>
																		        		</tr>
																		        	</table>
																		        </td>
																		     </tr>
																		     <tr>
																		     	<td  colspan=3>
																		     		(in Word) 
																		        	  <B> $amountinword Rupees only. </b>
																		     	</td>
																		     </tr>
																		     <tr>
                                           <td  colspan=3>
                                              (Payment Mode) : 
                                                <B> $paymentMode </b>
                                           </td>
                                         </tr>
                                         <tr>
                                           <td  colspan=3 style='text-align:right;'>
                                                <B> $forcompanyname </b>
                                                <p style='margin-top:100px;'>Authorised Signatory</p>
                                           </td>
                                          </tr>
																		  </tbody>
																		</table>
				                        </div>		                        
				                     </div>
				                  </div>
				               </div>			               
				            </div>
				         </div>			         
				      </div>			      
				   </body>
				</html>";
		}
	}
?>
<!DOCTYPE html>
<html>
<head>
	<title></title>
	 <script src="https://printjs-4de6.kxcdn.com/print.min.js"></script>	 
</head>
<body>
	 <div id="printJS-form">
		<?php echo $html; ?>
	</div>
	<center style="padding: 20px;">
		<a href="my-account.php" class="btn btn-danger"> Back </a>
		<button type="button" onclick="printJS('printJS-form', 'html')" class="btn btn-success">
		   <i class='fa fa-print'></i> Print
		</button>				
	</center>	 
</body>
</html>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home