done capital po pdf changes

This commit is contained in:
gandhimathi 2017-09-14 19:59:17 +05:30
parent 7b31c5c271
commit 9c7e56fcaf
4 changed files with 346 additions and 233 deletions

View File

@ -2535,7 +2535,7 @@ function addNewImportPurchaseOrder()
/* capital po print/pdf*/ /* capital po print/pdf*/
public function CapitalPoPrint($PONO) public function CapitalPoPrint($PONO)
{ {
@ -2547,8 +2547,10 @@ function addNewImportPurchaseOrder()
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
$CurrencyType=''; $CurrencyType='';
$CapitalRange=1;
if(!empty($data['POItem'])){ if(!empty($data['POItem'])){
$CurrencyType=$data['POItem'][0]->CurrencyType; $CurrencyType=$data['POItem'][0]->CurrencyType;
$CapitalRange=$data['POItem'][0]->CapitalRange;
} }
@ -2571,7 +2573,7 @@ function addNewImportPurchaseOrder()
$TotaltoPay=$TotalOrderValue-$AdvanceAmount; $TotaltoPay=$TotalOrderValue-$AdvanceAmount;
$totalAmt=sprintf("%.2f", $TotaltoPay); $totalAmt=sprintf("%.2f", $TotaltoPay);
$data['TotalAmountInWords']= $this->convertNumber($totalAmt); $data['TotalAmountInWords']= $this->convertNumber($totalAmt);
} }
else{ else{
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType);
@ -2596,6 +2598,9 @@ function addNewImportPurchaseOrder()
$data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO);
if($CapitalRange!=''){
$data['TaxListDetails'] = $this->purchaseorder_model->GetCapitalTaxListDetails($PONO,$CapitalRange);
}

View File

@ -1321,12 +1321,12 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
} }
// This Method to get the Capital PO Details for pdf // This Method to get the Capital PO Details for pdf
function GetCapitalPurchaseOrderDetailsForPDF($PONO = '') function GetCapitalPurchaseOrderDetailsForPDF($PONO = '')
{ {
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.AmendedDetails as lineamd,ReqNo,Mat.MaterialCode,Mat.MaterialName, $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.AmendedDetails as lineamd,ReqNo,Mat.MaterialCode,Mat.MaterialName,
Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount,HSNCODE LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.SupplierID,sup.Address,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount,HSNCODE
FROM T_PurchaseOrder_LineItem LineItem FROM T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
@ -1579,4 +1579,30 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
return $query->result(); return $query->result();
} }
// get capital tax listing by po no
function GetCapitalTaxListDetails($PONO = '',$CapitalRange=''){
if($CapitalRange==1){
$taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(st.`After_CGST`) AS TotalCGST,SUM(st.`After_SGST`) AS TotalSGST,SUM(st.`After_IGST`) AS TotalIGST,SUM(st.`otherallowance`) AS TotalOtherAllowance,SUM(st.`Afterdiscountval`) AS TotalDiscount,st.discountval,st.Afterdiscountval,st.CGST,st.SGST,st.IGST,st.otherallowance FROM kasiram9_SIADEV.T_Service_Tax st
join T_PurchaseOrder_LineItem pl on pl.LineItemNo=st.LineItemNo
join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO
where pm.POType=? and pm.PONO=?
group by st.discountval,st.CGST,st.SGST,st.IGST,st.otherallowance ORDER BY st.LineItemNo ASC';
$query = $this->db->query($taxQuery,array("CAPITAL",$PONO));
return $query->result();
}
else if($CapitalRange==0){
$taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(it.`AfterFreightValue`) AS TotalFreight,it.FreightValue,it.AfterFreightValue FROM kasiram9_SIADEV.T_Import_Tax it
join T_PurchaseOrder_LineItem pl on pl.LineItemNo=it.LineItemNo
join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO
where pm.POType=? and pm.PONO=?
group by it.FreightValue ORDER BY it.LineItemNo ASC';
$query = $this->db->query($taxQuery,array("CAPITAL",$PONO));
return $query->result();
}
}
} }

View File

@ -1,12 +1,10 @@
<?php <?php
$PONO = '';
$PONO = '';
$postatus =''; $postatus ='';
$CompanyAddress = ''; $CompanyAddress = '';
$CompanyName = ''; $CompanyName = '';
$SuplierName = ''; $CompanyStateCode='';
$SuplierName = '';
$SuplierAddress = ''; $SuplierAddress = '';
$DeliveryAddress = ''; $DeliveryAddress = '';
$Podt = ''; $Podt = '';
@ -14,18 +12,45 @@
$ServiceDescription = ''; $ServiceDescription = '';
$index=0; $index=0;
$dispatch=""; $dispatch="";
$PaymentDays=''; $PaymentDays='';
$PayableAT=''; $PayableAT='';
$PaymentTerms=''; $PaymentTerms='';
$PaymentOtherDescription=''; $PaymentOtherDescription='';
$DeliverySchedule=''; $DeliverySchedule='';
$advance=0; $advance=0;
$finCap='';
$modShp='';
$insNo='';
$insNo='';
$supRef='';
$supOfferNo='';
$companyEmail='';
$companyGst='';
$companyPan='';
$companyWebsit='';
$supplierEmail='';
$supplierGst='';
$supplierPan='';
$supplierContact='';
$supplierVendor='';
$TotalCgst=0;
$TotalSgst=0;
$TotalIgst=0;
$TotalDiscount=0;
$TotalOtherAllowance=0;
$TotalFreight=0;
$CapitalRange='';
if(!empty($CompanyDetails)) if(!empty($CompanyDetails))
{ {
foreach ($CompanyDetails as $CO) foreach ($CompanyDetails as $CO)
{ {
$CompanyName = $CO->CompanyName; $CompanyName = $CO->CompanyName;
$CompanyAddress = $CO->Address; $CompanyAddress = $CO->Address;
$companyEmail=$CO->EmailAddress;
$companyGst=$CO->GSTNO;
$companyPan=$CO->PAN;
$companyWebsit=$CO->companyWebsite;
$CompanyStateCode=$CO->StateCode;
} }
} }
@ -62,13 +87,26 @@
$dispatch=$PO->Import_DispatchDetails; $dispatch=$PO->Import_DispatchDetails;
} }
$ServiceDescription =$PO->ServiceDescription; $ServiceDescription =$PO->ServiceDescription;
$finCap=$PO->Fincap;
$modShp=$PO->Mode_Of_Shipment;
$insNo=$PO->InsuranceNumber;
$supRef=$PO->Supplier_Reference;
$supOfferNo=$PO->Supplier_Offer_No;
$supplierEmail=$PO->EmailAddress;
$supplierGst=$PO->GSTNO;
$supplierPan=$PO->PAN;
$supplierContact=$PO->ContactNumber;
$supplierVendor=$PO->SupplierID;
$CostCenterCode=$PO->CostCenterCode; $CostCenterCode=$PO->CostCenterCode;
$PaymentTerms=$PO->PaymentTerms; $PaymentTerms=$PO->PaymentTerms;
if($PaymentTerms=='Others'){ if($PaymentTerms=='Others'){
$PaymentOtherDescription=$PO->PaymentOtherDescription; $PaymentOtherDescription=$PO->PaymentOtherDescription;
} }
$CapitalRange=$PO->CapitalRange;
$TotalOrderValue=$PO->TotalOrderValue;
} }
} }
@ -95,138 +133,147 @@
?> ?>
<style> <style>
@page { margin: 240px 50px 30px 50px; } @page { margin: 280px 25px 210px 25px; }
.header { position: fixed; left: 0px; top: -240px; right: 0px; height: 550px;text-align: center; } .header { position: fixed; left: 0px; top: -280px; right: 0px; height: 500px;text-align: center; }
.footer { position: fixed; bottom: 0px; } .footer { position: fixed; bottom: 10px;}
.pagenum:before { content: counter(page); } .pagenum:before { content: counter(page); }
</style> </style>
<div class="footer">Page: <span class="pagenum"></span></div> <body>
<div class="header"> <div class="footer" style="font-size:12px;">
<div style="text-align:right;"> <table style="border-collapse: collapse; height: 8px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<?php <tbody>
if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED) <tr>
{} <td>
else <p><b>Note:</b> Please acknowledge receipt of this order for acceptance<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Material to be delivered to our stores before 3pm<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Please refer order number and item code in your challan/invoice</p>
{
echo '<div><b>DRAFT</b> </div>'; <?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
}
?> ?>
</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/C </a></span></center> <div align="Left"> Released By : <?php echo $detail->FirstName;?></div>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0"> <div align="Left"> Released On : <?php echo $releasedOn->format('d-m-Y');?></div>
<tbody> <?php
<tr> }
<td style="width:1px;"><img width="125" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td> }
else { }
<td colspan="3"> ?>
<p style="text-align: center; color:#3c8dbc;font-size:16px;""><?php echo $CompanyName; ?></p>
<p style="text-align: center;"><?php echo $CompanyAddress; ?></p>
</td>
<td colspan="1">
<p>PO No: <?php echo $PONO?></p><!--Data should be come-->
<p>Date: <?php echo $Podt?></p>
</td>
</tr>
<tr>
<td>
<p>Supplier :</p>
</td>
<td colspan="3" style="text-align: center;"><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?> </td>
<td colspan="1">DISPATCH INSTRUCTION / SCHEDULE BY: <?php echo $DeliveryDate.$DeliverySchedule.$dispatch;?><br /><br /></td>
</tr>
</tbody>
</table>
</td>
<td style="text-align: right;">
<p>For SIDDHARTH INDUSTRIES</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Authorised signatory</p>
</td>
</tr>
<tr><td colspan="2"><p style="text-align: center;">This is a system generated purchase order</p></td></tr>
</tbody>
</table>
Page: <span class="pagenum"></span>
</div> </div>
<div class="page" style="font-size:12px;">
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?> <div class="header" style="font-size:12px;">
<div style="text-align:right;">
<p>Indent ref:&nbsp;<?php echo $ReqDetails['RequistionNo']; ?>/<?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?>/ dept:<?php echo $ReqDetails['RequestedDept']; ?> / ccd:<?php echo $ReqDetails['CostCenterCode']; ?> / fincap</p> <?php
<?php if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED)
} { echo '<br>'; }
} else
{
?> echo '<b>DRAFT</b>'; }
?>
<!-- <table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%"> </div>
<tbody> <p>&nbsp;</p>
<tr style="background:#8c8c8c;color:#fff;"> <table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<td style="text-align: center;">Requistion Number</td> <tbody>
<td style="text-align: center;">Requistion Date</td> <tr>
<td style="text-align: center;">Requested By</td> <td style= "text-align: center;" colspan="12"><center> <span style="font-size:24px;">PURCHASE ORDER </span></center></td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr> </tr>
<tr>
<td style="width:1px;" rowspan="2"><center><img width="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg==" width="80" /></center></td>
<td style="text-align: left;" colspan="5" rowspan="2">
<span><strong style="font-size:16px;"> <?php echo $CompanyName; ?> </strong></span><br>
<span><?php echo $CompanyAddress; ?></span><br><br>
<span><strong>web: </strong><?php echo $companyWebsit; ?></a> </span>
<span><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PAN:</strong><?php echo $companyPan; ?> </span><br>
<span><strong>Email: </strong><?php echo $companyEmail; ?> </span>
<span><strong>&nbsp;&nbsp;GSTIN: </strong><?php echo $companyGst; ?></span>
</td>
<td colspan="3">
<span><strong>Purchase Order No:</strong></span><br>
<span><?php echo $PONO?></span>
</td>
<td colspan="3">
<span><strong> PO Date :</strong> </span><br>
<span> <?php echo $Podt?></span>
</td>
</tr>
<tr>
<td colspan="3">
<span><strong>Supplier's Offer No</strong>:<br> <?php echo $supOfferNo; ?> </span>
</td>
<td colspan="3"><strong>Our Reference : </strong><br> <?php echo $supRef; ?> </td> </tr>
<tr>
<td colspan="4" rowspan="2"><u><strong style="font-size:16px;">Shipped From:</strong></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vendor code: <?php echo $supplierVendor; ?> <!--data will come--><br /><?php echo $SuplierName?><br/><?php echo $SuplierAddress ?> <br/><br /><strong>Email ID:</strong><?php echo $supplierEmail; ?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>PAN:</strong> <?php echo $supplierPan; ?> <br ><strong>Contact :</strong><?php echo $supplierContact; ?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>GSTIN:</strong><?php echo $supplierGst; ?> </td>
<td rowspan="2" colspan="2"><u><strong style="font-size:16px;">Shipped To:</strong></u><br /><?php echo $CompanyAddress; ?><br> <strong>State code:</strong><?php echo $CompanyStateCode; ?></td><!--data should be come-->
<td colspan="6"><strong>Delivery</strong> :<br><?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
<?php <?php
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {
foreach($RequistionDetails as $ReqDetails)
foreach($RequistionDetails as $ReqDetails)
{ {
?> ?>
<tr> <tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td> <td><strong>Indent :</strong></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?></td> <td><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td> <td><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("d-m-Y"); echo $date; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td> <td><strong>Dept:</strong> <?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td> <td><strong>CCD: </strong><?php echo $ReqDetails['CostCenterCode']; ?></td>
<td><strong>Fin cap:</strong><!-- <?php echo $finCap; ?> --></td>
</tr> </tr>
<?php <?php } } ?>
} </tbody>
} </table>
</div>
?> <div class="page" style="height:98%;border:2px solid;font-size:12px;border-bottom:0px;">
</tbody>
</table> -->
<p>Please arrange to deliver the materials listed below as per schedule to our works</p><!--Data should be come--> <p><strong>Mode of Shipment</strong>: By road</p><!--data should be come-->
<p><strong>Insurance : </strong></p>
<p>Please arrange to deliver the materials listed below as per schedule to our works</p>
<div class="page" style="font-size:14px;"> <table style="border-collapse: collapse; height: 36px; width: 100.3%;" border="1" cellspacing="0" cellpadding="0">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%"> <tbody>
<tr style="background:#8c8c8c;color:#fff;"> <tr>
<th style="text-align: center;">#</th> <td style="text-align: center;"><strong>&nbsp;SNo</strong></td>
<th style="text-align: center;">Item and Description</th> <td style="text-align: center;"><strong>ITEM CODE</strong></td>
<th style="text-align: center;">HSN Code</th> <td style="text-align: center;"><strong>&nbsp;ITEM DESCRIPTION</strong></td>
<th style="text-align: center;">UOM</th> <td style="text-align: center;"><strong>HSN</strong></td>
<th style="text-align: center;">Qty</th> <td style="text-align: center;">&nbsp;<strong>UOM</strong></td>
<?php if($currencyName!='INR'){ ?> <td style="text-align: center;"><strong>&nbsp;QTY</strong></td>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName"."("."$currencyCode".")"?></th> <td style="text-align: center;">&nbsp;<strong>RATE Rs</strong></td>
<?php <td style="text-align: center;">&nbsp;<strong>PER</strong></td>
} else{ </tr>
<?php
?>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName";?></th><?php } ?>
<?php if($currencyName!='INR'){ ?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"; ?></th> <?php } ?>
</tr>
<?php
if(!empty($POItem)) if(!empty($POItem))
{ {
$TotalOrderValue=0;
$index=0; $index=0;
$BasicValue=0; $BasicValue=0;
@ -237,33 +284,30 @@
?> ?>
<tr> <tr style="line-height: 1em;text-align: center;">
<td style="text-align: center;"><?php echo $index ; ?></td> <td><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode;?>&nbsp;-&nbsp;<?php echo $record->MaterialName ; ?></td> <td style="text-align: left;"><?php echo $record->MaterialCode;?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?></td> <td style="text-align: left;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php echo $record->UOM; ?></td> <td><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?></td>
<td align="right"><?php echo $record->Quantity ; ?></td> <td><?php echo $record->UOM; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td> <td><?php echo $record->Quantity ; ?></td>
<td><?php echo $record->Rate ; ?></td>
<td><?php echo $record->Per ; ?></td><!--per data should be come-->
</tr>
<?php
<td align="right"><?php $BasicValue=($record->Quantity * $record->Rate);
echo number_format($BasicValue,2) ; ?></td>
</tr>
<?php
$TotalOrderValue = $TotalOrderValue+$BasicValue;
} }
} }
?> ?>
</table>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></p> </tbody>
</table>
<p>&nbsp;</p>
&nbsp; <?php
<div align="Left"> <b>Special Instruction:</b><br/><?php echo $ServiceDescription;?></div>
<?php
$i=0; $i=0;
if(!empty($POItem)) if(!empty($POItem))
{ {
@ -322,77 +366,115 @@
<?php } ?> <?php } ?>
&nbsp;
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: right;" rowspan="3"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords;?></em></td>
<?php if($currencyName!='INR'){ ?> <span><b>Tax and other details:</b></span>
<td style="text-align: right;" > <table style="border-collapse: collapse; height: 36px;" border="1" width="60%" cellspacing="0" cellpadding="0">
<strong>Total Order Amount in</strong> </td><td style="text-align: right;"><?php echo "$currencyName"."("."$currencyCode".")" . number_format($TotalOrderValue,2,'.','');?><?php } <tbody>
else { <tr>
?><strong>Total Order Amount in</strong> <?php echo "$currencyName" . number_format($TotalOrderValue,2); ?><?php <td style="text-align: center;"><strong>Item code</strong></td>
} ?> <td style="text-align: center;"><strong>DIS</strong></td>
<td style="text-align: center;"><strong>CGST%</strong></td>
<td style="text-align: center;"><strong>SGST%</strong></td>
<td style="text-align: center;"><strong>IGST%</strong></td>
<td style="text-align: center;"><strong>OTHER</strong></td>
<td style="text-align: center;"><strong>TRANSPORT CHARGES</strong></td>
</tr>
<?php
if(!empty($TaxListDetails))
{
</td></tr> foreach($TaxListDetails as $st)
<tr><td style="text-align: right;" ><strong>Advance Paid In &nbsp; </strong></td> <td style="text-align: right;"><?php echo "$currencyName ($currencyCode)" ;?>&nbsp;<?php echo number_format($advance,2,'.','');?> </strong></td></tr> { ?>
<tr><td style="text-align: right;" ><strong>Balance amount needs to pay&nbsp; </strong></td> <td style="text-align: right;"> <?php echo "$currencyName ($currencyCode)" ;?>&nbsp;<?php echo number_format(($TotalOrderValue - $advance),2,'.','');?> </strong></td> <tr style="text-align: center;">
</tr> <td style="text-align: left;"><?php echo $st->Itemcode;?></td>
<?php if($CapitalRange==1) {
$TotalCgst=$TotalCgst+$st->TotalCGST;
$TotalSgst=$TotalSgst+$st->TotalSGST;
$TotalIgst=$TotalIgst+$st->TotalIGST;
$TotalDiscount=$TotalDiscount+$st->TotalDiscount;
$TotalOtherAllowance=$TotalOtherAllowance+$st->TotalOtherAllowance;
$TotalFreight='-';
<tr> ?>
<td> <td><?php echo $st->discountval;?></td><!--data should be come-->
<td><?php echo $st->CGST;?></td><!--data should be come-->
<?php <td><?php echo $st->SGST;?></td><!--data should be come-->
if(!empty($releasedetails)){ <td><?php echo $st->IGST;?></td><!--data should be come-->
$releasedOn = ''; <td><?php echo $st->otherallowance;?></td><!--data should be come-->
foreach($releasedetails as $detail){ <td><?php echo '-';?></td><!--data should be come-->
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata')); <?php } else if($CapitalRange==0) {
$TotalCgst='-';
$TotalSgst='-';
?> $TotalIgst='-';
$TotalDiscount='-';
$TotalOtherAllowance='-';
$TotalFreight=$TotalFreight+$st->TotalFreight;
?>
<td><?php echo '-';?></td><!--data should be come-->
<td><?php echo '-';?></td><!--data should be come-->
<td><?php echo '-';?></td><!--data should be come-->
<td><?php echo '-';?></td><!--data should be come-->
<td><?php echo '-';?></td><!--data should be come-->
<td><?php echo $st->FreightValue;?></td><!--data should be come-->
<?php } ?>
<p>&nbsp;</p> </tr>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div> <?php
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?> }
} ?>
</tbody>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table> </table>
&nbsp;
<p style="text-align: left;"><strong>Special instructions:</strong></p>
<p style="text-align: left;"><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;position:fixed;bottom:110px;" border="1" width="100.3%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="4" rowspan="3" width="50%">
<span><strong>Payment terms :</strong><br><?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></span>
</td>
<td style="text-align: center;"><strong>Total Amount in Rs</strong></td>
<td style="text-align: center;"><strong>Total CGST Amount in Rs</strong></td>
<td style="text-align: center;"><strong>Total SGST Amount in RS</strong></td>
<td style="text-align: center;"><strong>Total IGST Amount in RS</strong></td>
<td style="text-align: center;"><strong>Others in Rs</strong></td>
<td style="text-align: center;"><strong>Total Tax Amount in Rs</strong></td>
<td style="text-align: center;"><strong>Order value in Rs</strong></td>
</tr>
<tr style="text-align: right;">
<td><?php echo $TotalOrderValue; ?></td><!--data should be come-->
<td><?php echo $TotalCgst; ?></td><!--data should be come-->
<td><?php echo $TotalSgst; ?></td><!--data should be come-->
<td><?php echo $TotalIgst; ?></td><!--data should be come-->
<?php if($CapitalRange==1){ ?>
<td><?php echo $TotalOtherAllowance; ?></td><!--data should be come-->
<td><?php echo $TotalCgst+$TotalSgst+$TotalIgst; ?></td><!--data should be come-->
<?php } else {?>
<td><?php echo $TotalFreight; ?></td><!--data should be come-->
<td><?php echo '-'; ?></td><!--data should be come-->
<?php } ?>
<td><?php echo $TotalOrderValue; ?></td><!--data should be come-->
</tr>
<tr>
<td colspan="7">
<p><strong>Order value in words:</strong> <?php echo $TotalAmountInWords;?></p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
<?php die(); ?>
</div>
</div>
&nbsp;<p></p>
<p>Note:&nbsp;Please acknowledge receipt of this order for acceptance</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Material to be delivered to our stores before 3pm &nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Please refer order number and item code in your challan/invoice&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;</p>

View File

@ -1011,7 +1011,7 @@ $("#PaymentMethod").select2();
$TotalIgst = $TotalIgst + $record->After_IGST; $TotalIgst = $TotalIgst + $record->After_IGST;
$OtherAmt = $OtherAmt + $record->otherallowance; $OtherAmt = $OtherAmt + $record->otherallowance;
$TotalSummary = $TotalSummary+$record->ServiceTaxamount; $TotalSummary = $TotalSummary+$record->ServiceTaxamount;
$TotalDiscountedAmt = $TotalDiscountedAmt + $record->Afterdiscountval; $TotalDiscountedAmt = $record->Afterdiscountval;
} }
$TotalBasicAmount = $TotalBasicAmount+$record->BasicValue; $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue;
$ServiceDescription = $ServiceDescription; $ServiceDescription = $ServiceDescription;