'Newscreenaddedandissuefixed'
This commit is contained in:
parent
9ba8c46c51
commit
c4e53a937d
@ -23,19 +23,7 @@ class MRIRcontroller extends BaseController
|
|||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* This function used to load the first screen of the user
|
|
||||||
*/
|
|
||||||
// public function index()
|
|
||||||
// {
|
|
||||||
// $this->global['pageTitle'] = 'Siddharth : Material Inspetion Report';
|
|
||||||
//
|
|
||||||
// $this->loadViews("materialinspectionreport", $this->global, NULL , NULL);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function materialinspectionreport($mrir='',$IGRNO='')
|
function materialinspectionreport($mrir='',$IGRNO='')
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Siddharth : Material Inspection Report';
|
$this->global['pageTitle'] = 'Siddharth : Material Inspection Report';
|
||||||
@ -46,6 +34,13 @@ class MRIRcontroller extends BaseController
|
|||||||
|
|
||||||
$this->loadViews("materialinspectionreport", $this->global,$data,NULL);
|
$this->loadViews("materialinspectionreport", $this->global,$data,NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function viewmrirforbilling()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : Billing ';
|
||||||
|
|
||||||
|
$this->loadViews("viewmrirforbilling", $this->global, NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*FOR Displaying IGR Values in Materialinspectionreport.php(view file) */
|
/*FOR Displaying IGR Values in Materialinspectionreport.php(view file) */
|
||||||
|
|||||||
@ -42,6 +42,14 @@ class inwardgateregister extends BaseController
|
|||||||
|
|
||||||
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
||||||
}
|
}
|
||||||
|
function viewIGRDetails()
|
||||||
|
{
|
||||||
|
$this->load->model('inwardgateregister_model');
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
|
||||||
|
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
||||||
|
|
||||||
|
$this->loadViews("viewIGRDetails",$this->global,$data,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
function addinwardgateregister()
|
function addinwardgateregister()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,7 +41,12 @@ class purchaseorder extends BaseController
|
|||||||
$this->loadViews("viewfullpurchaseorder", $this->global,Null);
|
$this->loadViews("viewfullpurchaseorder", $this->global,Null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function advancerequest()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : Advance Request';
|
||||||
|
|
||||||
|
$this->loadViews("Advancerequest", $this->global, NULL , NULL);
|
||||||
|
}
|
||||||
function requisition()
|
function requisition()
|
||||||
{
|
{
|
||||||
$data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
|
$data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
|
||||||
|
|||||||
@ -28,20 +28,18 @@ class storerequisitionlist extends BaseController
|
|||||||
|
|
||||||
/*ADD Store requisition line item
|
/*ADD Store requisition line item
|
||||||
*/
|
*/
|
||||||
function addstores($userId='',$MaterialCode='')
|
function addstores()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||||
$this->load->model('storerequistion_model');
|
$userId= $this->session->userdata ('userId');
|
||||||
$userId= $this->session->userdata ('userId');
|
|
||||||
$data['DEPCode'] = $this->session->userdata('DEPCode');
|
$data['DEPCode'] = $this->session->userdata('DEPCode');
|
||||||
$data['DepName'] = $this->session->userdata('DepartmentName');
|
$data['DepName'] = $this->session->userdata('DepartmentName');
|
||||||
//print_r($data['cost']);
|
|
||||||
$data['cost'] = $this->storerequistion_model->getCostUser($userId);
|
$data['cost'] = $this->storerequistion_model->getCostUser($userId);
|
||||||
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList($MaterialCode);
|
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList();
|
||||||
//$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("addstorerequisitionslip", $this->global,$data,null);
|
$this->loadViews("addstorerequisitionslip", $this->global,$data,null);
|
||||||
}
|
}
|
||||||
@ -50,13 +48,10 @@ class storerequisitionlist extends BaseController
|
|||||||
function addstore()
|
function addstore()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||||
|
|
||||||
//$this->load->model('storerequistion_model');
|
|
||||||
$userId= $this->session->userdata ('userId');
|
$userId= $this->session->userdata ('userId');
|
||||||
$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
||||||
//print_r($data['Store']);
|
|
||||||
//echo "Check point form con";
|
|
||||||
$this->loadViews("storerequisition", $this->global,$data,null);
|
$this->loadViews("storerequisition", $this->global,$data,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +73,7 @@ class storerequisitionlist extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The Function Edit Store Requistion list */
|
/* The Function Edit Store Requistion list */
|
||||||
function EditStoreRequistion($MaterialCode='')
|
function EditStoreRequistion()
|
||||||
{
|
{
|
||||||
$StoreReqNo = $_GET['StoreReqNo'];
|
$StoreReqNo = $_GET['StoreReqNo'];
|
||||||
|
|
||||||
@ -86,13 +81,12 @@ class storerequisitionlist extends BaseController
|
|||||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||||
$this->load->model('storerequistion_model');
|
$this->load->model('storerequistion_model');
|
||||||
$data['cost'] = $this->storerequistion_model->editRequistDetails($StoreReqNo);
|
$data['cost'] = $this->storerequistion_model->editRequistDetails($StoreReqNo);
|
||||||
// print_r( $data);
|
|
||||||
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList($MaterialCode);
|
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList($MaterialCode);
|
||||||
|
|
||||||
$data['DepName'] = $this->session->userdata('DepartmentName');
|
$data['DepName'] = $this->session->userdata('DepartmentName');
|
||||||
$data['LineItem']=$this ->storerequistion_model->editstorerequistions($StoreReqNo);
|
$data['LineItem']=$this ->storerequistion_model->editstorerequistions($StoreReqNo);
|
||||||
// $data['StoreReqNO'] = $StoreReqNo ;
|
|
||||||
//print_r($data['LineItem']);
|
|
||||||
$this->loadViews("editstorerequisition", $this->global,$data,null);
|
$this->loadViews("editstorerequisition", $this->global,$data,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,19 +107,20 @@ class storerequisitionlist extends BaseController
|
|||||||
/**This function is used to add new StoreRequestion to the system */
|
/**This function is used to add new StoreRequestion to the system */
|
||||||
|
|
||||||
function addNewRequistion()
|
function addNewRequistion()
|
||||||
{
|
{
|
||||||
$Status= $_GET['ID'];
|
|
||||||
// $Requestedby = $_GET['RequestedBy'];
|
|
||||||
$CostCenter = $_GET['CostCenter'];
|
$CostCenter = $this->input->post('CostCenter');
|
||||||
$DEPCode = $_GET['DEPCode'];
|
$DEPCode = $this->input->post('txtDepCode');
|
||||||
$CreateBy = $this->session->userdata ( 'userId' );
|
$CreateBy = $this->session->userdata ( 'userId' );
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||||
$RowCount = $_GET['txtRowCount'];
|
$RowCount = $this->input->post('txtRowCount');
|
||||||
//echo $RowCount; die();
|
$Status = $this->input->post('txtStatus');
|
||||||
$Requestedby = $this->session->userdata ( 'EmpID' );
|
$Requestedby = $this->session->userdata ( 'EmpID' );
|
||||||
$comma_separated = explode(':', $DeletedRow);
|
$comma_separated = explode(':', $DeletedRow);
|
||||||
|
//echo 'done';
|
||||||
$IsExists = $this->storerequistion_model->RequistionIsExists($Requestedby);
|
$IsExists = $this->storerequistion_model->RequistionIsExists($Requestedby);
|
||||||
|
|
||||||
if(count( $IsExists) == 0)
|
if(count( $IsExists) == 0)
|
||||||
@ -219,38 +214,69 @@ class storerequisitionlist extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//To issue Store Requistion
|
||||||
|
function issuestorerequisition()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : Issue StoreRequisition';
|
||||||
|
$this->load->model('storerequistion_model');
|
||||||
|
|
||||||
|
$StoreReqNo= $_GET['ReqNo'];
|
||||||
|
|
||||||
|
$data['ReqItem'] = $this->storerequistion_model->getRequistItemList($StoreReqNo);
|
||||||
|
$data['ReqListDetails'] = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
||||||
|
//print_r($data['ReqItem']);
|
||||||
|
$this->loadViews("issueStoreRequistion", $this->global,$data,null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function UpdateIssueRequistion()
|
||||||
|
{
|
||||||
|
$ReqNO = $this->input->post('txtReqNo');
|
||||||
|
$RowCount = $this->input->post('txtRowCount');
|
||||||
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$ItemStatus = STORE_ISSUSED;
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||||
|
// echo $MaterialCode;
|
||||||
|
$IssuedQuantity = $this->input->post('txtIssuedQuantity'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
// echo'Material issed';
|
||||||
|
if(strlen($IssuedQuantity)>0)
|
||||||
|
{
|
||||||
|
$Remarks = $this->input->post('txtRemarks'.$i);
|
||||||
|
|
||||||
|
//echo $IssuedQuantity;
|
||||||
|
$CreatedBy = $this->session->userdata('userId');
|
||||||
|
|
||||||
|
|
||||||
|
$storerequisition = array('StoreReqNo'=>$ReqNO,'MaterialCode'=>$MaterialCode,'QuantityIssued'=>$IssuedQuantity,'Status'=>$ItemStatus,'StoreComments'=>$Remarks,'UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy);
|
||||||
|
|
||||||
|
|
||||||
|
$this->storerequistion_model->UpdateStoreRequistionItem($storerequisition,$ReqNO,$MaterialCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect('storerequisitionlisting','refresh');
|
||||||
|
|
||||||
|
//echo 'Updated successfully';
|
||||||
|
|
||||||
|
}
|
||||||
/* this function use to search StoreRequistlist*/
|
/* this function use to search StoreRequistlist*/
|
||||||
function SearchRequistLists()
|
function SearchRequistLists()
|
||||||
{
|
{
|
||||||
$userID = $this->session->userdata ( 'userId' );
|
$userID = $this->session->userdata ( 'userId' );
|
||||||
$ReqValue = $this->input->post('SearchDate');
|
|
||||||
|
|
||||||
$Dt = explode("-",$ReqValue);
|
|
||||||
|
|
||||||
$FromDate ='';
|
|
||||||
$ToDate = '';
|
|
||||||
$Status= '';
|
|
||||||
if(count( $Dt)>1)
|
|
||||||
{
|
|
||||||
$FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2];
|
|
||||||
$TDate = $Dt[3]."-".$Dt[4]."-".$Dt[5];
|
|
||||||
$FromDate = $this->getDateformat($FDate);
|
|
||||||
$ToDate = $this->getDateformat($TDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
$St = $this->input->post('STORE REQUISTION STATUS');
|
|
||||||
|
|
||||||
|
|
||||||
if($St == "-1")
|
|
||||||
{
|
|
||||||
$Status = '';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$Status = $St;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID,$Status,$FromDate, $ToDate);
|
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID);
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : ApprovalStoreRequisitionSlip';
|
$this->global['pageTitle'] = 'Siddharth : ApprovalStoreRequisitionSlip';
|
||||||
$data['Status']= $this->storerequistion_model->getStatus();
|
$data['Status']= $this->storerequistion_model->getStatus();
|
||||||
@ -302,10 +328,10 @@ class storerequisitionlist extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$StoreReqNo= $this->input->post('id');
|
$StoreReqNo= $this->input->post('id');
|
||||||
$result = $this->storerequistion_model->getRequistItemList($StoreReqNo);
|
$result = $this->storerequistion_model->getRequistItemListApproval($StoreReqNo);
|
||||||
$ReqList = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
$ReqList = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
||||||
$DepNo = $ReqList[0]['DepartmentName'];
|
// $DepNo = $ReqList[0]['DepartmentName'];
|
||||||
//$CostList = $this->requistion_model->GetCostCenterByDept($DepNo);
|
|
||||||
$HTML="";
|
$HTML="";
|
||||||
for ($i = 0; $i < count($result); $i++)
|
for ($i = 0; $i < count($result); $i++)
|
||||||
{
|
{
|
||||||
@ -321,6 +347,7 @@ class storerequisitionlist extends BaseController
|
|||||||
<td align='left'>".$MaterialName."</td>
|
<td align='left'>".$MaterialName."</td>
|
||||||
<td align='left'>".$UOM."</td>
|
<td align='left'>".$UOM."</td>
|
||||||
<td align='left'>".$Quantity."</td>
|
<td align='left'>".$Quantity."</td>
|
||||||
|
|
||||||
<td align='left'>".$Remarks."</td>
|
<td align='left'>".$Remarks."</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
@ -328,31 +355,11 @@ class storerequisitionlist extends BaseController
|
|||||||
//$index = $index + 1;
|
//$index = $index + 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
$CostCode = '';
|
|
||||||
$ReqType = '';
|
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
|
||||||
$Year = $dt->format('Y');
|
|
||||||
if(count($ReqList)>0)
|
|
||||||
{
|
|
||||||
|
|
||||||
$ReqType = $ReqList[0]['Requestedby'];
|
//print_r($ReqList);
|
||||||
|
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList)));
|
||||||
$CostCode = $ReqList[0]['CostCenterName'];
|
|
||||||
//$AvlBudget=$ReqList[0]['CostCenterName'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$AvlBudget = $this->storerequistion_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
|
||||||
//print_r($result);
|
|
||||||
$AvilBudAmt = '0';
|
|
||||||
if(count($AvlBudget)>0)
|
|
||||||
{
|
|
||||||
$AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
|
||||||
}
|
|
||||||
//echo $AvilBudAmt;
|
|
||||||
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//not completed
|
//not completed
|
||||||
function EditStoreRequisitions()
|
function EditStoreRequisitions()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user