From e6346e50b52e2881b1c926e0d6a4258d56bce89c Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 9 Sep 2017 18:01:00 +0530 Subject: [PATCH] rich text --- .../controllers/amendmentpurchaseorder.php | 5 +- application/controllers/purchaseorder.php | 14 +++- application/models/purchaseorder_model.php | 2 +- application/views/editImportAmendPO.php | 27 +++++++ application/views/editimportpo.php | 75 ++++++++++++++++++- application/views/importpo.php | 69 ++++++++++++++++- 6 files changed, 182 insertions(+), 10 deletions(-) diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index 2c9b1520..3b1aa430 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -1068,6 +1068,7 @@ function UpdateAmendServicePurchaseOrder() echo 'Purchase Order'.$PONO.'Amended Successfully! New PO Number Is: '.$NewPO ; } + function EditAmendImportPO() { @@ -1343,7 +1344,7 @@ function UpdateAmendServicePurchaseOrder() $QuantityKG = $this->input->post('QuantityKG'.$i); - + $specialinstruction=$this->input->post('Addinstruction'.$i); //$POLineItemNo = $this->input->post('LineItemNo'.$i); $CostCenter = $this->input->post('costCode'.$i); @@ -1504,7 +1505,7 @@ function UpdateAmendServicePurchaseOrder() - $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD,'Per'=>$per); + $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD,'Per'=>$per,'ServiceMaterialDescription'=>$specialinstruction); //print_r($POLineItemList); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 56b5f52f..6128feac 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1446,6 +1446,10 @@ function addNewImportPurchaseOrder() $Freightrate=$this->input->post('FreightRate'.$i); $Freightamount=$this->input->post('AfterFreightRate'.$i); + $specialinstruction=$this->input->post('Addinstruction'.$i); + + //echo $specialinstruction; + $per=$this->input->post('Per'.$i); @@ -1468,7 +1472,7 @@ function addNewImportPurchaseOrder() } if($SkipInsert == "False") { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$specialinstruction); //print_r($POLineItemList); //die(); @@ -1704,6 +1708,9 @@ function addNewImportPurchaseOrder() $FreightRate=$this->input->post('FreightValue'.$i); $FreightAmount=$this->input->post('AfterFreightValue'.$i); + + $specialinstruction=$this->input->post('Addinstruction'.$i); + $per=$this->input->post('Per'.$i); // echo $per; //die(); @@ -1731,7 +1738,7 @@ function addNewImportPurchaseOrder() { if(strlen($POLineItemNo) == 0) { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$specialinstruction); $POLineItem=$this->purchaseorder_model->addPOLineItem($POLineItemList); if(count($POLineItem)>0) { @@ -1748,7 +1755,7 @@ function addNewImportPurchaseOrder() //echo $LineItemNo; //die(); - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$specialinstruction); $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList); } @@ -1790,6 +1797,7 @@ function addNewImportPurchaseOrder() echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ; } + /* All Function following This command for FINANCE TEAM PO APPROVAL SCREEN*/ diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index da157a50..2129301d 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -865,7 +865,7 @@ function GetImportPurchaseOrderDetails($PONO = '') Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue,ReceivedQuantity, QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess, - AfterCustomEdCess,ROUND((Quantity *Rate),2)as TotalOrderValue,ROUND((POMast.ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,TotalValue,CurrencyType,ReceivedQuantity,Tax.*, + AfterCustomEdCess,ROUND((Quantity *Rate),2)as TotalOrderValue,ROUND((POMast.ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,TotalValue,CurrencyType,ReceivedQuantity,Tax.*,LineItem.ServiceMaterialDescription, Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO diff --git a/application/views/editImportAmendPO.php b/application/views/editImportAmendPO.php index a4e333cb..39bb3808 100755 --- a/application/views/editImportAmendPO.php +++ b/application/views/editImportAmendPO.php @@ -222,6 +222,14 @@ if(!empty($RequistionDetails)) statusbar: false, toolbar: false }); + + + tinymce.init({ + selector: "textarea#edittxtInstruction", + menubar: false, + statusbar: false, + toolbar: false + }); @@ -1389,6 +1397,15 @@ if(!empty($RequistionDetails)) +
+
+ + 'edittxtInstruction','value' => set_value('edittxtInstruction'),'id'=>'edittxtInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); +echo form_textarea($data); +?> +
+
+ +
+
+ + 'addtxtInstruction','value' => set_value('addtxtInstruction'),'id'=>'addtxtInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); +echo form_textarea($data); +?> +
+
@@ -2053,6 +2092,16 @@ if($PONOStatus == PO_RELEASED) +
+
+ + 'edittxtInstruction','value' => set_value('edittxtInstruction'),'id'=>'edittxtInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); +echo form_textarea($data); +?> +
+
+ +
+
+ + 'viewtxtInstruction','value' => set_value('viewtxtInstruction'),'id'=>'viewtxtInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); +echo form_textarea($data); +?> +
+
+ +
+
+ + 'edittxtInstruction','value' => set_value('edittxtInstruction'),'id'=>'edittxtInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); +echo form_textarea($data); +?> +
+
+