Service amend PO
This commit is contained in:
parent
a59d872a43
commit
b0a30fbf5e
@ -458,14 +458,15 @@ function UpdateAmendServicePurchaseOrder()
|
||||
{
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
|
||||
|
||||
$MAD='';
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
|
||||
//echo $PODate;
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
@ -474,29 +475,60 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
$ddate=$this->input->post('Deliverydt');
|
||||
$beforeddate=$this->input->post('beforeDeliverydt');
|
||||
|
||||
$dschedule=$this->input->post('Scheduleby');
|
||||
$beforedschedule=$this->input->post('beforeScheduleby');
|
||||
|
||||
if($ddate != $beforeddate)
|
||||
{
|
||||
$MAD.="Amended Delivery Date : " . $beforeddate . "<br>";
|
||||
}
|
||||
|
||||
if($dschedule != $beforedschedule)
|
||||
{
|
||||
$MAD.="Amended Delivery Schedule : " . $beforedschedule . "<br>";
|
||||
}
|
||||
// if(($ddate != $beforeddate) || ($dschedule != $beforedschedule) )
|
||||
// {
|
||||
// $beforeddate2=new DateTime($beforeddate, new DateTimeZone('Asia/Kolkata'));
|
||||
// $beforeddate3 = $beforeddate2->format('d-m-Y');
|
||||
// echo $beforeddate3;
|
||||
|
||||
// //die();
|
||||
// $MAD.="Amended Delivery Option : " . $beforeddate ."".$beforedschedule. "<br>";
|
||||
// }
|
||||
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
|
||||
$beforePaymentTerms=$this->input->post('beforePaymentTerms');
|
||||
if($PaymentTerms != $beforePaymentTerms)
|
||||
{
|
||||
$MAD.="Amended PaymentTerms : ". $beforePaymentTerms ."<br>";
|
||||
}
|
||||
//echo "MAD IS" . $MAD . "<br>";
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
|
||||
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||
$scopeofwork = $this->input->post('ScopeofWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
$updatedBy = $this->session->userdata ( 'userId' );
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
|
||||
//echo 'RowCount is' . $RowCount;
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$WorkStatus=$this->input->post('workstatus');
|
||||
|
||||
|
||||
// PO Master
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt);
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
|
||||
//print_r($POMaster);
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$updatedBy,$PONO);
|
||||
//print_r($LastPO);
|
||||
$NewPO = '';
|
||||
@ -517,32 +549,87 @@ function UpdateAmendServicePurchaseOrder()
|
||||
{
|
||||
|
||||
//echo "Inside Loop";
|
||||
|
||||
$CAD='';
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$beforeQuantity = $this->input->post('beforequantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
$ServiceTax = $this->input->post('ServiceTax'.$i);
|
||||
$EduCess = $this->input->post('EduCess'.$i);
|
||||
$SecHighTax = $this->input->post('SecHighTax'.$i);
|
||||
$KrishiTax = $this->input->post('KrishiTax'.$i);
|
||||
$SwachhTax = $this->input->post('SwachhTax'.$i);
|
||||
$beforeitemRate = $this->input->post('beforeitemRate'.$i);
|
||||
|
||||
$AfterSGST = $this->input->post('AfterSgst'.$i);
|
||||
$beforeSGSTvalue = $this->input->post('beforeSgstvalue'.$i);
|
||||
$AfterCGST = $this->input->post('AfterCgst'.$i);
|
||||
$beforeCGSTvalue = $this->input->post('beforeCgstvalue'.$i);
|
||||
$AfterIGST = $this->input->post('AfterIgst'.$i);
|
||||
$beforeIGSTvalue = $this->input->post('beforeIgstvalue'.$i);
|
||||
$SGST = $this->input->post('Sgst'.$i);
|
||||
$beforeSGST = $this->input->post('beforeSgst'.$i);
|
||||
$CGST = $this->input->post('Cgst'.$i);
|
||||
$beforeCGST = $this->input->post('beforeCgst'.$i);
|
||||
$IGST = $this->input->post('Igst'.$i);
|
||||
$beforeIGST = $this->input->post('beforeIgst'.$i);
|
||||
$otherallowance = $this->input->post('otherallowance'.$i);
|
||||
$beforeotherallowance = $this->input->post('beforeotherallowance'.$i);
|
||||
$servicematerialdescription = $this->input->post('servicematerialdescription'.$i);
|
||||
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
|
||||
$LineItemNo = '';
|
||||
$RecQtyvalue=0;
|
||||
$ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
|
||||
$rowspanvalue=0;
|
||||
$ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
|
||||
if(count($ReceivedQty)>0)
|
||||
{
|
||||
$RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
|
||||
}
|
||||
|
||||
if($Quantity != $beforeQuantity)
|
||||
{
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended Qty : " . $beforeQuantity ."</td><td>Current Qty : " . $Quantity . "</td></tr>";
|
||||
}
|
||||
if($itemRate != $beforeitemRate)
|
||||
{
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended Rate : " . $beforeitemRate ."</td><td>Current Rate : " . $itemRate . "</td></tr>";
|
||||
}
|
||||
if(($SGST != $beforeSGST) && ($AfterSGST != $beforeSGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended SGST : " . $beforeSGST ."</td><td>Current SGST : " . $SGST . "</td></tr><tr><td>Amended SGST value : " . $beforeSGSTvalue ."</td><td>Current SGST value: " . $AfterSGST . "</td></tr>";
|
||||
}
|
||||
if(($CGST != $beforeCGST) && ($AfterCGST != $beforeCGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended CGST : " . $beforeCGST ."</td><td>Current CGST : " . $CGST . "</td></tr><tr><td>Amended CGST value : " . $beforeCGSTvalue ."</td><td>Current CGST value: " . $AfterCGST . "</td></tr>";
|
||||
}
|
||||
if(($IGST != $beforeIGST) && ($AfterIGST != $beforeIGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended IGST : " . $beforeIGST ."</td><td>Current IGST : " . $IGST . "</td></tr><tr><td>Amended IGST value : " . $beforeIGSTvalue ."</td><td>Current IGST value: " . $AfterIGST . "</td></tr>";
|
||||
}
|
||||
if($otherallowance != $beforeotherallowance)
|
||||
{
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended OtherAllowances : " . $beforeotherallowance ."</td><td>Current OtherAllowances : " . $otherallowance . "</td></tr>";
|
||||
}
|
||||
if($rowspanvalue>0)
|
||||
{
|
||||
$rowspanvalue++;
|
||||
$CAD2='';
|
||||
$CAD2=$CAD;
|
||||
$CAD='';
|
||||
$CAD="<tr><td rowspan=". $rowspanvalue .">".$MaterialCode."</td></tr>";
|
||||
$CAD.=$CAD2;
|
||||
}
|
||||
|
||||
// echo "<br>CAD IS" . $CAD . "<br>";
|
||||
|
||||
if(count($ReceivedQty)>0)
|
||||
{
|
||||
$RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
|
||||
}
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue);
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD);
|
||||
//print_r($POLineItemList);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -553,9 +640,9 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
|
||||
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'ServiceTax'=>$ServiceTax,'EducessTax'=>$EduCess,'SecHigherEducessTax'=>$SecHighTax,'KrishiKalyantax'=>$KrishiTax,'SwachhBharattax'=>$SwachhTax,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||
|
||||
$ServiceList =$this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo,'CGST'=>$CGST,'After_CGST'=>$AfterCGST,'SGST'=>$SGST,'After_SGST'=>$AfterSGST,'IGST'=>$IGST,'After_IGST'=>$AfterIGST,'otherallowance'=>$otherallowance, 'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||
//print_r($ServiceTaxList);
|
||||
$ServiceList =$this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
|
||||
}
|
||||
echo 'PO Number is'.$PONO . ' is Amended Successfully! - New Amended PO Number is '.$NewPO;
|
||||
@ -1289,6 +1376,59 @@ function CreateAmendPOPrint()
|
||||
$this->dompdf->stream("Amendrevenuepopdf.pdf",$data,$php);
|
||||
|
||||
}
|
||||
public function servicepoprint($PONO)
|
||||
{
|
||||
|
||||
// $this->load->view('includes/pdfheader');
|
||||
|
||||
// Load the pdf page with multiviews
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderAmendDetailsforPdfprint($PONO);
|
||||
|
||||
|
||||
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||
|
||||
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
|
||||
|
||||
//print_r( $data['CurrencySymbol']);
|
||||
|
||||
$TotalOrderValue=0;
|
||||
$Currencycode='';
|
||||
foreach ($data['POItem'] as $POValue)
|
||||
{
|
||||
|
||||
$TotalOrderValue=$TotalOrderValue + $POValue->TotalValue;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$totalAmt=sprintf("%.2f", $TotalOrderValue);
|
||||
|
||||
$data['TotalAmountInWords']= $this->convertNumber($totalAmt);
|
||||
|
||||
$data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO);
|
||||
|
||||
$this->load->View("Amendervicepopdf", $data);
|
||||
|
||||
// Add header to pdf
|
||||
//$this->load->view('includes/pdffooter');
|
||||
|
||||
// Get output html
|
||||
$php = $this->output->get_output();
|
||||
|
||||
// Load library
|
||||
$this->load->library('dompdf_gen');
|
||||
|
||||
// Convert to PDF
|
||||
$this->dompdf->load_html($php);
|
||||
$this->dompdf->render();
|
||||
$data['Attachment'] = FALSE;
|
||||
$this->dompdf->stream("Amendservicepopdf.pdf",$data,$php);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function convertNumber($number)
|
||||
|
||||
@ -580,11 +580,35 @@ function purchaseorderListing($forwhat='')
|
||||
|
||||
}
|
||||
|
||||
function GetServicePurchaseOrderAmendDetailsforPdfprint($PONO = '')
|
||||
{
|
||||
|
||||
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ServiceMaterialDescription,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,POMaster.AmendedDetails,LineItem.AmendedDetails as lineamenddetails,
|
||||
ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST ) ,2)as Taxamount ,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address
|
||||
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
|
||||
where LineItem.PONO =?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($PONO));
|
||||
|
||||
return $query->result();
|
||||
|
||||
|
||||
}
|
||||
|
||||
// This Method to get the Revenue PO Child Details for Edit the Item
|
||||
function GetRevenuePurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance) - AfterDiscount ),2)as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
@ -606,8 +630,8 @@ function purchaseorderListing($forwhat='')
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST +
|
||||
AfterGST + AfterOtherTaxes + Insurance)) ,2)as Taxamount ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount ,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
@ -628,8 +652,8 @@ function purchaseorderListing($forwhat='')
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST +
|
||||
AfterGST + AfterOtherTaxes + Insurance)) ,2)as Taxamount ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
|
||||
335
application/views/Amendervicepopdf.php
Normal file
335
application/views/Amendervicepopdf.php
Normal file
@ -0,0 +1,335 @@
|
||||
<?php
|
||||
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
$CompanyAddress = '';
|
||||
$CompanyName = '';
|
||||
$SuplierName = '';
|
||||
$SuplierAddress = '';
|
||||
$DeliveryAddress = '';
|
||||
$Podt = '';
|
||||
$DeliveryDate ='';
|
||||
$DeliverySchedule='';
|
||||
$AfterSGST =0.00;
|
||||
$AfterCGST =0.00;
|
||||
$AfterIGST =0.00;
|
||||
$otherallowances =0.00;
|
||||
|
||||
$TotalAmount =0.00;
|
||||
$SubTotalAmount =0.00;
|
||||
$TaxAmount =0.00;
|
||||
$BasicAmount = 0.00;
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms='';
|
||||
$totaltaxamount=0.0;
|
||||
/* $PaymentDays='';
|
||||
$PayableAT=''; */
|
||||
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
{
|
||||
$CompanyName = $CO->CompanyName;
|
||||
$CompanyAddress = $CO->Address;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
{
|
||||
foreach ($CurrencySymbol as $Curr)
|
||||
{
|
||||
|
||||
$currencyCode = $Curr->FontCode2000;
|
||||
//$currencyName = $currencyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';}
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PayableAT;
|
||||
$DeliverySchedule=$PO->DeliverySchedule;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; 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 style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<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>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page" style="font-size:12px;">
|
||||
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tbody>
|
||||
<tr style="background:#8c8c8c;color:#fff;">
|
||||
<td>Requistion Number</td>
|
||||
<td>Requested By</td>
|
||||
<td>Requested Department</td>
|
||||
<td>Cost Center</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>
|
||||
<div class="page" style="font-size:12px;">
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr style="background:#8c8c8c;color:#fff;">
|
||||
<th>#</th>
|
||||
<th>Item Code</th>
|
||||
<th>Service Description</th>
|
||||
<th>Qty</th>
|
||||
<th>UOM</th>
|
||||
<th>Rate In INR</th>
|
||||
<th>Basic Amount In INR</th>
|
||||
<th>SGST In INR</th>
|
||||
<th>CGST In INR</th>
|
||||
<th>IGST In INR</th>
|
||||
<th>Other Allow In INR</th>
|
||||
<th>Total Amount In INR</th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance;
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td><?php echo $record->ServiceMaterialDescription ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo $record->BasicValue ; ?></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>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$AfterSGST =$AfterSGST + $record->After_SGST;
|
||||
$AfterCGST =$AfterCGST + $record->After_CGST;
|
||||
$AfterIGST = $AfterIGST + $record->After_IGST;
|
||||
$otherallowances =$otherallowances + $record->otherallowance;
|
||||
$totaltaxamount=$totaltaxamount+$record->Taxamount;
|
||||
|
||||
}
|
||||
$OrderValue = $SubTotalAmount + $AfterSGST + $AfterCGST+$AfterIGST+$otherallowances;
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: center;" colspan="3">
|
||||
<p>Amended Details</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach($POItem as $v)
|
||||
{
|
||||
echo "<b>" . $v->AmendedDetails . "</b>";
|
||||
break;
|
||||
}
|
||||
}?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center;"><strong>Item Description</strong></td>
|
||||
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php if(!empty($POItem))
|
||||
{
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
echo $record->lineamenddetails ;
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div align="right">
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:14px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: center;" rowspan="3"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." "."Only.";?></em></td>
|
||||
<td style="text-align: right;">Total Amount Before Tax In INR - <?php echo ($OrderValue - $totaltaxamount)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: right;">Total Tax Amount In INR - <?php echo $totaltaxamount;?> </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</strong></p>
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
|
||||
<p><?php echo $CompanyName; ?></p>
|
||||
<p> </p>
|
||||
<p>Authorized Signatory</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Scope Of Work :</b><br/><?php echo $ServiceDescription;?></div>
|
||||
|
||||
<?php
|
||||
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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
$PaymentTerms = '';
|
||||
/* $PaymentDays='';
|
||||
$PayableAT=''; */
|
||||
|
||||
$totaltaxonly=0;
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
@ -206,10 +206,10 @@
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$AfterExciseDuty = 0;
|
||||
$AfterVAT = 0;//SGST
|
||||
$AfterGST = 0;//CGST
|
||||
$AfterOtherTaxes = 0;//IGST
|
||||
|
||||
$AfterSGST = 0;
|
||||
$AfterCGST = 0;
|
||||
$AfterIGST = 0;
|
||||
$Insurance = 0;
|
||||
$AfterFreightValue = 0;
|
||||
$AfterDiscount = 0;
|
||||
@ -231,25 +231,25 @@
|
||||
<td align="right"><?php echo $record->AfterDiscount; ?></td>
|
||||
|
||||
|
||||
<td align="right"><?php echo $record->AfterVAT ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCGST ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->AfterGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterOtherTaxes ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterSGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterIGST ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Insurance ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterPackagingValue ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue ; ?></td>
|
||||
<td align="right"><?php $TotalAmount = (($record->BasicValue+$record->AfterExciseDuty
|
||||
+ $record->AfterVAT+$record->AfterCST+$record->AfterGST + $record->AfterOtherTaxes + $record->Insurance+ $record->AfterFreightValue+$record->AfterPackagingValue)- $record->AfterDiscount);
|
||||
<td align="right"><?php $TotalAmount = (($record->BasicValue+ $record->AfterCGST+$record->AfterIGST+$record->AfterSGST + $record->Insurance+ $record->AfterFreightValue+$record->AfterPackagingValue)- ($record->AfterDiscount));
|
||||
echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$AfterExciseDuty =$AfterExciseDuty + $record->AfterExciseDuty;
|
||||
$AfterVAT =$AfterVAT + $record->AfterVAT;
|
||||
$AfterGST =$AfterGST + $record->AfterGST;
|
||||
$AfterOtherTaxes =$AfterOtherTaxes + $record->AfterOtherTaxes;
|
||||
|
||||
$AfterCGST =$AfterCGST + $record->AfterCGST;
|
||||
$AfterSGST =$AfterSGST + $record->AfterSGST;
|
||||
$AfterIGST =$AfterIGST + $record->AfterIGST;
|
||||
$totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST);
|
||||
$Insurance =$Insurance + $record->Insurance;
|
||||
$AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue;
|
||||
$AfterDiscount = $AfterDiscount + $record->AfterDiscount ;
|
||||
@ -266,7 +266,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
$OrderValue = (( $SubTotalAmount + $AfterVAT +$AfterGST+$AfterOtherTaxes +$Insurance +$AfterFreightValue+$AfterExciseDuty+$AfterPackaging) - $AfterDiscount ) ;
|
||||
$OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insurance +$AfterFreightValue+$AfterPackaging) - $AfterDiscount ) ;
|
||||
}?>
|
||||
<div align="right">
|
||||
|
||||
@ -283,6 +283,7 @@ $OrderValue = (( $SubTotalAmount + $AfterVAT +$AfterGST+$AfterOtherTaxes +$Insu
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach($POItem as $v)
|
||||
{
|
||||
echo "<b>" . $v->AmendedDetails . "</b>";
|
||||
@ -315,7 +316,7 @@ $OrderValue = (( $SubTotalAmount + $AfterVAT +$AfterGST+$AfterOtherTaxes +$Insu
|
||||
<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(($OrderValue - $SubTotalAmount),2);?><strong></td>
|
||||
<td style="text-align: right;"> <strong>Total Tax Amount In INR :<?php echo number_format($totaltaxonly,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>
|
||||
|
||||
@ -45,9 +45,9 @@ foreach ($PaymentTerms as $TER)
|
||||
$totDiscountAmt = 0.0;
|
||||
$totPackagingAmt = 0.0;
|
||||
$totExciseAmt = 0.0;
|
||||
$totVATAmt = 0.0;
|
||||
$totCSTAmt = 0.0;
|
||||
$totGSTAmt = 0.0;
|
||||
$totVATAmt = 0.0; //FOR SGST
|
||||
$totCSTAmt = 0.0;//FOR CGST
|
||||
$totGSTAmt = 0.0;//FOR IGST
|
||||
|
||||
$totOtherTaxAmt = 0.0;
|
||||
$totFreightAmt = 0.0;
|
||||
@ -168,8 +168,8 @@ $('#Scheduleby').val(SchName);
|
||||
var PackagingCalculation = '';
|
||||
var ExciseCalculation = '';
|
||||
var StateTaxCheck = '';
|
||||
var VatCalculation = '';
|
||||
var CSTCalculation = '';
|
||||
var VatCalculation = ''; //FOR SGST
|
||||
|
||||
var RequistQuantity = '';
|
||||
var IsEdit = '0';
|
||||
var d = new Date(POMaxDate);
|
||||
@ -2155,7 +2155,7 @@ $('#txtDeliveryAddress').val(deladd);
|
||||
$('#txtStatus').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
//window.location = "amendmentpurchaseorder";
|
||||
window.location = "amendmentpurchaseorder";
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user