diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php index aef1cf8a..e47a1daf 100755 --- a/app/Controllers/Amendmentpurchaseorder.php +++ b/app/Controllers/Amendmentpurchaseorder.php @@ -292,6 +292,8 @@ class Amendmentpurchaseorder extends BaseController $POStatus = $this->request->getPost('txtStatus'); $updatedBy = $this->session->get('userId'); $RowCount = $this->request->getPost('txtRowCount'); + $BudgetType = $this->request->getPost('Budget'); + $updateddt = get_current_date_time(); $qtycheck = $this->purchaseorder_model->getqtycheck($PONO); @@ -308,8 +310,7 @@ class Amendmentpurchaseorder extends BaseController $Otherpayment = ''; } $AmendmentNewPoNo = generate_amendment_po_number($PONO); - - $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $Local_Interstate, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); + $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $Local_Interstate, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult,'CapitalRange' => $Local_Interstate,'BudgetType' => $BudgetType); // not $file = $this->request->getFile('POFile'); $requestfilename = $file->getName(); $PrePOFile = $this->request->getPost('PrePOFile'); @@ -551,7 +552,7 @@ class Amendmentpurchaseorder extends BaseController if($itemRate != 0){ $this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); } - $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); + $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,'LineitemAuditorNotes'=>$LineitemAuditorNotes); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); @@ -597,6 +598,7 @@ class Amendmentpurchaseorder extends BaseController */ function UpdateAmendServicePurchaseOrder() { + // dd($this->request->getPost()); $PONO = $this->request->getPost('txtPONO'); @@ -1316,6 +1318,8 @@ class Amendmentpurchaseorder extends BaseController */ function EditAmendImportPO() { + // echo "
"; print_r($this->request->getPost()); echo""; + $MAD = ''; $PONO = $this->request->getPost('txtPONO'); @@ -1440,7 +1444,7 @@ class Amendmentpurchaseorder extends BaseController if (count($LastPO) > 0) { $NewPO = $LastPO[0]['PONO']; } - + if( $changeStatus == "ST026" || $changeStatus == "ST014"){ $PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS @@ -1662,8 +1666,9 @@ class Amendmentpurchaseorder extends BaseController if (count($POLineItem) > 0) { $LineItemNo = $POLineItem[0]['LineItemNo']; } + - $ImportTaxList = array('LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NoOfTrip, 'FreightValue' => $Freightrate, 'AfterFreightValue' => $Freightamount, 'AssessableValue' => $Assable, 'SubTotal' => $Subtotal, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge,'LineitemAuditorNotes' => $LineitemAuditorNotes); + $ImportTaxList = array('LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NoOfTrip, 'FreightValue' => $Freightrate, 'AfterFreightValue' => $Freightamount, 'AssessableValue' => $Assable, 'SubTotal' => $Subtotal, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge); $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); } diff --git a/app/Controllers/Requisitionform.php b/app/Controllers/Requisitionform.php index 03557737..287dee63 100755 --- a/app/Controllers/Requisitionform.php +++ b/app/Controllers/Requisitionform.php @@ -126,7 +126,7 @@ class Requisitionform extends BaseController } } } - //print_r($POType); + // print_r($POType); // echo 'ReqType'.$ReqPOType; $data['ReqPOType'] = $ReqPOType == '' ? $ReqType : $ReqPOType; $data['LineItem'] = $this->requistion_model->getEditRequistItemList($ReqNo); diff --git a/app/Models/Requistion_model.php b/app/Models/Requistion_model.php index b5d7879d..e4cfd50b 100755 --- a/app/Models/Requistion_model.php +++ b/app/Models/Requistion_model.php @@ -14,7 +14,7 @@ class Requistion_model extends Model { $builder = $this->db->table('t_supplierdetailsn') ->select('SupplierID, SupplierName,ADeleteRequistionLineItemddress'); - //->where('roleId !=', 1); + // ->where('roleId !=', 1); $query = $builder->get(); return $query->getResult(); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 00cb718f..7b820d75 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1453,7 +1453,9 @@ if (!empty($getlogpodtl)) { 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + $DescriptionOfPo = html_entity_decode($DescriptionOfPo); + $DescriptionOfPo = strip_tags($DescriptionOfPo); + $data = array('name' => 'editdescofpo', 'value' => set_value('editdescofpo', $DescriptionOfPo), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?> @@ -1467,7 +1469,9 @@ if (!empty($getlogpodtl)) {