stored procedure update in create poform and requsition form
This commit is contained in:
parent
5e1000b2c7
commit
6afc697d98
0
application/.htaccess
Normal file → Executable file
0
application/.htaccess
Normal file → Executable file
0
application/cache/.htaccess
vendored
Normal file → Executable file
0
application/cache/.htaccess
vendored
Normal file → Executable file
0
application/cache/index.html
vendored
Normal file → Executable file
0
application/cache/index.html
vendored
Normal file → Executable file
0
application/config/autoload.php
Normal file → Executable file
0
application/config/autoload.php
Normal file → Executable file
0
application/config/config.php
Normal file → Executable file
0
application/config/config.php
Normal file → Executable file
0
application/config/constants.php
Normal file → Executable file
0
application/config/constants.php
Normal file → Executable file
0
application/config/database.php
Normal file → Executable file
0
application/config/database.php
Normal file → Executable file
0
application/config/doctypes.php
Normal file → Executable file
0
application/config/doctypes.php
Normal file → Executable file
0
application/config/foreign_chars.php
Normal file → Executable file
0
application/config/foreign_chars.php
Normal file → Executable file
0
application/config/grocery_crud.php
Normal file → Executable file
0
application/config/grocery_crud.php
Normal file → Executable file
0
application/config/hooks.php
Normal file → Executable file
0
application/config/hooks.php
Normal file → Executable file
0
application/config/index.html
Normal file → Executable file
0
application/config/index.html
Normal file → Executable file
0
application/config/migration.php
Normal file → Executable file
0
application/config/migration.php
Normal file → Executable file
0
application/config/mimes.php
Normal file → Executable file
0
application/config/mimes.php
Normal file → Executable file
0
application/config/profiler.php
Normal file → Executable file
0
application/config/profiler.php
Normal file → Executable file
0
application/config/routes.php
Normal file → Executable file
0
application/config/routes.php
Normal file → Executable file
0
application/config/smileys.php
Normal file → Executable file
0
application/config/smileys.php
Normal file → Executable file
0
application/config/user_agents.php
Normal file → Executable file
0
application/config/user_agents.php
Normal file → Executable file
0
application/controllers/Controller.php
Normal file → Executable file
0
application/controllers/Controller.php
Normal file → Executable file
0
application/controllers/CostCenter.php
Normal file → Executable file
0
application/controllers/CostCenter.php
Normal file → Executable file
0
application/controllers/assetdetails.php
Normal file → Executable file
0
application/controllers/assetdetails.php
Normal file → Executable file
0
application/controllers/c_test.php
Normal file → Executable file
0
application/controllers/c_test.php
Normal file → Executable file
0
application/controllers/emergencypurchaseorder.php
Normal file → Executable file
0
application/controllers/emergencypurchaseorder.php
Normal file → Executable file
0
application/controllers/employeedetails.php
Normal file → Executable file
0
application/controllers/employeedetails.php
Normal file → Executable file
0
application/controllers/emppaydate.php
Normal file → Executable file
0
application/controllers/emppaydate.php
Normal file → Executable file
0
application/controllers/error.php
Normal file → Executable file
0
application/controllers/error.php
Normal file → Executable file
0
application/controllers/index.html
Normal file → Executable file
0
application/controllers/index.html
Normal file → Executable file
0
application/controllers/login.php
Normal file → Executable file
0
application/controllers/login.php
Normal file → Executable file
0
application/controllers/monthlypay.php
Normal file → Executable file
0
application/controllers/monthlypay.php
Normal file → Executable file
0
application/controllers/pages.php
Normal file → Executable file
0
application/controllers/pages.php
Normal file → Executable file
0
application/controllers/payslip.php
Normal file → Executable file
0
application/controllers/payslip.php
Normal file → Executable file
96
application/controllers/purchaseorder.php
Normal file → Executable file
96
application/controllers/purchaseorder.php
Normal file → Executable file
@ -37,33 +37,36 @@ class purchaseorder extends BaseController
|
||||
|
||||
function requisition()
|
||||
{
|
||||
$data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
|
||||
// $data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAll$ReqNoReq();
|
||||
$Req_No='';
|
||||
$IsArray='';
|
||||
$data['stList'] = $this->purchaseorder_model->getStatusListforAllReq();
|
||||
|
||||
$data['stList'] = $this->purchaseorder_model->getStatusListforAllReq();
|
||||
|
||||
$data['ReqList'] = $this->purchaseorder_model->getRequistionListbySearch();
|
||||
$data['ReqList'] = $this->purchaseorder_model->getRawPOMaterialList($Req_No,$IsArray);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Create PO from Requisition List';
|
||||
|
||||
$this->loadViews("createPOfromRequistion", $this->global, $data,Null);
|
||||
}
|
||||
|
||||
function viewfullpurchaseorder() // This function to view all purchase order for gate keeper
|
||||
{
|
||||
|
||||
|
||||
$count = $this->purchaseorder_model->purchaseorderListingCount('');
|
||||
|
||||
$returns = $this->paginationCompress ( "purchaseorderListing/", $count, 5 );
|
||||
|
||||
$this->purchaseorder_model->UpdateRequistionStatus();
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : view whole purchase order';
|
||||
|
||||
$this->loadViews("viewfullpurchaseorder", $this->global,$data,Null);
|
||||
|
||||
}
|
||||
/*function CreateEmergencyPO()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Create Emergency Purchase Order';
|
||||
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C004');
|
||||
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
|
||||
$data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
|
||||
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
|
||||
|
||||
$this->loadViews("alterpurchaseorder", $this->global, $data,Null);
|
||||
|
||||
} */
|
||||
/**
|
||||
* This function is used to load the purchaseorder list
|
||||
*/
|
||||
@ -145,26 +148,7 @@ class purchaseorder extends BaseController
|
||||
$data['CostList'] = $this->purchaseorder_model->getCostCenterbyRequist('',$Year,$ReqType);
|
||||
$data['MaterialList'] = $result; //$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
|
||||
//print_r ($data['MaterialList']);
|
||||
//$data['RequistionDetails'] = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
$CostCode = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
$data['RequistionDetails'] = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
|
||||
|
||||
@ -180,10 +164,6 @@ class purchaseorder extends BaseController
|
||||
else if($ReqType == IMPORT)
|
||||
{
|
||||
$ViewName = 'importpo';
|
||||
}
|
||||
else if($ReqType == CAPITAL)
|
||||
{
|
||||
$ViewName = 'capitalpurchaseorder';
|
||||
}
|
||||
$this->loadViews($ViewName, $this->global,$data, NULL);
|
||||
}
|
||||
@ -223,31 +203,11 @@ class purchaseorder extends BaseController
|
||||
endforeach;
|
||||
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
|
||||
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
$CostCode = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
$data['RequistionDetails'] = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO);
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
if($ReqType == SERVICE)
|
||||
{
|
||||
|
||||
@ -262,10 +222,6 @@ class purchaseorder extends BaseController
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
else if($ReqType == IMPORT)
|
||||
{
|
||||
$ViewName = 'importpo';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
0
application/controllers/purchaseorderform.php
Normal file → Executable file
0
application/controllers/purchaseorderform.php
Normal file → Executable file
0
application/controllers/rawmaterialdetails.php
Normal file → Executable file
0
application/controllers/rawmaterialdetails.php
Normal file → Executable file
11
application/controllers/requisitionform.php
Normal file → Executable file
11
application/controllers/requisitionform.php
Normal file → Executable file
@ -33,10 +33,15 @@ class requisitionform extends BaseController
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['ReqList'] = $this->requistion_model->getRequistListUserID($userID);
|
||||
$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||
// $data['ReqList'] = $this->requistion_model->getRequistListUserID($userID);
|
||||
//$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||
|
||||
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
}
|
||||
/**
|
||||
|
||||
0
application/controllers/requisitionlist.php
Normal file → Executable file
0
application/controllers/requisitionlist.php
Normal file → Executable file
0
application/controllers/requisitionlistapproval.php
Normal file → Executable file
0
application/controllers/requisitionlistapproval.php
Normal file → Executable file
0
application/controllers/servicepurchaseorder.php
Normal file → Executable file
0
application/controllers/servicepurchaseorder.php
Normal file → Executable file
0
application/controllers/supplier.php
Normal file → Executable file
0
application/controllers/supplier.php
Normal file → Executable file
0
application/controllers/user.php
Normal file → Executable file
0
application/controllers/user.php
Normal file → Executable file
0
application/core/index.html
Normal file → Executable file
0
application/core/index.html
Normal file → Executable file
0
application/errors/error_404.php
Normal file → Executable file
0
application/errors/error_404.php
Normal file → Executable file
0
application/errors/error_db.php
Normal file → Executable file
0
application/errors/error_db.php
Normal file → Executable file
0
application/errors/error_general.php
Normal file → Executable file
0
application/errors/error_general.php
Normal file → Executable file
0
application/errors/error_php.php
Normal file → Executable file
0
application/errors/error_php.php
Normal file → Executable file
0
application/errors/index.html
Normal file → Executable file
0
application/errors/index.html
Normal file → Executable file
0
application/helpers/cias_helper.php
Normal file → Executable file
0
application/helpers/cias_helper.php
Normal file → Executable file
0
application/helpers/index.html
Normal file → Executable file
0
application/helpers/index.html
Normal file → Executable file
0
application/hooks/index.html
Normal file → Executable file
0
application/hooks/index.html
Normal file → Executable file
0
application/index.html
Normal file → Executable file
0
application/index.html
Normal file → Executable file
0
application/language/english/index.html
Normal file → Executable file
0
application/language/english/index.html
Normal file → Executable file
0
application/language/index.html
Normal file → Executable file
0
application/language/index.html
Normal file → Executable file
0
application/libraries/BaseController.php
Normal file → Executable file
0
application/libraries/BaseController.php
Normal file → Executable file
0
application/libraries/Excel.php
Normal file → Executable file
0
application/libraries/Excel.php
Normal file → Executable file
0
application/libraries/Excel2.php
Normal file → Executable file
0
application/libraries/Excel2.php
Normal file → Executable file
0
application/libraries/dompdf_gen.php
Normal file → Executable file
0
application/libraries/dompdf_gen.php
Normal file → Executable file
0
application/libraries/index.html
Normal file → Executable file
0
application/libraries/index.html
Normal file → Executable file
0
application/libraries/pdf.php
Normal file → Executable file
0
application/libraries/pdf.php
Normal file → Executable file
0
application/logs/index.html
Normal file → Executable file
0
application/logs/index.html
Normal file → Executable file
0
application/logs/log-2017-04-20.php
Normal file → Executable file
0
application/logs/log-2017-04-20.php
Normal file → Executable file
0
application/logs/log-2017-04-21.php
Normal file → Executable file
0
application/logs/log-2017-04-21.php
Normal file → Executable file
0
application/logs/log-2017-04-22.php
Normal file → Executable file
0
application/logs/log-2017-04-22.php
Normal file → Executable file
0
application/logs/log-2017-04-24.php
Normal file → Executable file
0
application/logs/log-2017-04-24.php
Normal file → Executable file
0
application/logs/log-2017-04-26.php
Normal file → Executable file
0
application/logs/log-2017-04-26.php
Normal file → Executable file
0
application/logs/log-2017-04-27.php
Normal file → Executable file
0
application/logs/log-2017-04-27.php
Normal file → Executable file
0
application/logs/log-2017-04-28.php
Normal file → Executable file
0
application/logs/log-2017-04-28.php
Normal file → Executable file
0
application/logs/log-2017-05-02.php
Normal file → Executable file
0
application/logs/log-2017-05-02.php
Normal file → Executable file
0
application/logs/log-2017-05-03.php
Normal file → Executable file
0
application/logs/log-2017-05-03.php
Normal file → Executable file
0
application/logs/log-2017-05-04.php
Normal file → Executable file
0
application/logs/log-2017-05-04.php
Normal file → Executable file
0
application/logs/log-2017-05-08.php
Normal file → Executable file
0
application/logs/log-2017-05-08.php
Normal file → Executable file
0
application/logs/log-2017-05-10.php
Normal file → Executable file
0
application/logs/log-2017-05-10.php
Normal file → Executable file
0
application/logs/log-2017-05-12.php
Normal file → Executable file
0
application/logs/log-2017-05-12.php
Normal file → Executable file
0
application/logs/log-2017-05-19.php
Normal file → Executable file
0
application/logs/log-2017-05-19.php
Normal file → Executable file
0
application/logs/log-2017-05-22.php
Normal file → Executable file
0
application/logs/log-2017-05-22.php
Normal file → Executable file
0
application/logs/log-2017-05-23.php
Normal file → Executable file
0
application/logs/log-2017-05-23.php
Normal file → Executable file
0
application/logs/log-2017-05-24.php
Normal file → Executable file
0
application/logs/log-2017-05-24.php
Normal file → Executable file
0
application/logs/log-2017-05-25.php
Normal file → Executable file
0
application/logs/log-2017-05-25.php
Normal file → Executable file
0
application/logs/log-2017-05-26.php
Normal file → Executable file
0
application/logs/log-2017-05-26.php
Normal file → Executable file
0
application/logs/log-2017-05-27.php
Normal file → Executable file
0
application/logs/log-2017-05-27.php
Normal file → Executable file
0
application/logs/log-2017-05-29.php
Normal file → Executable file
0
application/logs/log-2017-05-29.php
Normal file → Executable file
0
application/logs/log-2017-05-30.php
Normal file → Executable file
0
application/logs/log-2017-05-30.php
Normal file → Executable file
0
application/logs/log-2017-05-31.php
Normal file → Executable file
0
application/logs/log-2017-05-31.php
Normal file → Executable file
0
application/logs/log-2017-06-01.php
Normal file → Executable file
0
application/logs/log-2017-06-01.php
Normal file → Executable file
0
application/logs/log-2017-06-02.php
Normal file → Executable file
0
application/logs/log-2017-06-02.php
Normal file → Executable file
0
application/logs/log-2017-06-05.php
Normal file → Executable file
0
application/logs/log-2017-06-05.php
Normal file → Executable file
0
application/models/assetdetails_model.php
Normal file → Executable file
0
application/models/assetdetails_model.php
Normal file → Executable file
0
application/models/costcenter_model.php
Normal file → Executable file
0
application/models/costcenter_model.php
Normal file → Executable file
0
application/models/employeedetails_model.php
Normal file → Executable file
0
application/models/employeedetails_model.php
Normal file → Executable file
0
application/models/emppaydate_model.php
Normal file → Executable file
0
application/models/emppaydate_model.php
Normal file → Executable file
0
application/models/index.html
Normal file → Executable file
0
application/models/index.html
Normal file → Executable file
0
application/models/login_model.php
Normal file → Executable file
0
application/models/login_model.php
Normal file → Executable file
0
application/models/monthlypay_model.php
Normal file → Executable file
0
application/models/monthlypay_model.php
Normal file → Executable file
0
application/models/payroll_model.php
Normal file → Executable file
0
application/models/payroll_model.php
Normal file → Executable file
16
application/models/purchaseorder_model.php
Normal file → Executable file
16
application/models/purchaseorder_model.php
Normal file → Executable file
@ -79,10 +79,10 @@ class purchaseorder_model extends CI_Model
|
||||
* This function is used to get the Raw Material information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRawPOMaterialList($ReqNo,$IsArray='')
|
||||
function getRawPOMaterialList($Req_No,$IsArray='')
|
||||
{
|
||||
|
||||
$result = $this->db-> query("CALL P_GET_REQUISTIONLIST('".$ReqNo."')") or die(mysql_error());
|
||||
$result = $this->db-> query("CALL P_PURCHASEORDER_DETAILS()") or die(mysql_error());
|
||||
|
||||
$result ->next_result();
|
||||
|
||||
@ -170,7 +170,7 @@ class purchaseorder_model extends CI_Model
|
||||
function getRequistDetails($ReqNoList='')
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate,mast.CostCenterCode');
|
||||
$this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate');
|
||||
$this->db->from('T_Requestion_Master mast');
|
||||
$this->db->join('T_Employee_Details emp', 'mast.Requestedby = emp.EmpID');
|
||||
$this->db->join('T_DepartmentDetails Dept', 'emp.Departmentcode = Dept.DEPCode');
|
||||
@ -187,7 +187,7 @@ class purchaseorder_model extends CI_Model
|
||||
function getRequistDetailsForPO($ReqNoList='')
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate,mast.CostCenterCode');
|
||||
$this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate');
|
||||
$this->db->from('T_Requestion_Master mast');
|
||||
$this->db->join('T_Employee_Details emp', 'mast.Requestedby = emp.EmpID');
|
||||
$this->db->join('T_DepartmentDetails Dept', 'emp.Departmentcode = Dept.DEPCode');
|
||||
@ -474,7 +474,7 @@ class purchaseorder_model extends CI_Model
|
||||
function GetRevenuePurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance) - AfterDiscount ),2)as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance) - AfterDiscount ),2)as Taxamount ,TotalValue,Tax.*,CostCenterCode,Dept.DepartmentName
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
@ -602,7 +602,7 @@ class purchaseorder_model extends CI_Model
|
||||
JOIN T_DepartmentDetails DEPT ON EMP.Departmentcode = DEPT.DEPCode WHERE REQ.Status not in(?,?,?,?)';
|
||||
|
||||
$query = $this->db->query($subQuery,array(REQ_DRAFT,REQ_PENDING_APPROVAL,REQ_DELETED,REQ_REJECTED));
|
||||
|
||||
//print_r($query);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ class purchaseorder_model extends CI_Model
|
||||
function getRequistionListbySearch($Depid='',$Status='',$FromDate='',$ToDate='')
|
||||
{
|
||||
$subQuery =' SELECT ReqNo,ReqType,Requestedby,EMP.FirstName,EMP.Designation,STAT.StatusCode ,STAT.StatusName,ReqDate,DEPT.DEPCode,DEPT.DepartmentName FROM T_Requestion_Master REQ
|
||||
JOIN T_Employee_Details EMP ON REQ.Requestedby = EMP.EmpID
|
||||
JOI T_Employee_Details EMP ON REQ.Requestedby = EMP.EmpID
|
||||
JOIN T_DepartmentDetails DEPT ON EMP.Departmentcode = DEPT.DEPCode
|
||||
JOIN T_Status STAT on REQ.Status = STAT.StatusCode
|
||||
where REQ.Status NOT IN (?,?,?,?,?)';
|
||||
@ -643,7 +643,7 @@ class purchaseorder_model extends CI_Model
|
||||
if($Depid != '' && $Status != '' && $FromDate != '' && $ToDate != '')
|
||||
{
|
||||
$appendQuery .= ' AND DEPT.DEPCode=? AND STAT.StatusCode=? AND ReqDate >= ? AND ReqDate <= ?';
|
||||
|
||||
echo "$appendQuery";die();
|
||||
$query = $this->db->query($appendQuery,array(REQ_DRAFT,REQ_PENDING_APPROVAL,REQ_DELETED,REQ_REJECTED,REQ_PO_CREATED,$Depid ,$Status,$FromDate,$ToDate));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result_array();
|
||||
|
||||
0
application/models/rawmaterialdetails_model.php
Normal file → Executable file
0
application/models/rawmaterialdetails_model.php
Normal file → Executable file
23
application/models/requistion_model.php
Normal file → Executable file
23
application/models/requistion_model.php
Normal file → Executable file
@ -43,6 +43,29 @@ class requistion_model extends CI_Model
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
/* This function is used to get the Raw Material information
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getRequistionList($ReqNo,$IsArray='')
|
||||
{
|
||||
|
||||
$result = $this->db-> query("CALL P_GET_AllREQUISTION('".$ReqNo."')") or die(mysql_error());
|
||||
|
||||
{
|
||||
//echo 'PO Line item Inserted successfully';
|
||||
if($IsArray != '')
|
||||
{
|
||||
|
||||
return $result->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $result->result();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
0
application/models/supplier_model.php
Normal file → Executable file
0
application/models/supplier_model.php
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user