amendment pdf
This commit is contained in:
parent
9afccb3c1a
commit
92f7b30aa6
@ -819,14 +819,18 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
//die();
|
//die();
|
||||||
if($PaymentTerms!=$beforePaymentTerms)
|
if($PaymentTerms!=$beforePaymentTerms)
|
||||||
{
|
{
|
||||||
$MAD=$MAD."Amended Payment Terms:". $beforePaymentTerms ."</br>";
|
//$MAD=$MAD."Amended Payment Terms:". $beforePaymentTerms ."</br>";
|
||||||
|
$MAD.="Amended Payment Terms " . $beforePaymentTerms."<br>";
|
||||||
}
|
}
|
||||||
//$Payableat=$this->input->post('PayableAT');
|
//$Payableat=$this->input->post('PayableAT');
|
||||||
$Palaceoforigin=$this->input->post('PlaceOforigin');
|
$Palaceoforigin=$this->input->post('PlaceOforigin');
|
||||||
|
|
||||||
$beforePalaceoforigin=$this->input->post('beforePlaceOforigin');
|
$beforePalaceoforigin=$this->input->post('beforePlaceOforigin');
|
||||||
|
|
||||||
if($Palaceoforigin!=$beforePalaceoforigin)
|
if($Palaceoforigin!=$beforePalaceoforigin)
|
||||||
{
|
{
|
||||||
$MAD=$MAD."Amended Place of Origin:". $beforePalaceoforigin ."</br>";
|
//$MAD=$MAD."Amended Place of Origin:". $beforePalaceoforigin ."</br>";
|
||||||
|
$MAD.=$MAD."Amended Place of Origin: " . $beforePalaceoforigin."<br>";
|
||||||
}
|
}
|
||||||
//echo $MAD;
|
//echo $MAD;
|
||||||
//die();
|
//die();
|
||||||
@ -873,10 +877,7 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$beforeQuantity=$this->input->post('beforequantity'.$i);
|
$beforeQuantity=$this->input->post('beforequantity'.$i);
|
||||||
if(($Quantity-$beforeQuantity)!=0)
|
|
||||||
{
|
|
||||||
$CAD="Amended Quantity :".$beforeQuantity ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$i);
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
@ -886,10 +887,7 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$Productprice = $this->input->post('ProductPrice'.$i);
|
$Productprice = $this->input->post('ProductPrice'.$i);
|
||||||
$LandingCharge = $this->input->post('LandingCharge'.$i);
|
$LandingCharge = $this->input->post('LandingCharge'.$i);
|
||||||
$beforeLandingCharge = $this->input->post('beforeLandingCharge'.$i);
|
$beforeLandingCharge = $this->input->post('beforeLandingCharge'.$i);
|
||||||
if(($LandingCharge-$beforeLandingCharge)!=0)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended Landing :".$beforeLandingCharge ."</br>";
|
|
||||||
}
|
|
||||||
// echo $LandingCharge;
|
// echo $LandingCharge;
|
||||||
// echo $beforeLandingCharge;
|
// echo $beforeLandingCharge;
|
||||||
// die();
|
// die();
|
||||||
@ -897,125 +895,61 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$AfterLandingCharge = $this->input->post('AfterLandingCharge'.$i);
|
$AfterLandingCharge = $this->input->post('AfterLandingCharge'.$i);
|
||||||
$HighSeas = $this->input->post('HighSeasSalesCharge'.$i);
|
$HighSeas = $this->input->post('HighSeasSalesCharge'.$i);
|
||||||
$beforeHighSeas=$this->input->post('beforeHighSeasSalesCharge'.$i);
|
$beforeHighSeas=$this->input->post('beforeHighSeasSalesCharge'.$i);
|
||||||
if(($HighSeas-$beforeHighSeas)!=0)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended Highsesas :".$beforeHighSeas ."</br>";
|
|
||||||
}
|
|
||||||
$AfterHighSeas = $this->input->post('AfterHighSeasSalesCharge'.$i);
|
$AfterHighSeas = $this->input->post('AfterHighSeasSalesCharge'.$i);
|
||||||
|
|
||||||
$CustomDuty = $this->input->post('CustomDuty'.$i);
|
$CustomDuty = $this->input->post('CustomDuty'.$i);
|
||||||
|
|
||||||
$beforeCustomDuty=$this->input->post('beforeCustomDuty'.$i);
|
$beforeCustomDuty=$this->input->post('beforeCustomDuty'.$i);
|
||||||
if(($CustomDuty-$beforeCustomDuty)!=0)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended CustomDuty :".$beforeCustomDuty ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$AfterCustomDuty = $this->input->post('AfterCustomDuty'.$i);
|
$AfterCustomDuty = $this->input->post('AfterCustomDuty'.$i);
|
||||||
|
|
||||||
$ExciseDuty = $this->input->post('ExciseDuty'.$i);
|
$ExciseDuty = $this->input->post('ExciseDuty'.$i);
|
||||||
$beforeExciseDuty=$this->input->post('beforeExciseDuty'.$i);
|
$beforeExciseDuty=$this->input->post('beforeExciseDuty'.$i);
|
||||||
if(($ExciseDuty-$beforeExciseDuty)!=0)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended ExciseDuty :".$beforeExciseDuty ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$AfterExciseDuty = $this->input->post('AfterExciseDuty'.$i);
|
$AfterExciseDuty = $this->input->post('AfterExciseDuty'.$i);
|
||||||
|
|
||||||
$ExciseDutyEd = $this->input->post('ExciseDutyEdCess'.$i);
|
$ExciseDutyEd = $this->input->post('ExciseDutyEdCess'.$i);
|
||||||
$beforeExciseDutyEd=$this->input->post('beforeExciseDutyEdCess'.$i);
|
$beforeExciseDutyEd=$this->input->post('beforeExciseDutyEdCess'.$i);
|
||||||
if($ExciseDutyEd-$beforeExciseDutyEd)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended ExciseDutyEd :".$beforeExciseDutyEd ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$AfterExciseDutyEd = $this->input->post('AfterExciseDutyEdCess'.$i);
|
$AfterExciseDutyEd = $this->input->post('AfterExciseDutyEdCess'.$i);
|
||||||
|
|
||||||
$ExciseDutySH = $this->input->post('ExciseDutySHCess'.$i);
|
$ExciseDutySH = $this->input->post('ExciseDutySHCess'.$i);
|
||||||
$beforeExciseDutySH=$this->input->post('beforeExciseDutySHCess'.$i);
|
$beforeExciseDutySH=$this->input->post('beforeExciseDutySHCess'.$i);
|
||||||
if($ExciseDutySH-$beforeExciseDutySH)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended ExciseDutySH :".$beforeExciseDutySH ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$AfterExciseDutySH = $this->input->post('AfterExciseDutySHCess'.$i);
|
$AfterExciseDutySH = $this->input->post('AfterExciseDutySHCess'.$i);
|
||||||
|
|
||||||
$CustomEd= $this->input->post('CustomEdCess'.$i);
|
$CustomEd= $this->input->post('CustomEdCess'.$i);
|
||||||
$beforeCustomEd=$this->input->post('beforeCustomEdCess'.$i);
|
$beforeCustomEd=$this->input->post('beforeCustomEdCess'.$i);
|
||||||
if($CustomEd-$beforeCustomEd)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended CustomEd :".$beforeCustomEd ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$AfterCustomEd= $this->input->post('AfterCustomEdCess'.$i);
|
$AfterCustomEd= $this->input->post('AfterCustomEdCess'.$i);
|
||||||
|
|
||||||
$CustomSH = $this->input->post('CustomSHCess'.$i);
|
$CustomSH = $this->input->post('CustomSHCess'.$i);
|
||||||
$beforeCustomSH=$this->input->post('beforeCustomSHCess'.$i);
|
$beforeCustomSH=$this->input->post('beforeCustomSHCess'.$i);
|
||||||
if($CustomSH-$beforeCustomSH)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended CustomSH :".$beforeCustomSH ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$AfterCustomSH = $this->input->post('AfterCustomSHCess'.$i);
|
$AfterCustomSH = $this->input->post('AfterCustomSHCess'.$i);
|
||||||
|
|
||||||
$AddAdtional = $this->input->post('AddlExciseDuty'.$i);
|
$AddAdtional = $this->input->post('AddlExciseDuty'.$i);
|
||||||
$beforeAddAdtional=$this->input->post('beforeAddlExciseDuty'.$i);
|
$beforeAddAdtional=$this->input->post('beforeAddlExciseDuty'.$i);
|
||||||
if($AddAdtional-$beforeAddAdtional)
|
|
||||||
{
|
|
||||||
$CAD=$CAD."Amended Additional Excise duty :".$beforeAddAdtional ."</br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$AfterAddAdtional = $this->input->post('AfterAddlExciseDuty'.$i);
|
$AfterAddAdtional = $this->input->post('AfterAddlExciseDuty'.$i);
|
||||||
|
|
||||||
$Grossdutypayable = $this->input->post('Grossdutypayable'.$i);
|
$Grossdutypayable = $this->input->post('Grossdutypayable'.$i);
|
||||||
$beforeGrossdutypayable = $this->input->post('beforeGrossdutypayable'.$i);
|
$beforeGrossdutypayable = $this->input->post('beforeGrossdutypayable'.$i);
|
||||||
// if($Grossdutypayable-$beforeGrossdutypayable)
|
|
||||||
// {
|
|
||||||
// $CAD="Amended Grossdutypayable:".$beforeGrossdutypayable ."</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
$AvailableModvat = $this->input->post('AvailableModvat'.$i);
|
$AvailableModvat = $this->input->post('AvailableModvat'.$i);
|
||||||
$beforeAvailableModvat = $this->input->post('beforeAvailableModvat'.$i);
|
$beforeAvailableModvat = $this->input->post('beforeAvailableModvat'.$i);
|
||||||
// if($AvailableModvat-$beforeAvailableModvat)
|
|
||||||
// {
|
|
||||||
// $CAD="Amended Available Modvat:".$beforeAvailableModvat ."</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
$Grossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
|
$Grossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
|
||||||
$beforeGrossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
|
$beforeGrossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
|
||||||
//if($Grossexpensesduetocustomduty-$beforeGrossexpensesduetocustomduty)
|
|
||||||
// {
|
|
||||||
// $CAD="Amended GrosssExpense:".$beforeGrossexpensesduetocustomduty ."</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
$purchaseratePerKG = $this->input->post('purchaseratePerKG'.$i);
|
$purchaseratePerKG = $this->input->post('purchaseratePerKG'.$i);
|
||||||
$beforepurchaseratePerKG = $this->input->post('beforepurchaseratePerKG'.$i);
|
$beforepurchaseratePerKG = $this->input->post('beforepurchaseratePerKG'.$i);
|
||||||
// if($purchaseratePerKG-$beforepurchaseratePerKG)
|
|
||||||
// {
|
|
||||||
// $CAD="Amended Purchsae Rate/UOM:".$beforepurchaseratePerKG ."</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpensesPerKG'.$i);
|
$CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpensesPerKG'.$i);
|
||||||
$beforeCustomDutyExpensesPerKG = $this->input->post('beforeCustomDutyExpensesPerKG'.$i);
|
$beforeCustomDutyExpensesPerKG = $this->input->post('beforeCustomDutyExpensesPerKG'.$i);
|
||||||
|
|
||||||
//if($CustomDutyExpensesPerKG-$beforeCustomDutyExpensesPerKG)
|
|
||||||
// {
|
|
||||||
// $CAD="Amended CustomDutyExpense/UOM".$beforeCustomDutyExpensesPerKG ."</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
|
$RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
|
||||||
$beforeRMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
|
$beforeRMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
|
||||||
// if($RMCIncludingCustomersPerKG-$beforeRMCIncludingCustomersPerKG )
|
// if($RMCIncludingCustomersPerKG-$beforeRMCIncludingCustomersPerKG )
|
||||||
@ -1023,10 +957,7 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
// $CAD="Amended RMC Including Customs".$beforeRMCIncludingCustomersPerKG ."</br>";
|
// $CAD="Amended RMC Including Customs".$beforeRMCIncludingCustomersPerKG ."</br>";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
$QuantityKG = $this->input->post('QuantityKG'.$i);
|
||||||
|
|
||||||
|
|
||||||
$QuantityKG = $this->input->post('QuantityKG'.$i);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1034,8 +965,109 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$CostCenter = $this->input->post('costCode'.$i);
|
$CostCenter = $this->input->post('costCode'.$i);
|
||||||
|
|
||||||
$Totalvalueitem=$this->input->post('txtTotalorderValue');
|
$Totalvalueitem=$this->input->post('txtTotalorderValue');
|
||||||
|
$RecQtyvalue=0;
|
||||||
|
$rowspanvalue=0;
|
||||||
$LineItemNo = '';
|
$LineItemNo = '';
|
||||||
|
|
||||||
|
if(($Quantity-$beforeQuantity)!=0)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD="Amended Quantity :".$beforeQuantity ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended Quantity : ".$beforeQuantity ."</td><td>Current Qty:".$Quantity."</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(($LandingCharge-$beforeLandingCharge)!=0)
|
||||||
|
{
|
||||||
|
//$CAD=$CAD."Amended Landing :".$beforeLandingCharge ."</br>";
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD=$CAD."<tr><td>Amended Landing percentage : ".$beforeLandingCharge ."</td><td>Current Landing Percentage:".$LandingCharge."</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(($HighSeas-$beforeHighSeas)!=0)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended Highsesas :".$beforeHighSeas ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended Highsesas : ".$beforeHighSeas ."</td><td>Current Highsesas:".$HighSeas."</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(($CustomDuty-$beforeCustomDuty)!=0)
|
||||||
|
{
|
||||||
|
//$CAD=$CAD."Amended CustomDuty :".$beforeCustomDuty ."</br>";
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD=$CAD."<tr><td>Amended CustomDuty : ".$beforeCustomDuty ."</td><td>Current CustomDuty:".$CustomDuty."</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(($ExciseDuty-$beforeExciseDuty)!=0)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended ExciseDuty :".$beforeExciseDuty ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended ExciseDuty : ".$beforeExciseDuty ."</td><td>Current ExciseDuty:".$ExciseDuty."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ExciseDutyEd-$beforeExciseDutyEd)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended ExciseDutyEd :".$beforeExciseDutyEd ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended ExciseDutyEd : ".$beforeExciseDutyEd ."</td><td>Current ExciseDutyEd:".$ExciseDutyEd."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($ExciseDutySH-$beforeExciseDutySH)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended ExciseDutySH :".$beforeExciseDutySH ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended ExciseDutySH : ".$beforeExciseDutySH ."</td><td>Current ExciseDutySH:".$ExciseDutySH."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($CustomEd-$beforeCustomEd)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended CustomEd :".$beforeCustomEd ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended CustomEd : ".$beforeCustomEd ."</td><td>Current CustomEd:".$CustomEd."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($CustomSH-$beforeCustomSH)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
//$CAD=$CAD."Amended CustomSH :".$beforeCustomSH ."</br>";
|
||||||
|
$CAD=$CAD."<tr><td>Amended CustomSH : ".$beforeCustomSH ."</td><td>Current CustomSH:".$CustomSH."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($AddAdtional-$beforeAddAdtional)
|
||||||
|
{
|
||||||
|
//$CAD=$CAD."Amended Additional Excise duty :".$beforeAddAdtional ."</br>";
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD=$CAD."<tr><td>Amended Additional Excise duty: ".$beforeAddAdtional ."</td><td>Current Additional Excise duty:".$AddAdtional."</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($rowspanvalue>0)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
|
||||||
|
$CAD2='';
|
||||||
|
$CAD2=$CAD;
|
||||||
|
$CAD='';
|
||||||
|
$CAD="<tr><td rowspan=". $rowspanvalue .">".$MaterialCode."</td></tr>";
|
||||||
|
$CAD.=$CAD2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD);
|
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD);
|
||||||
//print_r($POLineItemList);
|
//print_r($POLineItemList);
|
||||||
@ -1088,6 +1120,121 @@ function CreateAmendPOPrint()
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function importpoprint($PONO)
|
||||||
|
{
|
||||||
|
|
||||||
|
//$this->load->view('includes/pdfheader');
|
||||||
|
|
||||||
|
// Load the pdf page with multiviews
|
||||||
|
$Requester='';
|
||||||
|
$Depcode='';
|
||||||
|
$Currencycode='';
|
||||||
|
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||||
|
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO);
|
||||||
|
//print_r($data['POItem']);
|
||||||
|
//die();
|
||||||
|
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||||
|
//print_r( $data['releasedetails']);
|
||||||
|
foreach ($data['POItem'] as $Reqdby)
|
||||||
|
{
|
||||||
|
$Requester=$Reqdby->Requestedby;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($data['POItem'] as $CURTYPE)
|
||||||
|
{
|
||||||
|
$Currencycode=$CURTYPE->CurrencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester);
|
||||||
|
|
||||||
|
foreach ($data['Requestername'] as $ReqDep)
|
||||||
|
{
|
||||||
|
$Depcode=$ReqDep->Departmentcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode);
|
||||||
|
//print_r($data['Requestername']);
|
||||||
|
$data['Currencytype']=$this->purchaseorder_model->GerCurrencyCodeName($Currencycode);
|
||||||
|
$ProductPrice='';
|
||||||
|
$TotalOrderValue = '';
|
||||||
|
foreach ($data['POItem'] as $PO )
|
||||||
|
{
|
||||||
|
$TotalOrderValue=$PO->TotalOrderValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//$totalAmt=sprintf("%.2f", $ProductPrice);
|
||||||
|
//$data['TotalAmountInWords']= $this->convertNumber($totalAmt);
|
||||||
|
//print_r($data['TotalAmountInWords']);
|
||||||
|
|
||||||
|
//$this->load->View("importpopdf", $data);
|
||||||
|
|
||||||
|
|
||||||
|
$CurrencyType='';
|
||||||
|
if(!empty($data['POItem'])){
|
||||||
|
$CurrencyType=$data['POItem'][0]->CurrencyType;
|
||||||
|
}
|
||||||
|
//echo $CurrencyType;
|
||||||
|
|
||||||
|
if($CurrencyType=='')
|
||||||
|
{
|
||||||
|
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType);
|
||||||
|
}
|
||||||
|
|
||||||
|
// $TotalOrderValue=$data['POItem'][0]->$TotalOrderValue;
|
||||||
|
//print_r($data['POItem'][0]);
|
||||||
|
|
||||||
|
$totalAmt=sprintf("%.2f", $TotalOrderValue);
|
||||||
|
|
||||||
|
$data['TotalAmountInWords']= $this->convertNumber($totalAmt);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$SymbolCurrency = '';
|
||||||
|
$SymbolCurrencyName ='';
|
||||||
|
$PaiseVal = '';
|
||||||
|
if(!empty($data['CurrencySymbol']) >0)
|
||||||
|
{
|
||||||
|
$SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000;
|
||||||
|
$SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency;
|
||||||
|
$PaiseVal=$data['CurrencySymbol'][0]->PaiseVal;
|
||||||
|
}
|
||||||
|
$TotalOrderValue=$data['POItem'][0]->TotalOrderValue;
|
||||||
|
|
||||||
|
$totalAmt=sprintf("%.2f", $TotalOrderValue);
|
||||||
|
|
||||||
|
// $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal);
|
||||||
|
|
||||||
|
|
||||||
|
$this->load->View("Amendedimportpopdf", $data);
|
||||||
|
|
||||||
|
|
||||||
|
// Add header to pdf
|
||||||
|
//s $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->set_paper(array(0, 0, 841.89, 1190.55), 'landscape');
|
||||||
|
///$this->dompdf->load_html($php);
|
||||||
|
///$this->dompdf->render();
|
||||||
|
///$data['Attachment'] = FALSE;
|
||||||
|
///$this->dompdf->stream("ImportPOReport.pdf",$data,$php);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function revenuepoprint($PONO)
|
public function revenuepoprint($PONO)
|
||||||
|
|||||||
@ -607,7 +607,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
|
|||||||
|
|
||||||
$subQuery='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Import_DispatchDetails,
|
$subQuery='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Import_DispatchDetails,
|
||||||
Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
|
Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
|
||||||
ProductPrice,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address
|
ProductPrice,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend
|
||||||
FROM T_PurchaseOrder_LineItem LineItem
|
FROM T_PurchaseOrder_LineItem LineItem
|
||||||
join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo
|
join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo
|
||||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||||
@ -784,7 +784,7 @@ function GetCurrencytype()
|
|||||||
// To update Parent PO as Amended PO
|
// To update Parent PO as Amended PO
|
||||||
function updateAmendPOMaster($PONO,$PODetail)
|
function updateAmendPOMaster($PONO,$PODetail)
|
||||||
{
|
{
|
||||||
echo $PONO."from model";
|
//echo $PONO."from model";
|
||||||
|
|
||||||
|
|
||||||
$this->db->where('PONO', $PONO);
|
$this->db->where('PONO', $PONO);
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$TotalOrderValue1='';
|
||||||
if(!empty($POItem))
|
if(!empty($POItem))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -49,6 +49,7 @@
|
|||||||
$ServiceDescription =$PO->ServiceDescription;
|
$ServiceDescription =$PO->ServiceDescription;
|
||||||
$CostCenterCode=$PO->CostCenterCode;
|
$CostCenterCode=$PO->CostCenterCode;
|
||||||
//$ReqBy=$PO->Requestedby;
|
//$ReqBy=$PO->Requestedby;
|
||||||
|
$TotalOrderValue1=$PO->TotalOrderValue;
|
||||||
|
|
||||||
$PaymentTerms = $PO->PaymentTerms;
|
$PaymentTerms = $PO->PaymentTerms;
|
||||||
$PaymentDays=$PO->PaymentDays;
|
$PaymentDays=$PO->PaymentDays;
|
||||||
@ -180,7 +181,7 @@
|
|||||||
<th>UOM</p>
|
<th>UOM</p>
|
||||||
<th>Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
<th>Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
||||||
<th>Basic Price in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
<th>Basic Price in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
||||||
<th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
<!-- <th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th> -->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -225,7 +226,10 @@
|
|||||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||||
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
|
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
|
||||||
echo number_format($BasicValue,2) ; ?></td>
|
echo number_format($BasicValue,2) ; ?></td>
|
||||||
<td align="right"><?php echo $record->TotalOrderValue; ?></td>
|
<!-- <td align="right"><?php echo $record->TotalOrderValue; ?></td> -->
|
||||||
|
|
||||||
|
<!-- <td align="right"><?php $TotalOrderValue=($record->Quantity*$record->Rate);
|
||||||
|
echo number_format($BasicValue,2) ; ?></td> -->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -263,52 +267,37 @@
|
|||||||
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;" colspan="4">
|
<td style="text-align: center;" colspan="3">
|
||||||
<p>Amended Details</p>
|
<p>Amended Details</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">
|
<td colspan="3">
|
||||||
<?php
|
<?php
|
||||||
if(!empty($POItem))
|
if(!empty($POItem))
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach($POItem as $v)
|
foreach($POItem as $v)
|
||||||
{
|
{
|
||||||
echo "<b>" . $v->AmendedDetails . "</b>";
|
//echo "<b>" . $v->AmendedDetails . "</b>";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}?>
|
}?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;"><strong>Item Description</strong></td>
|
<td style="text-align: center;"><strong>Item Description</strong></td>
|
||||||
<td style="text-align: center;"><strong>previous Details</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>
|
||||||
<!-- <td style="text-align: center;" colspan="2">Current Details</td> -->
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
if(!empty($POItem))
|
|
||||||
{
|
|
||||||
|
|
||||||
$index=0;
|
|
||||||
foreach($POItem as $record)
|
|
||||||
{
|
|
||||||
$index = $index + 1;
|
|
||||||
//echo $record->MaterialName ;
|
|
||||||
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;"><?php echo $index ;echo $record->MaterialName ; ?></td>
|
|
||||||
<td ><?php echo $record->AmendedDetails ?></td>
|
|
||||||
<!-- <td ><?php echo $record->AmendedDetails ?></td> -->
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(!empty($POItem))
|
||||||
<?php
|
{
|
||||||
}
|
foreach($POItem as $record)
|
||||||
|
{
|
||||||
|
echo $record->LineAmend ;
|
||||||
|
}
|
||||||
} ?>
|
} ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -349,7 +338,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." "."Only.";?></em></td>
|
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." "."Only.";?></em></td>
|
||||||
<td style="text-align: center;" ><strong>Total Amount In <?php echo "$CurrencyCode ($CurrencyName)" ;?> <?php echo "$TotalOrderValue";?> </strong></td>
|
<td style="text-align: center;" ><strong>Total Amount In <?php echo "$CurrencyCode ($CurrencyName)" ;?> <?php echo "$TotalOrderValue1";?> </strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user