mrir revenue pdf
This commit is contained in:
parent
cb4ec4b86b
commit
45228ee1bb
@ -677,7 +677,7 @@ function purchaseorderListing($forwhat='')
|
||||
function GetRevenuePurchaseOrderDetailsForPDF($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Date(ReqMast.ReqDate) as ReqDate,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,(Quantity *Rate) as BasicValue ,
|
||||
(AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance - AfterDiscount) as Taxamount,AdvanceAmount,
|
||||
@ -690,6 +690,7 @@ function purchaseorderListing($forwhat='')
|
||||
|
||||
join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms
|
||||
left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO
|
||||
join T_Requestion_Master ReqMast on LineItem.ReqNo=ReqMast.ReqNo
|
||||
where LineItem.PONO =?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($PONO));
|
||||
|
||||
306
application/views/mrirrevenuepopdf.php
Executable file → Normal file
306
application/views/mrirrevenuepopdf.php
Executable file → Normal file
@ -15,8 +15,9 @@
|
||||
$PaymentDays='';
|
||||
$PayableAT='';
|
||||
$DeliverySchedule='';
|
||||
$ReqDate='';
|
||||
$AdvanceAmount=0.00;
|
||||
$color='';
|
||||
|
||||
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
@ -32,14 +33,14 @@
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$postatus= $PO->Status;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$postatus= $PO->Status;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
if($PO->DeliveryOption=='1'){
|
||||
$DeliveryDate = '';
|
||||
$DeliverySchedule = $PO->DeliverySchedule;
|
||||
@ -58,18 +59,6 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($AdvanceAmount>0)
|
||||
{
|
||||
$color="green";
|
||||
}
|
||||
else
|
||||
{
|
||||
$color="black";
|
||||
}
|
||||
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
@ -108,7 +97,7 @@
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a>PO NO:<?php echo $PONO?> </a></span></center>
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/R </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
@ -132,21 +121,24 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
<td>PO DATE : <?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY : <?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page" style="font-size:12px;">
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Requistion Number</td>
|
||||
<td>Requested By</td>
|
||||
<td>Requested Department</td>
|
||||
<td>Cost Center </td>
|
||||
<tr bgcolor="#8c8c8c" color="#fff">
|
||||
<td style="text-align: center;">Requistion Number</td>
|
||||
<td style="text-align: center;">Requistion Date</td>
|
||||
<td style="text-align: center;">Requested By</td>
|
||||
<td style="text-align: center;">Requested Department</td>
|
||||
<td style="text-align: center;">Cost Center </td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
@ -157,10 +149,11 @@
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td style="text-align: center;"><?php echo $ReqDetails['ReqDate'];?></td><!--Requistion Date code should come from DB-->
|
||||
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -170,16 +163,69 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<table style="border-collapse: collapse;" border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Item Name</td>
|
||||
<td>UOM</td>
|
||||
<td>Qty</td>
|
||||
<td>Rate In INR</td>
|
||||
<td>Basic Value In INR</td>
|
||||
<tr bgcolor="#8c8c8c" color="#fff">
|
||||
<td style="text-align: center;">#</td>
|
||||
<td style="text-align: center;">Item Code</td>
|
||||
<td style="text-align: center;">Item Name</td>
|
||||
<td style="text-align: center;">HSN Code</td>
|
||||
<td style="text-align: center;">UOM</td>
|
||||
<td style="text-align: center;">Qty</td>
|
||||
<td style="text-align: center;">Rate In INR</td>
|
||||
<td style="text-align: center;">Basic Value In INR</td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount = 0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$TotalAmount = $record->BasicValue+$record->Taxamount;
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td style="text-align: center;"><?php echo $index ; ?></td>
|
||||
<td style="text-align: center;">001</td>
|
||||
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
|
||||
<td style="text-align: center;">000666</td><!--HSN code should come from DB-->
|
||||
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo number_format($record->BasicValue, 2, '.', '') ;?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$TotalTax = $TotalTax+$record->Taxamount;
|
||||
$OrderValue = $SubTotalAmount + $TotalTax;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!--<table style="border-collapse: collapse;" border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr bgcolor="#8c8c8c" color="#fff">
|
||||
<td>#</td>
|
||||
|
||||
<td>Discount In INR</td>
|
||||
<td>SGST In INR</td>
|
||||
<td>CGST In INR</td>
|
||||
@ -205,12 +251,7 @@
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></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->AfterDiscount;?></td>
|
||||
<td align="right"><?php echo $record->AfterSGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCGST ; ?></td>
|
||||
@ -220,7 +261,7 @@
|
||||
<td align="right"><?php echo $record->AfterPackagingValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue;?></td>
|
||||
<td align="right"><?php echo $record->Insurance;?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount, 2, '.', '') ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@ -237,16 +278,83 @@
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>-->
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: center;" rowspan="2"><strong>HSN Code</strong><br /><br /></td>
|
||||
<td style="text-align: center;" colspan="2"><strong>Discount In INR</strong><br /><br /></td>
|
||||
<td style="text-align: center;" colspan="2"><strong>SGST</strong> <br /><br /></td>
|
||||
<td style="text-align: center;" colspan="2"><strong>CGST </strong> <br /><br /></td>
|
||||
<td style="text-align: center;" colspan="2"><strong>IGST</strong><br /><br /></td>
|
||||
<td style="text-align: center;" colspan="2"><strong>Packaging In INR</strong> </td>
|
||||
<td style="text-align: center;" rowspan="2"><strong>Insurance In INR</strong> </td>
|
||||
<td style="text-align: center;" colspan="2"> <strong>Freight In INR </strong></td>
|
||||
<td style="text-align: center;" rowspan="2"><strong> Total Amount In INR</strong> </td>
|
||||
</tr>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
<td style="text-align: center;"><strong>IN%</strong></td>
|
||||
<td style="text-align: center;"><strong>Amt</strong></td>
|
||||
</tr>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td style="text-align: right;">000666</td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">5%</td>
|
||||
<td style="text-align: right;">25</td>
|
||||
<td style="text-align: right;">150</td>
|
||||
</tr>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td style="text-align: right;">000666</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">20</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">30</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">50</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">60</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">500</td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;"> </td>
|
||||
<td style="text-align: right;">5000</td>
|
||||
<td style="text-align: right;">10000</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p><strong>Payment Terms:</strong> <?php echo $PaymentTerms;?></p>
|
||||
|
||||
|
||||
|
||||
<p><strong>Special Instructions:</strong></p>
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
@ -255,51 +363,79 @@
|
||||
|
||||
<td style="text-align: center;" rowspan="5">
|
||||
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
<p><strong>Total Amount In Words </strong><br /><br /><br /></p>
|
||||
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;" colspan="3"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR </strong></td>
|
||||
<td style="text-align: right;"><strong><?php echo number_format($SubTotalAmount, 2, '.', '');?> </strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;" colspan="3"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR </strong></td>
|
||||
<td style="text-align: right;"><strong><?php echo number_format($TotalTax, 2, '.', '');?> </strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;" colspan="3"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR </strong></td>
|
||||
<td style="text-align: right;"><strong><?php echo number_format($OrderValue, 2, '.', '');?> </strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right;" colspan="3"><strong>Advance Amout In INR -<?php echo number_format($AdvanceAmount,2)?></strong></td>
|
||||
|
||||
<td style="text-align: right;"><strong>Advance Paid </strong></td>
|
||||
<td style="text-align: right;"><strong><?php echo number_format($AdvanceAmount, 2, '.', '');?> </strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right;" colspan="3"><strong>Total Amount To Pay In INR-<?php echo number_format(($OrderValue-$AdvanceAmount),2)?></strong> </td>
|
||||
|
||||
<td style="text-align: right;"><strong>Balance amount needs to pay </strong></td>
|
||||
<td style="text-align: right;"><strong><?php echo number_format(($OrderValue-$AdvanceAmount), 2, '.', '');?> </strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
<?php
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
<div align="Left"> <b> Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b> Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td colspan="3">
|
||||
<td style="text-align: center;" colspan="2">
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
@ -312,42 +448,8 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Special Instruction:</strong></p>
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
<?php
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user