service and revenue po changes done and pdf

This commit is contained in:
venbatechnologies@gmail.com 2017-07-22 18:39:23 +05:30
parent 8fe849aaa9
commit 6a967c20d5
6 changed files with 1872 additions and 3508 deletions

View File

@ -120,27 +120,14 @@ class purchaseorder extends BaseController
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
$data['Suplist'] = $this->purchaseorder_model->getSupplierName(); $data['Suplist'] = $this->purchaseorder_model->getSupplierName();
$data['Payment']=$this->purchaseorder_model->getSupplierPayment('C009'); $data['Payment']=$this->purchaseorder_model->getPaymentTermsDetails();
$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
foreach ($data['WorkStatus'] as $WST)
{
$WStatus=$WST->ConfigValue;
//print_r($WStatus);
}
//print_r($data['WorkStatus']);
// foreach ($data['Suplist'] as $SUP)
// {
// $Detail=$SUP->PaymentTerms;
// }
//print_r($data['Payment']);
//print_r($data['Suplist']);
$SelectedReq = json_decode($this->input->post('txtReqNo')); $SelectedReq = json_decode($this->input->post('txtReqNo'));
$Req = $SelectedReq->Req; $Req = $SelectedReq->Req;
@ -650,8 +637,11 @@ class purchaseorder extends BaseController
} }
//This used to Create Revenue Purchase Order //This used to Create Revenue Purchase Order
//This used to Create Revenue Purchase Order
function addNewPurchaseOrder() function addNewPurchaseOrder()
{ {
$POdt =$this->input->post('PODate'); $POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt); $PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier'); $SupplierID = $this->input->post('drpSupplier');
@ -728,26 +718,19 @@ $DeliveryOption = $this->input->post('DateRange');
$PackagingType = $this->input->post('PackType'.$i); $PackagingType = $this->input->post('PackType'.$i);
$PackagingValue = $this->input->post('PackVal'.$i); $PackagingValue = $this->input->post('PackVal'.$i);
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i); $AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
$ExciseOption = $this->input->post('ExciseOption'.$i);
$ExciseValue = $this->input->post('ExciseVal'.$i);
$AfterExciseValue = $this->input->post('AfterExciseVal'.$i);
$VatOption = $this->input->post('VatOption'.$i);
$VatValue = $this->input->post('VatVal'.$i);
$AfterVatValue = $this->input->post('AfterVatVal'.$i);
$CSTOption = $this->input->post('CSTOption'.$i);
$CSTValue = $this->input->post('CSTVal'.$i);
$AfterCSTValue = $this->input->post('AfterCSTVal'.$i);
$GSTValue = $this->input->post('GSTVal'.$i);
$AfterGSTValue = $this->input->post('AfterGSTVal'.$i);
$OtherTaxValue = $this->input->post('OtherTaxVal'.$i);
$AfterOtherTaxValue = $this->input->post('AfterOtherTaxVal'.$i);
$FreightType = $this->input->post('FreightType'.$i); $FreightType = $this->input->post('FreightType'.$i);
$FreightValue = $this->input->post('FreightVal'.$i); $FreightValue = $this->input->post('FreightVal'.$i);
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i); $AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
$InsuranceValue = $this->input->post('Insval'.$i); $InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$CostCenter = $this->input->post('costCode'.$i); $CostCenter = $this->input->post('costCode'.$i);
$Cgst = $this->input->post('RevenueCgst'.$i);
$Sgst = $this->input->post('RevenueSgst'.$i);
$Igst = $this->input->post('RevenueIgst'.$i);
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
$SkipInsert = "False"; $SkipInsert = "False";
if( count($comma_separated) > 0) if( count($comma_separated) > 0)
{ {
@ -779,7 +762,7 @@ $DeliveryOption = $this->input->post('DateRange');
if(trim($POType) == REVENUE ) if(trim($POType) == REVENUE )
{ {
// echo 'Success'; // echo 'Success';
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
//echo 'Revenue tax Success'; //echo 'Revenue tax Success';

View File

@ -141,6 +141,7 @@ class servicepurchaseorder extends BaseController
return $retDate; return $retDate;
} }
//This used to Create Service Purchase Order
//This used to Create Service Purchase Order //This used to Create Service Purchase Order
function addNewServicePurchaseOrder() function addNewServicePurchaseOrder()
{ {

View File

@ -114,7 +114,7 @@ function purchaseorderListing($forwhat='')
*/ */
function getSupplierName($supID='') function getSupplierName($supID='')
{ {
$this->db->select('SupplierID, SupplierName,Address,PaymentTerms,PayableAT,PaymentDays'); $this->db->select('SupplierID, SupplierName,Address,PaymentID');
$this->db->from('T_SupplierDetailsN'); $this->db->from('T_SupplierDetailsN');
if($supID != '') if($supID != '')
{ {
@ -578,6 +578,28 @@ function purchaseorderListing($forwhat='')
return $query->result(); return $query->result();
}
// This Method to get the Service PO Child Details for Edit the Item
function GetServicePurchaseOrderDetailsForPrint($PONO = '')
{
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,
LineItem.Quantity,LineItem.Rate,ROUND((LineItem.Quantity *LineItem.Rate),2 ) as BasicValue ,ROUND((After_CGST + After_SGST + After_IGST),2)as Taxamount
,TotalValue,After_CGST,After_SGST,After_IGST,otherallowance,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,ReqMat.NumberOfService,ReqMat.Service_Period,ReqMat.Schedule_Type,Payment.PaymentID,Payment.PaymentTerms FROM
T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO
join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID
join T_Requestion_Master ReqMat on ReqMat.ReqNo = LineItem.ReqNo
join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms
where LineItem.PONO =?';
$query = $this->db->query($subQuery,array($PONO));
return $query->result();
} }
function GetServicePurchaseOrderAmendDetailsforPdfprint($PONO = '') function GetServicePurchaseOrderAmendDetailsforPdfprint($PONO = '')

File diff suppressed because it is too large Load Diff

View File

@ -473,7 +473,7 @@ function clearEditTaxField()
RequistQuantity = ''; RequistQuantity = '';
} }
/* $(document).ready(function () { $(document).ready(function () {
$('#Date').click(function () { $('#Date').click(function () {
//for Date range selection //for Date range selection
$('#Schedulediv').hide(); $('#Schedulediv').hide();
@ -484,7 +484,7 @@ function clearEditTaxField()
$('#Deliverydtdiv').hide(); $('#Deliverydtdiv').hide();
$('#Schedulediv').show(); $('#Schedulediv').show();
}); });
}); */ });
</script> </script>
<style> <style>
.modal .modal

View File

@ -1,6 +1,5 @@
<?php <?php
$PONO = ''; $PONO = '';
$postatus =''; $postatus ='';
$CompanyAddress = ''; $CompanyAddress = '';
@ -10,20 +9,19 @@
$DeliveryAddress = ''; $DeliveryAddress = '';
$Podt = ''; $Podt = '';
$DeliveryDate =''; $DeliveryDate ='';
$ServiceTax =0.00; $DeliverySchedule='';
$EducessTax =0.00; $Cgst=0.00;
$SecHigherEducessTax =0.00; $Sgst =0.00;
$KrishiKalyantax =0.00; $Igst =0.00;
$SwachhBharattax =0.00;
$TotalAmount =0.00; $TotalAmount =0.00;
$SubTotalAmount =0.00; $SubTotalAmount =0.00;
$TaxAmount =0.00; $TaxAmount =0.00;
$BasicAmount = 0.00; $BasicAmount = 0.00;
$OtherAllowance = 0.00;
$ServiceDescription = ''; $ServiceDescription = '';
$PaymentTerms=''; $PaymentTerms='';
$PaymentDays='';
$PayableAT='';
$DeliverySchedule='';
if(!empty($CompanyDetails)) if(!empty($CompanyDetails))
{ {
@ -66,23 +64,16 @@
$DeliveryAddress = $PO->DeliveryAddress; $DeliveryAddress = $PO->DeliveryAddress;
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
$Podt = $dt->format('d-m-Y'); $Podt = $dt->format('d-m-Y');
if($PO->DeliveryOption=='1'){ $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = '';
$DeliverySchedule = $PO->DeliverySchedule;
}
else{
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y'); $DeliveryDate = $dtDe->format('d-m-Y');
$DeliverySchedule = '';
}
$ServiceDescription =$PO->ServiceDescription; $ServiceDescription =$PO->ServiceDescription;
$PaymentTerms = $PO->PaymentTerms; $PaymentTerms = $PO->PaymentTerms;
$PaymentDays=$PO->PaymentDays;
$PayableAT=$PO->PayableAT;
} }
} }
?> ?>
<style> <style>
@ -92,239 +83,348 @@
.pagenum:before { content: counter(page); } .pagenum:before { content: counter(page); }
</style> </style>
<div class="footer">Page: <span class="pagenum"></span></div> <div class="footer">Page: <span class="pagenum"></span></div>
<div class="header"> <div class="header">
<table> <div style="text-align:right;">
<tr>
<td>
<img width="80" height="80" 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>
<td><center><h2>SERVICE PURCHASE ORDER</h2><a style="color:#515151">PO NO:<?php echo $PONO?> </a><br/><b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></center></td>
<td>
<?php <?php
if ($postatus == 'ST026') if ($postatus == 'ST026')
{} {}
else else
{ {
echo '<div><br/><br/>This is Draft Version For Internal Purpose</div>'; echo '<div><b>DRAFT</b> </div>';
} }
?> ?>
</td> </div>
</tr>
</table> <center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="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=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
</td>
</tr>
<tr>
<td>PO DATE :<?php echo $Podt; ?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr><th>Payment Terms</th><th>Payable At</th><th>Payment Days</th><th>Delivery Date/Schedule</th><th>PO Date</th></tr>
<tr><td><?php echo $PaymentTerms;?></td><td><?php echo $PayableAT;?></td><td><?php echo $PaymentDays;?></td><td><?php echo $DeliveryDate.$DeliverySchedule;?></td><td><?php echo $Podt?></td></tr>
</table>
<br/>
<table style="border-collapse: collapse;font-size:12px;" 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>
</tr>
</table>
</div> </div>
<div class="page" style="font-size:12px;"> <table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr style="background:#8c8c8c;color:#fff;">
<th>#</th>
<th>Item Description</th>
<th>Qty</th>
<th>Rate in INR</th>
<th>Amount In INR</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<?php echo $currencyCode; ?></th>
</tr>
<?php <tbody>
<tr>
<td>Requistion Number</td>
<td>Requested By</td>
<td>Requested Department</td>
<td>Cost Center &nbsp;</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<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>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>#</td>
<td>Item Code</td>
<td>Service Description</td>
<td>UOM</td>
<td>Qty</td>
<td>Rate In INR</td>
<td>Basic Value In INR</td>
<td>CGST In INR</td>
<td>SGST In INR</td>
<td>IGST In INR</td>
<td>Other Allow In INR</td>
<td>Total Amount In INR</td>
</tr>
<?php
if(!empty($POItem)) if(!empty($POItem))
{ {
$index = 0; $index = 0;
$TotalAmount = 0; $TotalAmount = 0;
$OrderValue = 0; $OrderValue = 0;
$OrderTax = 0;
foreach($POItem as $record) foreach($POItem as $record)
{ {
$index = $index + 1; $index = $index + 1;
$TotalAmount = $record->BasicValue + $record->Taxamount
?> ?>
<tr> <tr style="line-height: 1.5em;">
<td><?php echo $index ; ?></td> <td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td> <td><?php echo $record->MaterialName ; ?></td>
<td><?php echo $record->ServiceMaterialDescription ; ?></td>
<td align="right"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td> <td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td> <td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo $record->BasicValue ; ?></td> <td align="right"><?php if($record->NumberOfService==0 || $record->NumberOfService==''){
<td align="right"><?php echo $record->ServiceTax ; ?></td> echo $record->BasicValue;
<td align="right"><?php echo $record->EducessTax ; ?></td> $TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance;
<td align="right"><?php echo $record->SecHigherEducessTax ; ?></td> $SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance;
<td align="right"><?php echo $record->KrishiKalyantax ; ?></td> }
<td align="right"><?php echo $record->SwachhBharattax ; ?></td> else{
echo $record->BasicValue * $record->NumberOfService;
$TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance;
$SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance;
}
?></td>
<td align="right"><?php echo $record->After_SGST ; ?></td>
<td align="right"><?php echo $record->After_CGST ; ?></td>
<td align="right"><?php echo $record->After_IGST ; ?></td>
<td align="right"><?php echo $record->otherallowance ; ?></td>
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td> <td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
</tr> </tr>
<?php <?php
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
$ServiceTax =$ServiceTax + $record->ServiceTax;
$EducessTax =$EducessTax + $record->EducessTax; $Sgst =$Sgst + $record->After_SGST;
$SecHigherEducessTax = $SecHigherEducessTax + $record->SecHigherEducessTax; $Cgst =$Cgst + $record->After_CGST;
$KrishiKalyantax =$KrishiKalyantax + $record->KrishiKalyantax; $Igst = $Igst + $record->After_IGST;
$SwachhBharattax =$SwachhBharattax + $record->SwachhBharattax;
} }
$OrderValue = $SubTotalAmount + $ServiceTax + $EducessTax+$SecHigherEducessTax+$KrishiKalyantax +$SwachhBharattax;
$TotalTax = $Sgst + $Cgst+$Igst;
$OrderValue = $SubTotalAmount + $TotalTax;
} }
?> ?>
</table>
<div align="right">
</tbody>
</table>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="100%"> <p>&nbsp;</p>
<!--<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 In INR :</b></td>
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
<br/>
</tr>
</table>
<table>
<tr>
<td><b>Total Amount In Words:<b></td>
<td><b><?php echo $TotalAmountInWords." "."Only.";?></b></td>
</tr>
</table>
<br/>
<br/>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr style="background:#8c8c8c;color:#fff;">
<th>Requistion Number</th>
<th>Requested by</th>
<th>Requested Department</th>
<th>Cost center</th>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<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>
</tr>
<?php
}
}
?>
</table>
<br> <table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<br>
<p>
<div align="Left"> <b>Service Description:</b><br/><br/><?php echo $ServiceDescription;?></div></p>
<?php <tbody>
<tr>
<td style="text-align: center;" rowspan="3">
<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;"><strong>Total Amount Before Tax In INR - <?php echo number_format($SubTotalAmount,2);?></strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR - <?php echo number_format($TotalTax,2);?></strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR - <?php echo number_format($OrderValue,2);?></strong></td>
</tr>
<tr>
<td>
<p><strong>Payment Terms&nbsp;</strong></p>
<p><?php echo $PaymentTerms;?></p>
</td>
<td>
<p style="text-align: center;">Certified that the particulars given&nbsp;above are true and correct</p>
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Special Instruction:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<?php
if(!empty($releasedetails)){ if(!empty($releasedetails)){
$releasedOn = '';
$releasedOn = '';
foreach($releasedetails as $detail){ foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata')); $releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?> ?>
<table width="200%">
<tr>
<td><b>ReleasedBy:</b></td>
<td><b>ReleasedOn:</b></td>
</tr>
<tr> <!-- <table width="100%">
<td><?php echo $detail->FirstName;?></td> <tbody>
<td><?php echo $releasedOn->format('d-m-Y');?></td> <tr>
<td></td> <td><b>Released By:</b></td>
<td></td> <td style="text-align:right;"><b>Released On:</b></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td><?php echo $detail->FirstName;?></td>
</table> <td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
</tr>
</tbody>
</table> -->
<p>&nbsp;</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 <?php
} }
} }
else { else {
?>
<table width="200%"> ?>
<tr>
<td><b>Till Release State:</b></td>
<?php } ?>
</tr>
</table>
<?php } ?>
</div>
</div>