From 98c7025f71a69dbb231e22738094c6fda6c053f1 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Thu, 20 Jul 2017 14:42:23 +0530 Subject: [PATCH] Revenue AmendmentPO Change --- .../controllers/amendmentpurchaseorder.php | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index aef4116c..6382b102 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -280,7 +280,10 @@ class amendmentpurchaseorder extends BaseController } - $SpcialInstruction = $this->input->post('SpcialInstruction'); + $SpecialInstruction = $this->input->post('txtSpcialInstruction');//$_POST['txtSpcialInstruction'];//$this->input->post('txtSpcialInstruction');//t->post('txtSpcialInstruction')); + + // echo $SpecialInstruction; + $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $POStatus = $this->input->post('txtStatus'); @@ -293,7 +296,7 @@ class amendmentpurchaseorder extends BaseController $updateddt = $dt->format('Y-m-d H:i:s'); // PO Master // PO Master - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD); //print_r($POMaster); @@ -366,12 +369,12 @@ class amendmentpurchaseorder extends BaseController if(($Quantity-$preqty)!=0) { $rowspanvalue++; - $CAD="Amended Qty :".$preqty ."Current Qty:".$Quantity.""; + $CAD="Amended Quantity : ".$preqty ."Current Qty:".$Quantity.""; } if(($itemRate-$preitemrate)!=0) { $rowspanvalue++; - $CAD.="Amended Rate :" . $preitemrate."Current Item Rate:".$itemRate.""; + $CAD.="Amended Rate : " . $preitemrate."Current Item Rate:".$itemRate.""; } if(($DiscountValue-$preDiscountValue)!=0) { @@ -406,7 +409,7 @@ class amendmentpurchaseorder extends BaseController if(($InsuranceValue-$preInsuranceValue)!=0) { $rowspanvalue++; - $CAD.="Amended InsuranceValue:". $preInsuranceValue."Current Insurance Value:".$InsuranceValue.""; + $CAD.="Amended Insurance Value:". $preInsuranceValue."Current Insurance Value:".$InsuranceValue.""; } if($rowspanvalue>0) { @@ -446,7 +449,7 @@ class amendmentpurchaseorder extends BaseController } - echo 'Purchase Order Amended Successfully! PO Number Is: '.$PONO .'- New PO Number is'.$NewPO; + echo 'Purchase Order Amended Successfully! PO Number Is: '.$PONO .'- New PO Number is'.$NewPO; } @@ -1095,8 +1098,9 @@ function CreateAmendPOPrint() $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO); + $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForAmendPDF($PONO); //print_r($data['POItem']); + //die(); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); @@ -1126,13 +1130,16 @@ function CreateAmendPOPrint() $php = $this->output->get_output(); // // Load library - $this->load->library('dompdf_gen'); + $this->load->library('dompdf_gen'); // // Convert to PDF $this->dompdf->load_html($php); + $this->dompdf->render(); + $data['Attachment'] = FALSE; - $this->dompdf->stream("Amendrevenuepopdf.pdf",$data,$php); + + $this->dompdf->stream("Amendrevenuepopdf.pdf",$data,$php); }