264 lines
7.7 KiB
PHP
Executable File
264 lines
7.7 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 = '';
|
|
$CostCenterCode='';
|
|
$PaymentTerms='';
|
|
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;
|
|
$CostCenterCode=$PO->CostCenterCode;
|
|
$PaymentTerms=$PO->PaymentTerms;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(!empty($Requestername))
|
|
|
|
{
|
|
foreach ($Requestername as $Reqname)
|
|
{
|
|
$ReqBy=$Reqname->FirstName;
|
|
//$ReqDep=$Reqname->
|
|
|
|
}
|
|
}
|
|
|
|
$CurrencyCode='';
|
|
$CurrencyName='';
|
|
|
|
if(!empty($Currencytype))
|
|
{
|
|
foreach ($Currencytype as $CURRE)
|
|
{
|
|
$CurrencyCode=$CURRE->Currency_Code;
|
|
$CurrencyName=$CURRE->FontCode2000;
|
|
}
|
|
|
|
}
|
|
$DEPNAME='';
|
|
|
|
if(!empty($DEPCODE))
|
|
{
|
|
foreach ($DEPCODE as $DEP)
|
|
{
|
|
$DEPNAME=$DEP->DepartmentName;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|
|
<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 per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Service Tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Educess Tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Sec Higher Educess Tax in <?php echo "$CurrencyCode ($CurrencyName)"?> </th>
|
|
<th>Krishi Kalyan tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Swachh Bharat taxin <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
|
<th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></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 :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
|
|
<td align="right"><?php echo number_format($SubTotalAmount,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Service Tax @14% :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
|
|
<td align="right"><?php echo number_format($ServiceTax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Edu. cess @2% on ServiceTax:<?php echo "$CurrencyCode ($CurrencyName)"?></td>
|
|
<td align="right"><?php echo number_format($EducessTax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">Sec & Higher cess @1% on ServiceTax:<?php echo "$CurrencyCode ($CurrencyName)"?></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:<?php echo "$CurrencyCode ($CurrencyName)"?></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 :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
|
|
<td align="right"><?php echo number_format($SwachhBharattax,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right"><b>Total Order Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></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/><?php echo $ReqNo;?></td>
|
|
<td>Requested by :<br/><?php echo $ReqBy;?></td>
|
|
<td>Requisted Department :<br/><?php echo $DEPNAME?></td>
|
|
<td>Cost center :<br/><?php echo $CostCenterCode?></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>
|
|
|