diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index 5a657732..1d6c8635 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -283,7 +283,18 @@ class amendmentpurchaseorder extends BaseController $DeliverySchedule = ''; } - + $Modeofshipment=$this->input->post('addmodeofshipment'); + $supplierreference=$this->input->post('amendsupplierreference'); + $supplieroffno=$this->input->post('amendsupplierofferno'); + $otherreference=$this->input->post('amendotherreference'); + $fincap=$this->input->post('amendfincap'); + $revenuetype=$this->input->post('PoTypeOptions'); + $insurancestatus=$this->input->post('insurancestatus'); + if($insurancestatus == 1){ + $insuranceno=$this->input->post('insuranceno'); + }else{ + $insuranceno=""; + } $POType = $this->input->post('POType'); @@ -333,8 +344,8 @@ class amendmentpurchaseorder extends BaseController } - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'CapitalRange'=>$PoRange,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); - //print_r($POMaster); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'PORange'=>$PoRange,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Reference'=>$supplierreference,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'InsuranceNumber'=>$insuranceno,'POSubType'=>$revenuetype,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); + print_r($POMaster); @@ -372,6 +383,8 @@ class amendmentpurchaseorder extends BaseController $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); $preitemrate=$this->input->post('beforeitemRate'.$i); + $per=$this->input->post('per'.$i); + $servicematerialdescription=$this->input->post('service_description'.$i); $DiscountType = $this->input->post('DisType'.$i); $beforeDiscountType = $this->input->post('beforeDisType'.$i); @@ -542,8 +555,8 @@ class amendmentpurchaseorder extends BaseController - $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'ReceivedQuantity'=>$RecQtyvalue,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'AmendedDetails'=>$CAD); - //print_r($POLineItemList); + $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'ReceivedQuantity'=>$RecQtyvalue,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$servicematerialdescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'AmendedDetails'=>$CAD); + print_r($POLineItemList); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); @@ -554,7 +567,7 @@ class amendmentpurchaseorder extends BaseController $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType,'NoOfTrip'=>$NoofTrips,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'SGST'=>$VatValue,'AfterSGST'=>$AfterVatValue,'CGST'=>$GSTValue,'AfterCGST'=>$AfterGSTValue,'IGST'=>$OtherTaxValue,'AfterIGST'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt); - // print_r($RevenueTaxList); + print_r($RevenueTaxList); $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); } @@ -565,6 +578,7 @@ class amendmentpurchaseorder extends BaseController + function UpdateAmendServicePurchaseOrder() { diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index ab4b02d7..e2513477 100755 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -264,7 +264,7 @@ class emergencypurchaseorder extends BaseController function addNewRevenuePurchaseOrder() { - + //echo "Emergency Revenue PO"; $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); @@ -279,6 +279,19 @@ class emergencypurchaseorder extends BaseController $Deliverydt = $this->getDateformat($dt); $DeliverySchedule = ''; } + + $Modeofshipment=$this->input->post('emergmodeofshipment'); + $supplierreference=$this->input->post('emergsupplierreference'); + $supplieroffno=$this->input->post('emergsupplierofferno'); + $otherreference=$this->input->post('emergotherreference'); + $fincap=$this->input->post('emergfincap'); + $revenuetype=$this->input->post('PoTypeOptions'); + $insurancestatus=$this->input->post('insuranceStatus'); + if($insurancestatus == 1){ + $insuranceno=$this->input->post('insuranceNo'); + }else{ + $insuranceno=""; + } $CostCenterName = $this->input->post('CostCenterName'); $POType = $this->input->post('POType'); $PoRange = $this->input->post('txtPoRange'); @@ -290,6 +303,7 @@ class emergencypurchaseorder extends BaseController $CreateBy = $this->session->userdata ( 'userId' ); $RowCount = $this->input->post('TextRowCount'); + //echo $RowCount; $DeletedRow = $this->input->post('TextDeletedRowCount'); $RequestedBy = $this->session->userdata ('EmpID'); $ReqStatus = REQITEM_Emergency_PO_CREATED; @@ -314,8 +328,8 @@ class emergencypurchaseorder extends BaseController $RegNo = $Req[0]['ReqNo']; } // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment); - + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype); + //print_r($POList); $POMaster = $this->purchaseorder_model->addPOMaster($POList); $PONO = ''; @@ -323,7 +337,7 @@ class emergencypurchaseorder extends BaseController { $PONO = $POMaster[0]['PONO']; } - + //echo $PONO; // PO Line Items $RegDetailsStatus=REQITEM_POCREATED; $LineItemStatus = REQITEM_NEW; @@ -335,7 +349,8 @@ class emergencypurchaseorder extends BaseController $Quantity = $this->input->post('quantity'.$i); $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); - + $per = $this->input->post('per'.$i); + $DiscountType = $this->input->post('DisType'.$i); $DiscountValue = $this->input->post('DisVal'.$i); $AfterDiscount = $this->input->post('AfterDisVal'.$i); @@ -350,6 +365,7 @@ class emergencypurchaseorder extends BaseController $NOOfTrip = $this->input->post('NoOfTrip'.$i); $InsuranceValue = $this->input->post('Insval'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i); + $revenuedescription = $this->input->post('service_description'.$i); $CostCenter = $this->input->post('costCode'.$i); $Cgst = $this->input->post('RevenueCgst'.$i); $Sgst = $this->input->post('RevenueSgst'.$i); @@ -380,8 +396,8 @@ class emergencypurchaseorder extends BaseController $ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails); - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); - + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription); + //print_r($POLineItemList); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); $LineItemNo = ''; @@ -395,7 +411,7 @@ class emergencypurchaseorder extends BaseController { // 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,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt, 'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip); - + //print_r($RevenueTaxList); $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); //echo 'Revenue tax Success'; } diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index 405cebb3..cd919396 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -99,6 +99,20 @@ if(!empty($INRSYMBOL)) tinymce.init({ selector: "textarea#EdittxtSpcialInstructionSingle", //service Edit model description service + menubar: false, + statusbar: false, + toolbar: false + }); + tinymce.init({ + selector: "textarea#Add_Service_Description", //service Edit model description service + + menubar: false, + statusbar: false, + toolbar: false + }); + tinymce.init({ + selector: "textarea#Edit_Service_Description", //service Edit model description service + menubar: false, statusbar: false, toolbar: false @@ -2529,6 +2543,7 @@ function populateValueMainFormForDeleteItem(rowid) ?> + @@ -3372,6 +3387,14 @@ function populateValueMainFormForDeleteItem(rowid) ?> + +