budget check removal

This commit is contained in:
venbatechnologies@gmail.com 2018-01-31 10:56:07 +05:30
parent bb52eb2e0a
commit 4704039c45
20 changed files with 809 additions and 288 deletions

View File

@ -952,6 +952,9 @@ class purchaseorder extends BaseController
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$BudgetType = $this->input->post('Budget');
//$PoRange = $this->input->post('txtPoRange'); //$PoRange = $this->input->post('txtPoRange');
$Modeofshipment=$this->input->post('addmodeofshipment'); $Modeofshipment=$this->input->post('addmodeofshipment');
@ -985,7 +988,7 @@ class purchaseorder extends BaseController
$Qualitycheck=1; $Qualitycheck=1;
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
// print_r($POList); // print_r($POList);
// die(); // die();
@ -1115,6 +1118,8 @@ class purchaseorder extends BaseController
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange'); $PoRange = $this->input->post('txtPoRange');
$BudgetType = $this->input->post('Budget');
$SpcialInstruction = $this->input->post('SpcialInstruction'); $SpcialInstruction = $this->input->post('SpcialInstruction');
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$POStatus = $this->input->post('txtStatus'); $POStatus = $this->input->post('txtStatus');
@ -1135,7 +1140,7 @@ class purchaseorder extends BaseController
$Qualitycheck=1; $Qualitycheck=1;
// PO Master // PO Master
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//print_r($POList); //print_r($POList);
//die(); //die();
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
@ -1714,6 +1719,7 @@ function addNewImportPurchaseOrder()
$TotalOrder = $this->input->post('txtToatlOrder'); $TotalOrder = $this->input->post('txtToatlOrder');
$POStatus = $this->input->post('textStatus'); $POStatus = $this->input->post('textStatus');
$BudgetType = $this->input->post('Budget');
$CreateBy = $this->session->userdata ( 'userId' ); $CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('txtRowCount'); $RowCount = $this->input->post('txtRowCount');
@ -1760,7 +1766,7 @@ function addNewImportPurchaseOrder()
$Qualitycheck=1; $Qualitycheck=1;
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//print_r($POList); //print_r($POList);
//die(); //die();
@ -1937,6 +1943,8 @@ function addNewImportPurchaseOrder()
//die(); //die();
$POStatus = $this->input->post('txtStatus'); $POStatus = $this->input->post('txtStatus');
$BudgetType = $this->input->post('Budget');
$CreateBy = $this->session->userdata ( 'userId' ); $CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('txtRowCount'); $RowCount = $this->input->post('txtRowCount');
$DeletedRow = $this->input->post('txtDeletedRow'); $DeletedRow = $this->input->post('txtDeletedRow');
@ -1983,7 +1991,7 @@ function addNewImportPurchaseOrder()
$Qualitycheck=1; $Qualitycheck=1;
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//echo $PONO; //echo $PONO;
//echo $TotalOrder; //echo $TotalOrder;
//print_r($POList); //print_r($POList);
@ -2362,6 +2370,8 @@ function addNewImportPurchaseOrder()
$PaymentMethod = $this->input->post('PaymentMethod'); $PaymentMethod = $this->input->post('PaymentMethod');
$OtherPayment=$this->input->post('Otherpayment'); $OtherPayment=$this->input->post('Otherpayment');
$BudgetType = $this->input->post('Budget');
@ -2383,7 +2393,7 @@ function addNewImportPurchaseOrder()
$Qualitycheck=1; $Qualitycheck=1;
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin); // $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
@ -2624,6 +2634,8 @@ function addNewImportPurchaseOrder()
$InsuranceNo=$this->input->post('insuranceNo'); $InsuranceNo=$this->input->post('insuranceNo');
$ServiceTypeOptions=$this->input->post('PoTypeOptions'); $ServiceTypeOptions=$this->input->post('PoTypeOptions');
$BudgetType = $this->input->post('Budget');
$CreateBy = $this->session->userdata ( 'userId' ); $CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('txtRowCount'); $RowCount = $this->input->post('txtRowCount');
@ -2637,7 +2649,7 @@ function addNewImportPurchaseOrder()
$Qualitycheck=1; $Qualitycheck=1;
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);

View File

@ -100,6 +100,7 @@ class requisitionform extends BaseController
$userID = $this->session->userdata ( 'userId' ); $userID = $this->session->userdata ( 'userId' );
$data['ReqDetails'] = $this->requistion_model->getRequistDetails($ReqNo,'Yes'); $data['ReqDetails'] = $this->requistion_model->getRequistDetails($ReqNo,'Yes');
//print_r($data['ReqDetails']);
$this->load->model('purchaseorder_model'); $this->load->model('purchaseorder_model');
$POType= $this->purchaseorder_model->GetPOType($ReqNo); $POType= $this->purchaseorder_model->GetPOType($ReqNo);
$ReqPOType = ''; $ReqPOType = '';

View File

@ -233,6 +233,8 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$BudgetType = $this->input->post('Budget');
$SpcialInstruction = $this->input->post('ScopeOfWork'); $SpcialInstruction = $this->input->post('ScopeOfWork');
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$POStatus = $this->input->post('txtStatus'); $POStatus = $this->input->post('txtStatus');
@ -248,7 +250,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
$WorkStatus=$this->input->post('workstatus'); $WorkStatus=$this->input->post('workstatus');
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus, 'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption, 'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus, 'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption, 'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'BudgetType'=>$BudgetType);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
@ -370,6 +372,8 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$BudgetType = $this->input->post('Budget');
$SpcialInstruction = $this->input->post('ScopeofWork'); $SpcialInstruction = $this->input->post('ScopeofWork');
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$POStatus = $this->input->post('txtStatus'); $POStatus = $this->input->post('txtStatus');
@ -385,7 +389,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'BudgetType'=>$BudgetType);
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);

View File

@ -160,7 +160,7 @@ TMD.QuantityRejected,ST.StatusName,TMD.Remarks,AdvanceAmount ');
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO = POMR.PONO');//to get podate,deliverydate,servicedescription $this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO = POMR.PONO');//to get podate,deliverydate,servicedescription
// $this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO');//to get receivedquantity,quantity // $this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO');//to get receivedquantity,quantity
$this->db->join('T_PurchaseOrder_LineItem Line','TMM.PONO=Line.PONO and TMD.MaterialCode=Line.MaterialCode'); $this->db->join('T_PurchaseOrder_LineItem Line','TMM.PONO=Line.PONO and TMD.MaterialCode=Line.MaterialCode');
$this->db->join('T_CostCenter_Master COST','Line.CostCenterCode=COST.CostCenterCode'); $this->db->join('T_CostCenter_Master COST','Line.CostCenterCode=COST.CostCenterCode','left');
//$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO = IGRM.IGRNO');//to get invoicequantity //$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO = IGRM.IGRNO');//to get invoicequantity
$this->db->join('T_IGR_Details IGRD','IGRD.IGRNO = TMM.IGRNO and TMD.MaterialCode=IGRD.MaterialCode'); $this->db->join('T_IGR_Details IGRD','IGRD.IGRNO = TMM.IGRNO and TMD.MaterialCode=IGRD.MaterialCode');
$this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode'); $this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode');

View File

@ -707,7 +707,7 @@ function GetPOType($ReqNo)
function GetServicePurchaseOrder($PONO = '') function GetServicePurchaseOrder($PONO = '')
{ {
$this->db->distinct(); $this->db->distinct();
$this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue'); $this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType');
$this->db->from('T_PurchaseOrder_Master POMast'); $this->db->from('T_PurchaseOrder_Master POMast');
$this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID');
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
@ -1355,7 +1355,7 @@ function GetCurrencytype()
$this->db->join('T_PurchaseOrder_LineItem req', 'req.PONO= mast.PONO'); $this->db->join('T_PurchaseOrder_LineItem req', 'req.PONO= mast.PONO');
$this->db->join('T_Requestion_Master rmast','rmast.ReqNo=req.ReqNo'); $this->db->join('T_Requestion_Master rmast','rmast.ReqNo=req.ReqNo');
//$this->db->join('T_CostCenter_Budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType'); //$this->db->join('T_CostCenter_Budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType');
$this->db->join('T_CostCenter_Master ccm','ccm.CostCenterCode = req.CostCenterCode'); $this->db->join('T_CostCenter_Master ccm','ccm.CostCenterCode = req.CostCenterCode','left');
$this->db->join('tbl_users tbl', 'rmast.createdby=tbl.userid'); $this->db->join('tbl_users tbl', 'rmast.createdby=tbl.userid');
$this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid'); $this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid');
$this->db->join('T_DepartmentDetails as Dep','Dep.DEPCode=emp.Departmentcode'); $this->db->join('T_DepartmentDetails as Dep','Dep.DEPCode=emp.Departmentcode');

View File

@ -290,13 +290,14 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
$subQuery = 'select distinct ReqNo,ReqType,Status,Requestedby,DATE_FORMAT(mast.CreatedDate, "%d-%m-%Y") as CreatedDate,Schedule_Type,NumberOfService,Service_Period ,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,DATE_FORMAT(mast.ReqDate, "%d-%m-%Y") as ReqDate,mast.CostCenterCode,Cost.CostCenterName $subQuery = 'select distinct ReqNo,ReqType,Status,Requestedby,DATE_FORMAT(mast.CreatedDate, "%d-%m-%Y") as CreatedDate,Schedule_Type,NumberOfService,Service_Period ,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,DATE_FORMAT(mast.ReqDate, "%d-%m-%Y") as ReqDate,mast.CostCenterCode,Cost.CostCenterName
from T_Requestion_Master mast from T_Requestion_Master mast
join T_CostCenter_Master Cost on Cost.CostCenterCode = mast.CostCenterCode left join T_CostCenter_Master Cost on Cost.CostCenterCode = mast.CostCenterCode
join T_Employee_Details emp on mast.Requestedby = emp.EmpID join T_Employee_Details emp on mast.Requestedby = emp.EmpID
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode
where ReqNo=?'; where ReqNo=?';
$query = $this->db->query($subQuery, array($ReqID)); $query = $this->db->query($subQuery, array($ReqID));
// print_r($this->db->last_query());
if($NoArray == '') if($NoArray == '')
{ {
return $query->result_array(); return $query->result_array();

View File

@ -36,6 +36,7 @@ array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
$InsuranceNo=''; $InsuranceNo='';
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$DescriptionOfPo = ''; $DescriptionOfPo = '';
$BudgetType = '';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
@ -88,10 +89,12 @@ if(!empty($POMaster))
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service; $DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
} }
} }
//echo $BudgetType;
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {
@ -533,15 +536,15 @@ function ExceedQuantityCheck()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function calculateServiceTax(varBasicValue) function calculateServiceTax(varBasicValue)
{ {
@ -1079,6 +1082,34 @@ $(document).ready(function () {
</div> </div>
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -2261,6 +2292,10 @@ $(document).ready(function () {
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>"> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) { <?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?> if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <?php }?> <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <?php }?>
@ -2323,6 +2358,18 @@ var userid = '';
}; };
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$('#EditotherDescription').hide(); $('#EditotherDescription').hide();
$('#otherdescription').hide() $('#otherdescription').hide()
@ -2959,11 +3006,11 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Other Payment Details'); alert('Please Enter Other Payment Details');
$('#Otherpayment').focus(); $('#Otherpayment').focus();

View File

@ -257,6 +257,13 @@ function vaildateBeforeOpenModal()
} }
else if($('#BudgetType').val()=="0")
{
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
}
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
{ {
@ -737,6 +744,24 @@ function vaildateBeforeOpenModal()
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<?php
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
?>
</div>
</div> </div>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -2526,6 +2551,7 @@ function vaildateBeforeOpenModal()
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" /> <input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<!--<input type="hidden" name="CapitalToatlOrder" id="CapitalToatlOrder" /> --> <!--<input type="hidden" name="CapitalToatlOrder" id="CapitalToatlOrder" /> -->
@ -2605,6 +2631,17 @@ function vaildateBeforeOpenModal()
}; };
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$(function() { $(function() {
$("#PODate").datepicker({ $("#PODate").datepicker({
@ -3514,16 +3551,16 @@ CalculateCtable()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
var index=1; var index=1;
/* This is used add capital po line item */ /* This is used add capital po line item */
@ -3772,16 +3809,16 @@ CalculateCtable()
else{ else{
basicAmountRate=parseFloat(basicAmountRate) - parseFloat(discountRate); basicAmountRate=parseFloat(basicAmountRate) - parseFloat(discountRate);
} }
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#CPRate').focus(); // $('#CPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function validateCapitalTax() function validateCapitalTax()
@ -4687,11 +4724,11 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
$('#Otherpayment').focus(); $('#Otherpayment').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) { // else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#PoTypeOptions').val()== "0") else if($('#PoTypeOptions').val()== "0")
{ {
@ -5287,16 +5324,16 @@ var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#t
else{ else{
basicAmountRate=parseFloat(basicAmountRate)- parseFloat(discountRate); basicAmountRate=parseFloat(basicAmountRate)- parseFloat(discountRate);
} }
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditCPRate').focus(); // $('#EditCPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -85,6 +85,9 @@
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$FinalTotalBasic = 0; $FinalTotalBasic = 0;
$BudgetType = '';
$INR=''; $INR='';
$INRSYM=''; $INRSYM='';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
@ -170,6 +173,7 @@ if(!empty($POMaster))
$InsuranceOptions=$Req->InsuranceStatus; $InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
} }
} }
@ -875,6 +879,35 @@ document.getElementById('dispatchinternational').style.display = 'block';
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -2315,6 +2348,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
var SelectedMaterialList = { var SelectedMaterialList = {
Mat: [] Mat: []
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
var index=<?php echo $index; ?> +1; var index=<?php echo $index; ?> +1;
var myArray = <?php echo json_encode($res_arr_values); ?>; var myArray = <?php echo json_encode($res_arr_values); ?>;
@ -2977,16 +3012,16 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -3001,16 +3036,16 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
var basicAmountRate = parseFloat($('#CPTotalAmount').val()); var basicAmountRate = parseFloat($('#CPTotalAmount').val());
var totalAmount = parseFloat($('#txtTotalOrderValue').val()); var totalAmount = parseFloat($('#txtTotalOrderValue').val());
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#CPRate').focus(); // $('#CPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function validateCapitalTax() function validateCapitalTax()
@ -3423,11 +3458,11 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(basicamt)) { // else if(parseInt(AvlBudAmt) < parseInt(basicamt)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else else
{ {
@ -4005,16 +4040,16 @@ function validateEditCapitalTax()
var basicAmountRate = parseFloat($('#EditCPTotalAmount').val()); var basicAmountRate = parseFloat($('#EditCPTotalAmount').val());
var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val()); var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val());
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditCPRate').focus(); // $('#EditCPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -90,6 +90,8 @@
$InsuranceOptions=''; $InsuranceOptions='';
$InsuranceNo=''; $InsuranceNo='';
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$BudgetType = '';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
{ {
foreach ($INRSYMBOL as $INR) foreach ($INRSYMBOL as $INR)
@ -165,6 +167,7 @@ if(!empty($POMaster))
$InsuranceOptions=$Req->InsuranceStatus; $InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
} }
@ -884,6 +887,34 @@ $("#PaymentMethod").select2();
</div> </div>
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
</div> </div>
@ -3756,6 +3787,8 @@ $("#PaymentMethod").select2();
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) <?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED )
{ {
@ -3867,6 +3900,17 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
}); });
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$(function() { $(function() {
$("#PODate").datepicker({ $("#PODate").datepicker({
@ -4747,16 +4791,16 @@ if(isNaN(CustomDutyExpenses))
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -4994,16 +5038,16 @@ if(isNaN(CustomDutyExpenses))
else{ else{
basicAmountRate=parseFloat(basicAmountRate) - parseFloat(discountRate); basicAmountRate=parseFloat(basicAmountRate) - parseFloat(discountRate);
} }
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#CPRate').focus(); // $('#CPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
function validateCapitalTax() function validateCapitalTax()
@ -6132,11 +6176,11 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
$('#Otherpayment').focus(); $('#Otherpayment').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) { // else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else else
{ {
@ -6884,16 +6928,16 @@ var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#t
else{ else{
basicAmountRate=parseFloat(basicAmountRate)- parseFloat(discountRate); basicAmountRate=parseFloat(basicAmountRate)- parseFloat(discountRate);
} }
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditCPRate').focus(); // $('#EditCPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -114,6 +114,9 @@ $StatusName='';
$Reqon = ''; $Reqon = '';
$Requestedby=''; $Requestedby='';
$RequesterName=''; $RequesterName='';
$BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
foreach ($POMaster as $Req) foreach ($POMaster as $Req)
@ -161,6 +164,7 @@ if(!empty($POMaster))
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$Importoption=$Req->POSubType; $Importoption=$Req->POSubType;
$InsuranceStatus=$Req->InsuranceStatus; $InsuranceStatus=$Req->InsuranceStatus;
$BudgetType = $Req->BudgetType;
} }
} }
@ -821,6 +825,32 @@ if(!empty($RequistionDetails))
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -1953,6 +1983,10 @@ var NilType = '<?php echo NILTYPE;?>';
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
$('#Insurance').change(function() { $('#Insurance').change(function() {
//var insure=$('#Insurance').val(); //var insure=$('#Insurance').val();
@ -3329,16 +3363,16 @@ function Budgetcheck()
var totordring=totalorderedamount*Exchange; var totordring=totalorderedamount*Exchange;
var TotalSum=totavlbud; var TotalSum=totavlbud;
//console.log(TotalSum); //console.log(TotalSum);
if(totordring>TotalSum) // if(totordring>TotalSum)
{ // {
alert('You are Exceeding The Budget Amount'); // alert('You are Exceeding The Budget Amount');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -65,6 +65,7 @@ foreach ($PaymentTerms as $TER)
$revenuesubtype=''; $revenuesubtype='';
$insurencestatus=''; $insurencestatus='';
$insurenceno=''; $insurenceno='';
$BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
@ -103,9 +104,12 @@ if(!empty($POMaster))
$revenuesubtype = $Req->POSubType; $revenuesubtype = $Req->POSubType;
$insurencestatus = $Req->InsuranceStatus; $insurencestatus = $Req->InsuranceStatus;
$insurenceno = $Req->InsuranceNumber; $insurenceno = $Req->InsuranceNumber;
$BudgetType = $Req->BudgetType;
} }
} }
//echo $BudgetType;
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {
@ -881,16 +885,16 @@ function validateEditExceedLimit()
var discount = parseFloat($('#txtEditAfterDiscount').val()); var discount = parseFloat($('#txtEditAfterDiscount').val());
basicAmountRate = basicAmountRate - discount; basicAmountRate = basicAmountRate - discount;
//alert(basicAmountRate+'-'+avalbudAmt+'-'+discount); //alert(basicAmountRate+'-'+avalbudAmt+'-'+discount);
if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt) // if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); // $('#EditRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function calculateEditTotalValue() function calculateEditTotalValue()
@ -1311,6 +1315,34 @@ function calculateEditTaxValue()
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div> </div>
@ -2159,6 +2191,8 @@ function calculateEditTaxValue()
var index = '1'; var index = '1';
var userid = ''; var userid = '';
$('#BudgetType').attr("style", "pointer-events: none;");
$("#EDITREVENUE").on("shown.bs.modal", function(e) { $("#EDITREVENUE").on("shown.bs.modal", function(e) {
var AvlBudAmt = '<?php echo $AvlAmount?>'; var AvlBudAmt = '<?php echo $AvlAmount?>';
@ -2563,21 +2597,21 @@ function validateBudgetExceedLimit()
{ {
//alert(data); //alert(data);
avalbudAmt = parseFloat(data); avalbudAmt = parseFloat(data);
if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt) // if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('.content').loader('hide'); // $('.content').loader('hide');
$('#Rate').focus(); // $('#Rate').focus();
return false; // return false;
} // }
else // else
{ // {
//alert('Not exceeding in else part'); //alert('Not exceeding in else part');
return true; return true;
} //}
} }
@ -2619,11 +2653,11 @@ var txtTotalDiscount = $('#txtTotalDiscount').val();
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < (parseInt(txtTotBasicAmount) - parseInt(txtTotalDiscount))) { // else if(parseInt(AvlBudAmt) < (parseInt(txtTotBasicAmount) - parseInt(txtTotalDiscount))) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else else
{ {
//alert('final else for store data'); //alert('final else for store data');

View File

@ -73,6 +73,7 @@ foreach ($PaymentTerms as $TER)
$ServiceDescription = ''; $ServiceDescription = '';
$CapitalRange = ''; $CapitalRange = '';
$otherPayment=''; $otherPayment='';
$BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
//print_r($POMaster); //print_r($POMaster);
@ -106,11 +107,13 @@ if(!empty($POMaster))
$revenuesubtype = $Req->POSubType; $revenuesubtype = $Req->POSubType;
$insurencestatus = $Req->InsuranceStatus; $insurencestatus = $Req->InsuranceStatus;
$insurenceno = $Req->InsuranceNumber; $insurenceno = $Req->InsuranceNumber;
$BudgetType = $Req->BudgetType;
// echo $insurenceno; // echo $insurenceno;
// echo $otherPayment; // echo $otherPayment;
} }
} }
//echo $BudgetType;
@ -204,6 +207,24 @@ if(!empty($RequistionDetails))
var SchName = <?php echo json_encode($DeliverSchedule); ?>; var SchName = <?php echo json_encode($DeliverSchedule); ?>;
var DelDt = '<?php echo $Deliverydt; ?>'; var DelDt = '<?php echo $Deliverydt; ?>';
var insurancestatus = '<?php echo $insurencestatus;?>'; var insurancestatus = '<?php echo $insurencestatus;?>';
//alert(insurancestatus)
var budgettype='<?php echo $BudgetType;?>';
// if(budgettype == 'CAPITAL')
// {
// alert('capital')
// document.getElementById('BudgetType').text = 2;
// document.getElementById('BudgetType').value = 'player';
// $('[name=BudgetType]').val(budgettype);
//}
//else
//{
// alert('revenue')
//document.getElementById('BudgetType').text = 1;
// document.getElementById('BudgetType').value = 'player';
//}
//alert(budgettype);
var insuranceno = '<?php echo $insurenceno;?>'; var insuranceno = '<?php echo $insurenceno;?>';
var statuscheck='<?php echo $PONOStatus;?>'; var statuscheck='<?php echo $PONOStatus;?>';
@ -2084,16 +2105,16 @@ function validateEditExceedLimit()
var basicAmountRate = parseFloat($('#txtEditBasicValue').val()); var basicAmountRate = parseFloat($('#txtEditBasicValue').val());
var totalAmount = parseFloat($('#txtEditTotalOrderValue').val()); var totalAmount = parseFloat($('#txtEditTotalOrderValue').val());
if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt) // if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); // $('#EditRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function calculateEditTotalValue() function calculateEditTotalValue()
@ -2518,6 +2539,29 @@ function calculateEditTaxValue()
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div> </div>
@ -4123,6 +4167,9 @@ function calculateEditTaxValue()
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>"> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/> <input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) { <?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?> if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <?php }?> <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <?php }?>
@ -4179,6 +4226,19 @@ function calculateEditTaxValue()
var index = <?php echo $index; ?>; var index = <?php echo $index; ?>;
var userid = ''; var userid = '';
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$("#REVENUE").on("shown.bs.modal", function(e) { $("#REVENUE").on("shown.bs.modal", function(e) {
$('#isEdit').val(0); $('#isEdit').val(0);
@ -4186,7 +4246,7 @@ $("#REVENUE").on("shown.bs.modal", function(e) {
$('.AddRevenue').click(function(){ $('.AddRevenue').click(function(){
tinyMCE.triggerSave(); tinyMCE.triggerSave();
if(validateRevenueTax() && validateExceedLimit() && ExceedQuantityCheck()) if(validateRevenueTax() && ExceedQuantityCheck())
{ {
var temp = parseInt(index)+1; var temp = parseInt(index)+1;
var Reqnumber = $('#ReqNo').val(); var Reqnumber = $('#ReqNo').val();
@ -4717,17 +4777,17 @@ function validateBudgetExceedLimit()
{ {
//alert(data); //alert(data);
avalbudAmt = parseFloat(data); avalbudAmt = parseFloat(data);
if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt) // if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#Rate').focus(); // $('#Rate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -4928,11 +4988,11 @@ var totaldiscount = $('#txtTotalDiscount').val();
//{ //{
// return false; // return false;
//} //}
else if(parseInt(AvlBudAmt) < (parseInt(txtTotalbasicamount)- parseInt(totaldiscount))){ // else if(parseInt(AvlBudAmt) < (parseInt(txtTotalbasicamount)- parseInt(totaldiscount))){
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Payable Terms Description'); alert('Please Enter Payable Terms Description');

View File

@ -38,6 +38,8 @@
$InsuranceNo=''; $InsuranceNo='';
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$DescriptionOfPo = ''; $DescriptionOfPo = '';
$BudgetType = '';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
{ {
@ -92,10 +94,14 @@
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service; $DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
} }
} }
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {
@ -600,15 +606,15 @@ function IGSTchange()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -1065,6 +1071,34 @@ $(document).ready(function () {
</div> </div>
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -1661,6 +1695,9 @@ var userid = '';
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
$('#EditotherDescription').hide(); $('#EditotherDescription').hide();
$("#EDITSERVICE").on("shown.bs.modal", function(e) { $("#EDITSERVICE").on("shown.bs.modal", function(e) {
@ -2223,12 +2260,12 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if(validate()) if(validate())
{ {
if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Other Payment Details'); alert('Please Enter Other Payment Details');
$('#Otherpayment').focus(); $('#Otherpayment').focus();
return false; return false;

View File

@ -121,6 +121,7 @@ $SupplierRef='';
$SupOfferno=''; $SupOfferno='';
$Otherref=''; $Otherref='';
$Fincap=''; $Fincap='';
$BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
@ -168,6 +169,7 @@ if(!empty($POMaster))
$Insurance=$Req->InsuranceStatus; $Insurance=$Req->InsuranceStatus;
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$Importoption=$Req->POSubType; $Importoption=$Req->POSubType;
$BudgetType = $Req->BudgetType;
} }
} }
@ -829,6 +831,34 @@ tinymce.init({
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if($BudgetType== 'CAPITAL')
{
$opt1='CAPITAL';
$opt2='REVENUE';
}
else
{
$opt1='REVENUE';
$opt2='CAPITAL';
} ?>
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -3030,6 +3060,8 @@ echo form_textarea($data);
<input type="hidden" name="txtRow" id="txtRow" value="<?php echo $index;?>"/> <input type="hidden" name="txtRow" id="txtRow" value="<?php echo $index;?>"/>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/> <input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) { <?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
if($PONOStatus == PO_DRAFT){?> if($PONOStatus == PO_DRAFT){?>
@ -3138,6 +3170,18 @@ var NilType = '<?php echo NILTYPE;?>';
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$('#Importoption').attr("style", "pointer-events: none;"); $('#Importoption').attr("style", "pointer-events: none;");
$('#Insurance').change(function() { $('#Insurance').change(function() {
@ -4330,16 +4374,16 @@ function validateEditExceedLimit()
exp=basicAmountRate*exchangerate; exp=basicAmountRate*exchangerate;
//console.log(exp); //console.log(exp);
if(exp > totavlbud || totalAmount > totavlbud) // if(exp > totavlbud || totalAmount > totavlbud)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); // $('#EditRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -4368,16 +4412,16 @@ var totavlbud=avalbudAmt+Sum;
exp=basicAmountRate*exchangerate; exp=basicAmountRate*exchangerate;
//console.log(exp); //console.log(exp);
if(exp > totavlbud || totalAmount > totavlbud) // if(exp > totavlbud || totalAmount > totavlbud)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#Rate').focus(); // $('#Rate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -5681,16 +5725,16 @@ function Budgetcheck()
var totordring=totalorderedamount*Exchange; var totordring=totalorderedamount*Exchange;
var TotalSum=totavlbud; var TotalSum=totavlbud;
//console.log(TotalSum); //console.log(TotalSum);
if(totordring>TotalSum) // if(totordring>TotalSum)
{ // {
alert('You are Exceeding The Budget'); // alert('You are Exceeding The Budget');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -34,6 +34,8 @@ if(!empty($ReqDetails))
} }
} }
//echo $ReqType;
$description=''; $description='';

View File

@ -63,6 +63,8 @@ if(!empty($AvlimportBudAmt))
} }
//echo $AvlAmount;
// if(!empty($AvlBudAmt)) // if(!empty($AvlBudAmt))
// { // {
@ -231,6 +233,14 @@ function vaildateBeforeOpenModal()
} }
else if($('#BudgetType').val()=="0")
{
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
}
@ -681,6 +691,24 @@ function vaildateBeforeOpenModal()
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<?php
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
?>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -2029,6 +2057,9 @@ echo form_textarea($data);
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" /> <input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a>
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a> <a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="reset" class="btn btn-primary" value="Reset" onclick="window.location.reload()"> <input type="reset" class="btn btn-primary" value="Reset" onclick="window.location.reload()">
@ -2101,6 +2132,17 @@ $(document).on('change',".changetodecimal", function(){
}); });
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
var SelectedMaterialCode = []; var SelectedMaterialCode = [];
var RequistQuantity = ''; var RequistQuantity = '';
var AvilBudAmt = ''; var AvilBudAmt = '';
@ -2292,6 +2334,16 @@ $("#txtBasicValue").val('');
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>; var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
var AvlBudAmt ='<?php echo $AvlimportBudAmt ?>'; var AvlBudAmt ='<?php echo $AvlimportBudAmt ?>';
//alert(AvlBudAmt);
if(AvlBudAmt == '')
{
$("#AvlBudAmt").val(parseFloat(0).toFixed(2));
}
else
{
$("#AvlBudAmt").val(parseFloat(AvlBudAmt).toFixed(2));
}
//alert(Material); //alert(Material);
// For Binding DepartmentName // For Binding DepartmentName
@ -2305,7 +2357,7 @@ $("#txtBasicValue").val('');
}); });
//$("#AvlBudAmt").val(AvlBudAmt); //$("#AvlBudAmt").val(AvlBudAmt);
$("#AvlBudAmt").val(parseFloat(AvlBudAmt).toFixed(2)); // $("#AvlBudAmt").val(parseFloat(AvlBudAmt).toFixed(2));
// For Binding Cost center for the selected department // For Binding Cost center for the selected department
/* $("#CostCenter").append( $('<option></option>').val("0").html("Select Cost Center") ); /* $("#CostCenter").append( $('<option></option>').val("0").html("Select Cost Center") );
$.each(cost, function(idx, obj) { $.each(cost, function(idx, obj) {
@ -2663,6 +2715,7 @@ if(isNaN(txtINR))
var avalbudAmte= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>; var avalbudAmte= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
//alert(avalbudAmte)
function validateEditExceedLimit() function validateEditExceedLimit()
{ {
//var avalbudAmt = parseFloat($('#EditAvlBudAmt').val()); //var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
@ -2673,16 +2726,16 @@ function validateEditExceedLimit()
exp=basicAmountRate*exchangerate; exp=basicAmountRate*exchangerate;
//console.log(exp); //console.log(exp);
if(exp > avalbudAmte || totalAmount > avalbudAmte) // if(exp > avalbudAmte || totalAmount > avalbudAmte)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); // $('#EditRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -2705,16 +2758,16 @@ var avalbudAmt= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
exp=basicAmountRate*exchangerate; exp=basicAmountRate*exchangerate;
//console.log(exp); //console.log(exp);
if(exp > avalbudAmt || totalAmount > avalbudAmt) // if(exp > avalbudAmt || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#Rate').focus(); // $('#Rate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -4493,16 +4546,16 @@ function Budgetcheck()
var totordring=totalorderedamount*Exchange; var totordring=totalorderedamount*Exchange;
var TotalSum=avalbudAmte; var TotalSum=avalbudAmte;
if(totordring>TotalSum) // if(totordring>TotalSum)
{ // {
alert('You are Exceeding The Budget'); // alert('You are Exceeding The Budget');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }

View File

@ -124,6 +124,7 @@ if(!empty($INRSYMBOL))
function openModal() function openModal()
{ {
if(vaildateBeforeOpenModal()) if(vaildateBeforeOpenModal())
{ {
$('#REVENUE').modal('show'); $('#REVENUE').modal('show');
@ -181,6 +182,14 @@ function vaildateBeforeOpenModal()
$('#PoTypeOptions').focus(); $('#PoTypeOptions').focus();
return false; return false;
}
else if($('#BudgetType').val()=="0")
{
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
} }
else else
@ -2137,16 +2146,16 @@ function validateEditExceedLimit()
//alert(basicAmountRate); //alert(basicAmountRate);
// var totalAmount = parseFloat($('#txtEditTotalOrderValue').val()); // var totalAmount = parseFloat($('#txtEditTotalOrderValue').val());
if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt) // if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
{ // {
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); // $('#EditRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function calculateEditTotalValue() function calculateEditTotalValue()
@ -2521,7 +2530,25 @@ function calculateEditTaxValue()
?> ?>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<?php
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
?>
</div>
</div> </div>
</div> </div>
@ -3587,6 +3614,7 @@ function calculateEditTaxValue()
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" /> <input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a>
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a> <a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn-primary Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a> <a class="btn btn-primary Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
@ -3644,6 +3672,18 @@ $("#insurance").change(function(){
$("#insuranceno").val('Yes');} $("#insuranceno").val('Yes');}
}); });
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$("#EDITREVENUE").on("shown.bs.modal", function(e) { $("#EDITREVENUE").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
@ -3760,7 +3800,7 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
}); });
$('.AddRevenue').click(function(){ $('.AddRevenue').click(function(){
tinyMCE.triggerSave(); tinyMCE.triggerSave();
if(validateRevenueTax() && validateExceedLimit() && ExceedQuantityCheck()) if(validateRevenueTax()&& ExceedQuantityCheck())
{ {
var temp = index; var temp = index;
var Reqnumber = $('#ReqNo').val(); var Reqnumber = $('#ReqNo').val();
@ -4278,11 +4318,11 @@ var AvlBudAmt = '<?php echo $AvlAmount ?>';
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(finalBasicAmount)) { // else if(parseInt(AvlBudAmt) < parseInt(finalBasicAmount)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Payable Terms Description'); alert('Please Enter Payable Terms Description');
$('#Otherpayment').focus(); $('#Otherpayment').focus();

View File

@ -704,11 +704,11 @@ function validate()
alert('Please Add Line Item'); alert('Please Add Line Item');
return false; return false;
} }
else if(isExceed == 1) // else if(isExceed == 1)
{ // {
alert('You dont have Budget and You cant Raise New Requisition'); // alert('You dont have Budget and You cant Raise New Requisition');
return false; // return false;
} // }
else else
{ {
return true; return true;
@ -747,15 +747,15 @@ function validateBeforeAdd()
} }
else if($("#CostCenter").val() == '-1') else if($("#CostCenter").val() == '-1')
{ {
alert('Please select the Cost center to check the Budget Availablity '); alert('Please select the Cost center');
$("#CostCenter").focus(); $("#CostCenter").focus();
return false; return false;
} }
else if( isExceed == '1') // else if( isExceed == '1')
{ // {
alert('You dont have available Budget Amount. You cant raise new Requisition'); // alert('You dont have available Budget Amount. You cant raise new Requisition');
return false; // return false;
} // }
else else
{ {
$('#myModal1').modal('show'); $('#myModal1').modal('show');

View File

@ -528,15 +528,15 @@ function ExceedQuantityCheck()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -1001,6 +1001,26 @@ function clearEditTaxField()
</div> </div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<?php
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
?>
</div>
</div> </div>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -1708,6 +1728,7 @@ function clearEditTaxField()
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" > <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" >
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" > <input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" >
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-primary Save" ID="Save"onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> <a class="btn btn-primary Save" ID="Save"onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a>
<a class="btn btn-primary Submit" ID="Submit"onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a> <a class="btn btn-primary Submit" ID="Submit"onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn-primary Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a> <a class="btn btn-primary Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
@ -1748,6 +1769,21 @@ function clearEditTaxField()
$('#otherdescription').hide(); $('#otherdescription').hide();
var index = '1'; var index = '1';
var userid = ''; var userid = '';
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$("#EDITSERVICE").on("shown.bs.modal", function(e) { $("#EDITSERVICE").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
@ -2424,11 +2460,11 @@ var AvlBudAmt = '<?php echo $AvlAmount ?>';
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false; // return false;
} // }
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Other Payable Terms Description'); alert('Please Enter Other Payable Terms Description');
$('#Otherpayment').focus(); $('#Otherpayment').focus();