Current File : /home/inlingua/public_html/noida/icentex_noida/pg/rcpt_pdf.php |
<?php
error_reporting(0);
session_start();
// Include the database connection details
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Include the table handler class
require('../dbHandler.class.php');
//require_once('amount.php');
include_once("wordsClass.php");
// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
?>
<?php
require_once('../tcpdf/config/lang/eng.php');
require_once('../tcpdf/tcpdf.php');
$query="select a.*,b.ref_No,user.name,pay.payment_mode,pay.cheque_no,pay.favour_of from ingl_invoice_main a left join ingl_admission b on a.student_id=b.ref_No inner join timesheet_user user on a.createdBy=user.recNo inner join ingl_invoice_payment pay on a.invoice_no=pay.rcpt_id where a.recNo='".$_REQUEST['recNo']."'";
$result=mysql_query($query);
$num=mysql_fetch_array($result);
$queryA="select * from timesheet_location where recNo='".$num['centre']."'";
$resultA=mysql_query($queryA);
$numA=mysql_fetch_array($resultA);
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {
//Page header
/* public function Header() {
// Logo
$image_file = K_PATH_IMAGES.'logo_example.jpg';
$this->Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
// Set font
$this->SetFont('helvetica', 'B', 20);
// Title
$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');
}
*/
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-10);
// Set font
$this->SetFont('helvetica', 'I', 10);
// Page number
//$this->Line(0,12,80,12);
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('pispltd');
$pdf->SetTitle('pispltd');
$pdf->SetSubject('pispltd');
$pdf->SetKeywords('pispltd soft');
// remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(true);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins('10', '10', '10');
//set auto page breaks
//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->SetAutoPageBreak(TRUE, -5);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$email=", ".$numA['email']."";
$pdf->SetFont('Helvetica', '', 9);
$qureyreg="SELECT TA.recNo, TA.Product1, TA.Product2, main2.bill_details AS Product3 FROM (
SELECT T.recNo, T.Product1, main1.bill_details AS Product2, T.reg_product3 FROM (
SELECT reg.recNo, main.bill_details AS Product1, reg.reg_product2, reg.reg_product3
FROM ingl_invoice_reg reg INNER JOIN ingl_billing_main main ON reg.reg_product1 = main.recNo )T
INNER JOIN ingl_billing_main main1 ON T.reg_product2 = main1.recNo )TA
INNER JOIN ingl_billing_main main2 ON TA.reg_product3 = main2.recNo where TA.recNo='".$_REQUEST['recNo']."' ";
//echo $qureyreg;
//exit;
$resultreg=mysql_query($qureyreg);
$rowreg=mysql_fetch_array($resultreg);
$content="";
$content.='
<table border="0" width="100%" >
<tr><td><b> DUPLICATE FOR SUPPLIER </b></td></tr>
<tr><td width="100%" align="center" style="font-size:60px;"><u><b>Receipt cum Invoice</b></u></td></tr>
</table>';
//$content.='<table width="100%" border="0"><tr><td height="20"> </td></tr></table>';
$content.='<table border="0" style="padding:3px;boder:0px thin #000000;" width="100%"><tr valign="top">
<td width="15%">Invoice No.</td>
<td width="35%"><b>'.$num['invoice_no'].'</b></td><td width="50%" rowspan="4" align="center"><img src="../images/logo_certificate.JPG"><br>
<table width="100%" border="0" style="padding:1px;">
<tr>
<td align="center"><b>CIN:</b> U72900UP2001PLC026110</td>
</tr>
<tr>
<td align="center"><b>GSTIN:</b> '.nl2br($numA['GSTIN']).'</td>
</tr>
<tr>
<td align="center"><b>Branch Office :</b>'.nl2br($numA['address']).'</td>
</tr>
<tr>
<td align="center"><b>Contact:</b>'.$numA['contact'].'</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td>Date</td><td><b>'.date("d-M-Y H:i:s",strtotime($num['createDate'])).'</b></td></tr>
<tr valign="top"><td>To </td><td><b>'.$num['student_name'].'</b>';
if($num['status_delete']==1)
{
$content.= '<td align="center"><h1 style="color:#CCC;">Canceled Receipt</h1></td> ';
}
if($num['status_delete']==2)
{
$content.= '<td align="center"><h1 style="color:#CCC;">Refund Receipt</h1></td> ';
}
$content.='</td>
</tr>
<tr valign="top" height="0"><td> </td><td rowspan="1" style="height:30px;"><b>'.nl2br($num['student_address']).'</b><br/><br/> '
. 'ID No. '.$num['ref_No'].'</td>
</tr>';
$content.='<tr><td colspan="4">';
$content.='<table width="100%" border="1" style="padding:1px;">
<tr><td width="10%" style="background-color:#ffffff;"><b>S.No.</b></td>
<td width="20%" style="background-color:#ffffff;"><b>DESCRIPTION</b></td>
<td width="10%" style="background-color:#ffffff;"><b>SAC Code</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Qty.</b></td>
<!--<td width="10%" style="background-color:#ffffff;" align="right"><b>Rate</b></td>-->
<td width="10%" style="background-color:#ffffff;" align="right"><b>Amount</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>CGST(9%)</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>SGST(9%)</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Total Tax</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Total Amt</b></td></tr>';
$queryI="select * from ingl_invoice_detail where main_id='".$_REQUEST['recNo']."'";
$resultI=mysql_query($queryI);
$countI=mysql_num_rows($resultI);
$i=1;
$height=100;
$tot_qty=0;
$totalAmt=0;
$sub_roll=array();
while($numI=mysql_fetch_array($resultI))
{
$baseamt=round((($numI['amount']/1.18)),2);
$gst=round(((($baseamt*18)/100)/2),2);
$totaltaxamt=round(((($baseamt*18)/100)),2);
//$remarks="<br>".$numI['remarks']."";
$subprodcat_array=array();
$subprodcat= new dbHandler();
$subprodcat->connect();
$query_subprodcat="select recNo,bill_details from ingl_billing_main where recNo='".$numI['product_id']."'";
$result_subprodcat=$subprodcat->select($query_subprodcat);
$data_subprodcat=$subprodcat->SelectNext($result_subprodcat);
$height1=30;
$content.='<tr><td style="padding:3px;border-right:1px thick #000000;height:'.$height1.'px;"><b>'.$i.'</b></td>
<td style="padding:3px;border-left:1px thin #000000;"><b>'.nl2br($data_subprodcat['bill_details']).'</b>';
if($numI['remarks']!="")
{
$content.='<br>'.nl2br($numI['remarks']).'';
}
if($i==1)
{
if($numI['course_id']!="")
{
$content.='<br>'.nl2br($numI['course_id']).'';
}
if($rowreg['Product1']!="")
{
$content.='<br> For '.$rowreg['Product1'].' ,'.$rowreg['Product2'].','.$rowreg['Product3'].'';
}
}
$content.='</td>';
$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>00440229</b></td>';
$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.nl2br($numI['quantity']).'</b></td>';
//$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$numI['rates'].'</b></td>';
$content.='<td style="padding:3px;border-left:1px thin #000000;height:'.$height1.'px;" align="right"><b>'.$baseamt.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$gst.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$gst.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$totaltaxamt.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.number_format($numI['amount'],2,'.',',').'</b></td>'
. '</tr>';
$i++;
$totalAmt=$totalAmt+$numI['amount'];
$tot_qty=$tot_qty+$numI['qty'];
$ht=$ht+$height1;
}
$height2=$height-$ht;
/*$content.='<tr><td style="border-right:1px thick #000000;border-bottom:1px thick #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td></tr>';*/
/*$content.='<tr><td colspan="4" align="right" style="padding:3px;border-right:1px thick #000000;border-top:1px thick #000000;border-bottom:1px thick #000000;"><b>Sub-Total</b></td>
<td style="padding:3px;border-left:1px thin #000000;border-top:1px thin #000000;border-bottom:1px thin #000000;" align="right"><b>'.number_format($num['amount'],2,'.',',').'</b></td></tr>';
$content.='<tr><td colspan="4" align="right" style="padding:3px;border-right:1px thick #000000;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Tax</b></td>
<td style="padding:3px;border-left:1px thin #000000;border-top:1px thin #000000;border-bottom:1px thin #000000;" align="right">
<b>'.number_format($num['tax_value'],2,'.',',').'</b></td></tr>';
$content.='<tr><td colspan="4" align="right" style="padding:3px;border-right:1px thick #000000;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Discount '.$num['discount_per'].' %</b></td>
<td style="padding:3px;border-left:1px thin #000000;border-top:1px thin #000000;border-bottom:1px thin #000000;" align="right">
<b>'.number_format($num['discount_value'],2,'.',',').'</b></td></tr>';*/
$content.='<tr><td colspan="8" align="right" style="padding:3px;border-right:1px thick #000000;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Total</b></td>
<td style="padding:3px;border-left:1px thin #000000;border-top:1px thin #000000;border-bottom:1px thin #000000;" align="right">
<b>'.number_format($totalAmt,2,'.',',').'</b></td></tr>';
$obj = new intToWord();
$valinput = $totalAmt;
$text = $obj->getAmountInWords($valinput);
$content.='<tr><td colspan="4" align="left" style="padding:3px;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Total Amount in Words:</b> '.$text.'</td>
</tr>';
$content.='</table>';
$content.='</td></tr>';
$content.='</table><br>';
$content.='<table width="100%">
<tr><td colspan="4" align="left" style="padding:3px;">
<b>Cash/Cheque No. ___________'.$num['cheque_no'].'_______________________________________ Date: ______________________</b></td>
</tr>
<tr><td colspan="4" align="left" style="padding:3px;"> </td></tr>
<tr><td colspan="4" align="left" style="margin-top:10px;">
<b>Drawn on: _________'.$num['favour_of'].'____________________________________________________________________</b></td>
</tr></table>';
$queryTerms="select * from ingl_terms_conditions";
$resultTerms=mysql_query($queryTerms);
$k=1;
while($numTerms=mysql_fetch_array($resultTerms))
{
$terms_conditions.="".$k.". ".nl2br($numTerms['terms_conditions'])."<br>";
$k++;
}
$content.='<table border="0" width="100%"><tr><td valign="center" height="10" align="center"> </td></tr></table>';
$content.='<table border="0" width="100%" style="padding:1px;"><tr><td valign="center" colspan="2"><b>Terms and conditions :</b></td></tr>
<tr><td width="70%" style="text-align:justify;">'.$terms_conditions.'</td>
<td width="30%">
<table border="0" width="100%">
<tr>
<td width="100%" valign="center">
<table width="100%" border="1">
<tr>
<td height="50" align="center"><b>'.$num['name'].'</b><br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center"><b>(for inlingua New Delhi.)</b></td>
</tr>
</table>
</td>
</tr>
</table>';
$content.='<table border="0" width="100%" style="padding:1px;">
<!--<tr>
<td width="70%" style="text-align:justify;"> </td>
<td width="30%">
<table border="0" width="100%">
<tr>
<td width="100%" valign="center">
<table width="100%" border="1">
<tr>
<td height="50" align="center"><b>'.$num['name'].'</b><br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center"><b>(for inlingua New Delhi.)</b></td>
</tr>
</table>
</td>
</tr>-->
<tr><td align="center" colspan="2">Regd Office :A- 95, Sector - 65, Noida - 201305 (U.P.) </td></tr>
</table>';
/*
$content.='<table><tr><td height="20"></td></tr></table>
<table border="0" width="100%">
<tr><td width="100%" align="center" style="font-size:30px;"><u><b>Regd Office :</b>A- 95, Sector - 65, Noida - 201305 (U.P.)</u></td></tr>
</table>';
*/
// add a page
//secomd Copy
$content.='
<table border="0" style="padding:3px;"><tr><td>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</td></tr></table>
<table border="0" width="100%">
<tr ><td><b> ORIGINAL FOR RECIPIENT </b></td></tr>
<tr><td width="100%" align="center" style="font-size:60px;"><u><b>Receipt cum Invoice</b></u></td></tr>
</table>';
//$content.='<table width="100%" border="0"><tr><td height="20"> </td></tr></table>';
$content.='<table border="0" style="padding:3px;boder:0px thin #000000;" width="100%"><tr valign="top">
<td width="15%">Invoice No.</td>
<td width="35%"><b>'.$num['invoice_no'].'</b></td><td width="50%" rowspan="4" align="center"><img src="../images/logo_certificate.JPG"><br>
<table width="100%" border="0" style="padding:1px;">
<tr>
<td align="center"><b>CIN:</b> U72900UP2001PLC026110</td>
</tr>
<tr>
<td align="center"><b>GSTIN:</b> '.nl2br($numA['GSTIN']).'</td>
</tr>
<tr>
<td align="center"><b>Branch Office :</b>'.nl2br($numA['address']).'</td>
</tr>
<tr>
<td align="center"><b>Contact:</b>'.$numA['contact'].'</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td>Date</td><td><b>'.date("d-M-Y H:i:s",strtotime($num['createDate'])).'</b></td></tr>
<tr valign="top"><td>To </td><td><b>'.$num['student_name'].'</b>';
if($num['status_delete']==1)
{
$content.= '<td align="center"><h1 style="color:#CCC;">Canceled Receipt</h1></td> ';
}
if($num['status_delete']==2)
{
$content.= '<td align="center"><h1 style="color:#CCC;">Refund Receipt</h1></td> ';
}
$content.='</td>
</tr>
<tr valign="top" height="0"><td> </td><td rowspan="1" style="height:30px;"><b>'.nl2br($num['student_address']).'</b><br/> <br/>'
. 'ID No. '.$num['ref_No'].'</td>
</tr>';
$content.='<tr><td colspan="4">';
$content.='<table width="100%" border="1" style="padding:1px;">
<tr><td width="10%" style="background-color:#ffffff;"><b>S.No.</b></td>
<td width="20%" style="background-color:#ffffff;"><b>DESCRIPTION</b></td>
<td width="10%" style="background-color:#ffffff;"><b>SAC Code</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Qty.</b></td>
<!--<td width="10%" style="background-color:#ffffff;" align="right"><b>Rate</b></td>-->
<td width="10%" style="background-color:#ffffff;" align="right"><b>Amount</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>CGST(9%)</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>SGST(9%)</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Total Tax</b></td>
<td width="10%" style="background-color:#ffffff;" align="right"><b>Total Amt</b></td></tr>';
$queryI="select * from ingl_invoice_detail where main_id='".$_REQUEST['recNo']."'";
$resultI=mysql_query($queryI);
$countI=mysql_num_rows($resultI);
$i=1;
$height=130;
$tot_qty=0;
$sub_roll=array();
while($numI=mysql_fetch_array($resultI))
{
$baseamt=round((($numI['amount']/1.18)),2);
$gst=round(((($baseamt*18)/100)/2),2);
$totaltaxamt=round(((($baseamt*18)/100)),2);
//$remarks="<br>".$numI['remarks']."";
$subprodcat_array=array();
$subprodcat= new dbHandler();
$subprodcat->connect();
$query_subprodcat="select recNo,bill_details from ingl_billing_main where recNo='".$numI['product_id']."'";
$result_subprodcat=$subprodcat->select($query_subprodcat);
$data_subprodcat=$subprodcat->SelectNext($result_subprodcat);
$height1=30;
$content.='<tr><td style="padding:3px;border-right:1px thick #000000;height:'.$height1.'px;"><b>'.$i.'</b></td>
<td style="padding:3px;border-left:1px thin #000000;"><b>'.nl2br($data_subprodcat['bill_details']).'</b>';
if($numI['remarks']!="")
{
$content.='<br>'.nl2br($numI['remarks']).'';
}
if($i==1)
{
if($numI['course_id']!="")
{
$content.='<br>'.nl2br($numI['course_id']).'';
}
}
$content.='</td>';
$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>00440229</b></td>';
$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.nl2br($numI['quantity']).'</b></td>';
/*$content.='<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$numI['rates'].'</b></td>'; */
$content.='<td style="padding:3px;border-left:1px thin #000000;height:'.$height1.'px;" align="right"><b>'.$baseamt.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$gst.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$gst.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.$totaltaxamt.'</b></td>'
. '<td style="padding:3px;border-left:1px thin #000000;" align="right"><b>'.number_format($numI['amount'],2,'.',',').'</b></td>'
. '</tr>';
$i++;
$tot_qty=$tot_qty+$numI['qty'];
$ht=$ht+$height1;
}
$height2=$height-$ht;
/*$content.='<tr>
<td style="border-right:1px thick #000000;border-bottom:1px thick #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
<td style="border-left:1px thin #000000;height:'.$height2.'px;"> </td>
</tr>';*/
$content.='<tr><td colspan="8" align="right" style="padding:3px;border-right:1px thick #000000;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Total</b></td>
<td style="padding:3px;border-left:1px thin #000000;border-top:1px thin #000000;border-bottom:1px thin #000000;" align="right">
<b>'.number_format($totalAmt,2,'.',',').'</b></td></tr>';
$obj = new intToWord();
$valinput = $totalAmt;
$text = $obj->getAmountInWords($valinput);
$content.='<tr><td colspan="4" align="left" style="padding:3px;border-top:1px thick #000000;border-bottom:1px thick #000000;">
<b>Total Amount in Words:</b> '.$text.'</td>
</tr>';
$content.='</table>';
$content.='</td></tr>';
$content.='</table><br>';
$content.='<table width="100%">
<tr><td colspan="4" align="left" style="padding:3px;">
<b>Cash/Cheque No. __________'.$num['cheque_no'].'__________________________________ Date: ______________________</b></td>
</tr>
<tr><td colspan="4" align="left" style="padding:3px;"> </td></tr>
<tr><td colspan="4" align="left" style="margin-top:10px;">
<b>Drawn on: ________________'.$num['favour_of'].'____________________________________________________________</b></td>
</tr></table>';
/*$queryTerms="select * from ingl_terms_conditions";
$resultTerms=mysql_query($queryTerms);
$k=1;
while($numTerms=mysql_fetch_array($resultTerms))
{
$terms_conditions.="".$k.". ".nl2br($numTerms['terms_conditions'])."<br>";
$k++;
}
*/
$content.='<table border="0" width="100%"><tr><td valign="center" height="10" align="center"> </td></tr></table>';
$content.='<table border="0" width="100%" style="padding:1px;"><tr><td valign="center" colspan="2"><b>Terms and conditions :</b></td></tr>
<tr><td width="70%" style="text-align:justify;">'.$terms_conditions.'</td>
<td width="30%">
<table border="0" width="100%">
<tr>
<td width="100%" valign="center">
<table width="100%" border="1">
<tr>
<td height="50" align="center"><b>'.$num['name'].'</b><br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center"><b>(for inlingua New Delhi.)</b></td>
</tr>
</table>
</td>
</tr>
</table>';
$content.='<table border="0" width="100%" style="padding:1px;">
<!--<tr>
<td width="70%" style="text-align:justify;"> </td>
<td width="30%">
<table border="0" width="100%">
<tr>
<td width="100%" valign="center">
<table width="100%" border="1">
<tr>
<td height="50" align="center"><b>'.$num['name'].'</b><br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center"><b>(for inlingua New Delhi.)</b></td>
</tr>
</table>
</td>
</tr>-->
<tr><td align="center" colspan="2">Regd Office :A- 95, Sector - 65, Noida - 201305 (U.P.) </td></tr>
</table>';
//echo $content;exit;
//echo $content;exit;
$pdf->AddPage();
// set some text to print
$html = <<<EOD
$content
EOD;
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
/*$pdf->AddPage();
$content1="";
$content1.="<table width='100%'><tr><td width='100%' align='center'>Details Of Rolls</td></tr></table>";
$content1.="<table width='100%'>";
$content1.="<tr><td>Roll Id</td><td>Product</td><td>Quantity</td></tr>";
foreach($sub_roll as $key=>$val)
{
$queryRollDetails="select * from jumbo_roll_sub where recNo='".$val."'";
$resultRollDetails=mysql_query($queryRollDetails);
$numRollDetails=mysql_fetch_array($resultRollDetails);
$content1.="<tr><td>".$numRollDetails['jrNo']."</td><td> </td><td>".$numRollDetails['quantity']."</td></tr>";
}
$content1.="</table>";
//$pdf->SetMargins('10', '10', '10');
// set some text to print
$html = <<<EOD
$content1
EOD;
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
*/
$pdf->Output('pispltd_'.$num['po_id'].'.pdf', 'I');
?>