265 lines
8.3 KiB
PHP
Executable File
265 lines
8.3 KiB
PHP
Executable File
<?php
|
|
|
|
|
|
$PONO = '';
|
|
$CompanyAddress = '';
|
|
$CompanyName = '';
|
|
$SuplierName = '';
|
|
$SuplierAddress = '';
|
|
$DeliveryAddress = '';
|
|
$Podt = '';
|
|
$DeliveryDate ='';
|
|
$ServiceDescription = '';
|
|
$index=0;
|
|
|
|
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>IMPORT PURCHASE ORDER</h2>
|
|
<a style="color:#515151">PO NO:<?php echo $PONO?> </a></center>
|
|
|
|
</div>
|
|
<div align="right"> <?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>
|
|
<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></td>
|
|
<td><div align="right"> Delivery Date :<?php echo $DeliveryDate?></div></p>
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
|
<tr style="background:#000;color:#fff;">
|
|
<th>#</th>
|
|
<th>Item and Description</th>
|
|
<th>Qty</th>
|
|
<th>Rate per unit</th>
|
|
<th>Basic Price</th>
|
|
<th>Landing Charge</th>
|
|
<th>High Seas Sales charge</th>
|
|
<th>Custom duty (A) </th>
|
|
<th>Excise duty (b)</th>
|
|
<th>Excise duty ED_cess (C)</th>
|
|
<th>Excise duty S & H cess (d) </th>
|
|
<th>Custom ED_cess (e)</th>
|
|
<th>Custom S & H cess (f)</th>
|
|
<th>Additional Excise duty (g)</th>
|
|
<th>Gross duty payable</th>
|
|
<th>Available Modvat-set-off on import(b + c + d + g)</th>
|
|
<th>Gross expenses due to custom duty</th>
|
|
<th>purchase rate </th>
|
|
<th>Quantity</th>
|
|
<th>Custom Duty Expenses</th>
|
|
<th>RMC Including Customers</th>
|
|
<th>Total Amount</th>
|
|
</tr>
|
|
|
|
<?php
|
|
if(!empty($POItem))
|
|
{
|
|
$BasicValue=0;
|
|
$ProductPrice = 0;
|
|
$AfterLandingCharge= 0;
|
|
$AfterHighSeasSalesCharge= 0;
|
|
$AfterCustomDuty = 0;
|
|
$AfterCustomEdCess = 0;
|
|
$AfterCustomSHCess = 0;
|
|
$AfterExciseDuty = 0;
|
|
$AfterExciseDutyEdCess = 0;
|
|
$ExciseDutySHCess = 0;
|
|
$AfterAddlExciseDuty = 0;
|
|
$Grossdutypayable = 0;
|
|
$AvailableModvat = 0;
|
|
$Grossexpensesduetocustomduty = 0;
|
|
$purchaseratePerKG=0;
|
|
$CustomDutyExpensesPerKG=0;
|
|
$RMCIncludingCustomersPerKG=0;
|
|
$AfterExciseDutySHCess=0;
|
|
$TotalOrderValue=0;
|
|
$index=0;
|
|
|
|
|
|
|
|
foreach($POItem as $record)
|
|
{
|
|
$index = $index + 1;
|
|
|
|
?>
|
|
|
|
|
|
<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 $BasicValue=($record->Quantity*$record->Rate);
|
|
echo number_format($BasicValue,2) ; ?></td>
|
|
<td align="right"><?php echo $record->AfterLandingCharge; ?></td>
|
|
<td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td>
|
|
<td align="right"><?php echo $record->AfterCustomDuty ; ?></td>
|
|
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
|
|
<td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td>
|
|
<td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td>
|
|
<td align="right"><?php echo $record->AfterCustomEdCess ; ?></td>
|
|
<td align="right"><?php echo $record->AfterCustomSHCess ; ?></td>
|
|
<td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td>
|
|
<td align="right"><?php echo $record->Grossdutypayable ; ?></td>
|
|
<td align="right"><?php echo $record->AvailableModvat ; ?></td>
|
|
<td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td>
|
|
<td align="right"><?php echo $record->purchaseratePerKG ; ?></td>
|
|
<td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td>
|
|
<td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td>
|
|
<td align="right"><?php echo $record->QuantityKG ; ?></td>
|
|
<td align="right"><?php echo $record->TotalOrderValue; ?></td>
|
|
</tr>
|
|
|
|
|
|
<?php
|
|
|
|
$AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge;
|
|
$AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ;
|
|
$AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ;
|
|
$AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ;
|
|
$AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ;
|
|
$AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ;
|
|
$AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ;
|
|
$AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ;
|
|
$Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ;
|
|
$AvailableModvat = $AvailableModvat+$record->AvailableModvat ;
|
|
$Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ;
|
|
$purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ;
|
|
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
|
|
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
|
|
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
|
|
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
|
|
}
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
<div align="right">
|
|
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
|
<tr>
|
|
<td align="right">Landing charge :</td>
|
|
<td align="right"><?php echo number_format($AfterLandingCharge,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">High seas sales charge:</td>
|
|
<td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td>
|
|
<br/>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Custom duty : </td>
|
|
<td align="right"><?php echo number_format($AfterCustomDuty,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Excise duty :</td>
|
|
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Excise duty ED_cess : </td>
|
|
<td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Excise duty S & H cess :</td>
|
|
<td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Custom ED_cess : </td>
|
|
<td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Custom S & H cess :</td>
|
|
<td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Additional Excise duty :</td>
|
|
<td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Gross duty payable :</td>
|
|
<td align="right"><?php echo number_format($Grossdutypayable,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Available Modvat set-off on import :</td>
|
|
<td align="right"><?php echo number_format($AvailableModvat,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Gross expenses due to custom duty :</td>
|
|
<td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Purchase Rate :</td>
|
|
<td align="right"><?php echo number_format($purchaseratePerKG,2);?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">Custom Duty Expenses :</td>
|
|
<td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td align="right">RMC Including Customers :</td>
|
|
<td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td align="right"><p><b>Total Order Amount :</b></p></td>
|
|
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
|
|
</tr>
|
|
|
|
</table>
|
|
<br>
|
|
<br>
|
|
|
|
</div>
|