diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index bb3d6912..0cb1586d 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -141,17 +141,20 @@ class purchaseorder extends BaseController $Req = $SelectedReq->Req; $data['ReqList'] = $Req ; $ReqArray = array(); - $ReqType = ''; + $ReqType = $this->input->post('txtReqType'); $result = array(); foreach ($Req as $SID): $ReqArray[] = $SID->ReqNo ; $result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo); - $ReqType = $SID->ReqType; + if($ReqType == '') + { + $ReqType = $SID->ReqType; + } endforeach; - + $data['MaterialList'] = $result; //print_r($data['MaterialList']); /* Cost code from Requisition - Client Review Fix @@ -371,6 +374,7 @@ class purchaseorder extends BaseController $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); $data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO); //print_r($data['PaymentTerms']); + $unicode =''; foreach ($data['CurrencyDetail'] as $Detail) { $unicode=$Detail->FontCode2000; @@ -636,7 +640,7 @@ class purchaseorder extends BaseController $SupplierID = $this->input->post('drpSupplier'); $DeliveryAddr = $this->input->post('DeliveryAddr'); $dt = $this->input->post('Deliverydt'); - //$Deliverydt = $this->getDateformat($dt); + $POType = $this->input->post('POType'); $DeliveryOption = $this->input->post('DateRange'); if($DeliveryOption==1){ $Deliverydt = ''; @@ -678,7 +682,7 @@ $DeliveryOption = $this->input->post('DateRange'); $PaymentTerms=$this->input->post('PaymentTerms'); $Payableat=$this->input->post('PayableAT'); // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'POType'=>$POType); $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -779,7 +783,7 @@ $DeliveryOption = $this->input->post('DateRange'); $DeliveryAddr = $this->input->post('txtDeliveryAddress'); $dt = $this->input->post('Deliverydt'); //$Deliverydt = $this->getDateformat($dt); - $DeliveryOption = $this->input->post('DateRange'); + $DeliveryOption = $this->input->post('DateRange'); if($DeliveryOption==1){ $Deliverydt = ''; $DeliverySchedule = $this->input->post('Scheduleby'); @@ -1128,7 +1132,7 @@ function addNewImportPurchaseOrder() - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'POType'=>$POType); //print_r($POList);PaymentDays //die(); @@ -1559,7 +1563,7 @@ $createddt=''; $createddt = $dt->format('Y-m-d H:i:s'); - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'POType'=>$POType); $POMaster = $this->purchaseorder_model->addPOMaster($POList); diff --git a/application/controllers/requisitionform.php b/application/controllers/requisitionform.php index 7cecda2f..f152bc36 100755 --- a/application/controllers/requisitionform.php +++ b/application/controllers/requisitionform.php @@ -39,9 +39,6 @@ class requisitionform extends BaseController $data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID); - - - $this->loadViews("requisitionlisting", $this->global, $data, NULL); } /** @@ -52,7 +49,7 @@ class requisitionform extends BaseController { $this->global['pageTitle'] = 'Siddharth : Raise Requisition'; - $data['RequestType'] = $this->requistion_model->getConfigValue('C004'); + $data['RequestType'] = $this->requistion_model->getConfigValue('C020'); $data['EmpList'] = $this->requistion_model->getAllEmployees(); diff --git a/application/controllers/servicepurchaseorder.php b/application/controllers/servicepurchaseorder.php index 6db7c1f0..591746cd 100755 --- a/application/controllers/servicepurchaseorder.php +++ b/application/controllers/servicepurchaseorder.php @@ -114,7 +114,7 @@ class servicepurchaseorder extends BaseController $WorkStatus=$this->input->post('workstatus'); // 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,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'ServiceWorkStatus'=>$WorkStatus ); + $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,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType ); //print_r($POList); //die(); $POMaster = $this->purchaseorder_model->addPOMaster($POList);