172 lines
4.9 KiB
PHP
Executable File
172 lines
4.9 KiB
PHP
Executable File
|
|
Currently editing:
|
|
/home/kasiram9/public_html/sidd_SIT/application/views/servicepopdf.php
|
|
Encoding: Reopen Switch to Code Editor Close Save
|
|
|
|
<?php
|
|
|
|
$PONO = '';
|
|
$CompanyAddress = '';
|
|
$CompanyName = '';
|
|
$SuplierName = '';
|
|
$SuplierAddress = '';
|
|
$DeliveryAddress = '';
|
|
$Podt = '';
|
|
$DeliveryDate ='';
|
|
$ServiceTax =0.00;
|
|
$EducessTax =0.00;
|
|
$SecHigherEducessTax =0.00;
|
|
$KrishiKalyantax =0.00;
|
|
$SwachhBharattax =0.00;
|
|
$TotalAmount =0.00;
|
|
$SubTotalAmount =0.00;
|
|
$TaxAmount =0.00;
|
|
$BasicAmount = 0.00;
|
|
$ServiceDescription = '';
|
|
if(!empty($CompanyDetails))
|
|
{
|
|
foreach ($CompanyDetails as $CO)
|
|
{
|
|
$CompanyName = $CO->CompanyName;
|
|
$CompanyAddress = $CO->Address;
|
|
|
|
}
|
|
}
|
|
if(!empty($POItem))
|
|
{
|
|
foreach ($POItem as $PO)
|
|
{
|
|
$PONO = $PO->PONO;
|
|
$SuplierName = $PO->SupplierName;
|
|
$SuplierAddress = $PO->Address;
|
|
$DeliveryAddress = $PO->DeliveryAddress;
|
|
|
|
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
|
$Podt = $dt->format('d-m-Y');
|
|
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
|
$DeliveryDate = $dtDe->format('d-m-Y');
|
|
$ServiceDescription =$PO->ServiceDescription;
|
|
|
|
}
|
|
}
|
|
|
|
?>
|
|
<div><center>
|
|
<h2>PURCHASE ORDER</h2>
|
|
</center>
|
|
</div>
|
|
<div align="right"> PO NO:<?php echo $PONO?> </div>
|
|
<div align="right"> <?php echo $Podt?> </div>
|
|
<p>
|
|
<b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></p>
|
|
<table><tr><td>
|
|
<p><a style="color:#3c8dbc">Vendor Address : </a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?></p></td><td>
|
|
<p><a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?><p></td>
|
|
</tr></table>
|
|
<p>
|
|
<div align="right"> Delivery Date :<?php echo $DeliveryDate?></div></p>
|
|
|
|
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="105%">
|
|
<tr style="background:#000;color:#fff;">
|
|
<th>#</th>
|
|
<th>Item Description</th>
|
|
<th>Qty</th>
|
|
<th>Rate</th>
|
|
<th>Amount</th>
|
|
<th>Service Tax</th>
|
|
<th>Educess Tax</th>
|
|
<th>Sec Higher Educess Tax</th>
|
|
<th>Krishi Kalyan tax</th>
|
|
<th>Swachh Bharat tax</th>
|
|
<th>Total Amount</th>
|
|
</tr>
|
|
|
|
<?php
|
|
if(!empty($POItem))
|
|
{
|
|
$index = 0;
|
|
$TotalAmount = 0;
|
|
$OrderValue = 0;
|
|
foreach($POItem as $record)
|
|
{
|
|
$index = $index + 1;
|
|
$TotalAmount = $record->BasicValue + $record->Taxamount
|
|
?>
|
|
<tr>
|
|
<td><?php echo $index ; ?></td>
|
|
<td><?php echo $record->MaterialName ; ?></td>
|
|
<td align="right"><?php echo $record->Quantity ; ?></td>
|
|
<td align="right"><?php echo $record->Rate ; ?></td>
|
|
<td align="right"><?php echo $record->BasicValue ; ?></td>
|
|
<td align="right"><?php echo $record->ServiceTax ; ?></td>
|
|
<td align="right"><?php echo $record->EducessTax ; ?></td>
|
|
<td align="right"><?php echo $record->SecHigherEducessTax ; ?></td>
|
|
<td align="right"><?php echo $record->KrishiKalyantax ; ?></td>
|
|
<td align="right"><?php echo $record->SwachhBharattax ; ?></td>
|
|
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
|
</tr>
|
|
|
|
<?php
|
|
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
|
$ServiceTax =$ServiceTax + $record->ServiceTax;
|
|
$EducessTax =$EducessTax + $record->EducessTax;
|
|
$SecHigherEducessTax = $SecHigherEducessTax + $record->SecHigherEducessTax;
|
|
$KrishiKalyantax =$KrishiKalyantax + $record->KrishiKalyantax;
|
|
$SwachhBharattax =$SwachhBharattax + $record->SwachhBharattax;
|
|
|
|
}
|
|
$OrderValue = $SubTotalAmount + $ServiceTax + $EducessTax+$SecHigherEducessTax+$KrishiKalyantax +$SwachhBharattax;
|
|
}
|
|
|
|
?>
|
|
</table>
|
|
<div align="right">
|
|
|
|
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="105%">
|
|
<tr>
|
|
<td align="right">Sub Total Amount :</td>
|
|
<td align="right"><?php echo number_format($SubTotalAmount,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Service Tax @14% :</td>
|
|
<td align="right"><?php echo number_format($ServiceTax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Edu. cess @2% on ServiceTax:</td>
|
|
<td align="right"><?php echo number_format($EducessTax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Sec & Higher cess @1% on ServiceTax:</td>
|
|
<td align="right"><?php echo number_format($SecHigherEducessTax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Krishi kalyan Tax @0.5% on Basic Amount:</td>
|
|
<td align="right"><?php echo number_format($KrishiKalyantax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Swachh Barath Tax @0.5% on Basic Amount :</td>
|
|
<td align="right"><?php echo number_format($SwachhBharattax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right"><p><b>Total Order Amount :</b></td>
|
|
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
|
|
<br/>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<p>
|
|
<div align="Left"> <b>Service Description:</b><br/><br/><?php echo $ServiceDescription;?></div></p>
|
|
|
|
|
|
</div>
|