222 lines
6.2 KiB
PHP
Executable File
222 lines
6.2 KiB
PHP
Executable File
|
|
|
|
<?php
|
|
|
|
$PONO = '';
|
|
$postatus ='';
|
|
$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;
|
|
$postatus= $PO->Status;
|
|
$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;
|
|
|
|
}
|
|
}
|
|
|
|
?>
|
|
<style>
|
|
@page { margin: 310px 50px 30px 50px; }
|
|
.header { position: fixed; left: 0px; top: -310px; right: 0px; height: 550px;text-align: center; }
|
|
.footer { position: fixed; bottom: 0px; }
|
|
.pagenum:before { content: counter(page); }
|
|
</style>
|
|
<div class="footer">Page: <span class="pagenum"></span></div>
|
|
<div class="header">
|
|
<div><center><h2>SERVICE PURCHASE ORDER</h2><a style="color:#515151">PO NO:<?php echo $PONO?> </a></center></div>
|
|
<div align="right">
|
|
<?php
|
|
if ($postatus == 'ST026')
|
|
{}
|
|
else
|
|
{
|
|
echo '<div>Drafted Version</div>';
|
|
}
|
|
|
|
?>
|
|
<?php echo $Podt?>
|
|
</div>
|
|
<p> <b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></p>
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
|
<tr>
|
|
<td>
|
|
<a style="color:#3c8dbc">Vendor Address :</a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?>
|
|
</td>
|
|
<td>
|
|
<a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?>
|
|
</td>
|
|
</td>
|
|
<td> <a style="color:#3c8dbc">Delivery Date :</a><br/><?php echo $DeliveryDate?>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="page">
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
|
<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="100%">
|
|
<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"><b>Total Order Amount :</b></td>
|
|
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
|
|
<br/>
|
|
</tr>
|
|
</table>
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
|
<tr>
|
|
<td>Requition Number :<br/>Req004</td>
|
|
<td>Requested by :<br/>Sanjeev</td>
|
|
<td>Requisted Department :<br/>Store</td>
|
|
<td>Cost center :<br/>Fe001</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<p>
|
|
<div align="Left"> <b>Service Description:</b><br/><br/><?php echo $ServiceDescription;?></div></p>
|
|
<?php
|
|
if(!empty($releasedetails)){
|
|
foreach($releasedetails as $detail){
|
|
|
|
?>
|
|
<table width="200%">
|
|
<tr>
|
|
<td><b>ReleasedBy:</b></td>
|
|
<td><b>ReleasedOn:</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo $detail->FirstName;?></td>
|
|
<td><?php echo $detail->ReleasedOn;?></td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
|