completed Material master and asset details check for testing team

This commit is contained in:
sriramv 2017-04-03 10:07:39 +05:30
parent 74aea3790b
commit 8958aa4b47
15 changed files with 238 additions and 275 deletions

View File

@ -61,6 +61,7 @@ class assetdetails extends BaseController
$this->load->model('assetdetails_model'); $this->load->model('assetdetails_model');
$data['SupplierName'] = $this->assetdetails_model->getSupplierName(); $data['SupplierName'] = $this->assetdetails_model->getSupplierName();
$data['Department'] = $this->assetdetails_model->getDepartment();
//$data['POdate'] = $this->assetdetails_model->getPODate(); //$data['POdate'] = $this->assetdetails_model->getPODate();
$this->global['pageTitle'] = 'siddharth : Add Asset'; $this->global['pageTitle'] = 'siddharth : Add Asset';
@ -84,13 +85,12 @@ class assetdetails extends BaseController
$this->form_validation->set_rules('Description','Description','trim'); $this->form_validation->set_rules('Description','Description','trim');
$this->form_validation->set_rules('Department','Department','trim'); $this->form_validation->set_rules('Department','Department','trim');
$this->form_validation->set_rules('Location','Location','trim'); $this->form_validation->set_rules('Location','Location','trim');
$this->form_validation->set_rules('AssetOwner','AssetOwner','trim'); $this->form_validation->set_rules('User','User','trim');
$this->form_validation->set_rules('SupplierName','SupplierName','trim'); $this->form_validation->set_rules('SupplierName','SupplierName','trim');
$this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim'); $this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim');
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim'); $this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim');
$this->form_validation->set_rules('SupportVendor','SupportVendor','trim'); $this->form_validation->set_rules('AssetValue','AssetValue','trim');
$this->form_validation->set_rules('SupportFrom','SupportFrom','trim');
$this->form_validation->set_rules('SupportTo','SupportTo','trim');
@ -104,29 +104,29 @@ class assetdetails extends BaseController
$Description = $this->input->post('Description'); $Description = $this->input->post('Description');
$Department = $this->input->post('Department'); $Department = $this->input->post('Department');
$Location = $this->input->post('Location'); $Location = $this->input->post('Location');
$AssetOwner = $this->input->post('AssetOwner'); $User = $this->input->post('User');
$SupplierName = $this->input->post('SupplierName'); $SupplierName = $this->input->post('SupplierName');
$DateOfPurchase = $this->input->post('DateOfPurchase'); $DateOfPurchase = $this->input->post('DateOfPurchase');
$DateOfCommission = $this->input->post('DateOfCommission'); $DateOfCommission = $this->input->post('DateOfCommission');
$SupportVendor = $this->input->post('SupportVendor'); $Createdby = $this->input->post('Createdby');
$SupportFrom = $this->input->post('SupportFrom'); $AssetValue = $this->input->post('AssetValue');
$SupportTo = $this->input->post('SupportTo');
$asset = array('Asset_Name'=>$AssetName, 'Description'=>$Description,'Department'=>$Department,'Location'=>$Location,'AssetOwner'=>$AssetOwner,'SupplierName'=>$SupplierName,'DateOfPurchase'=>$DateOfPurchase,'DateOfCommission'=>$DateOfCommission,'SupportVendor'=>$SupportVendor,'SupportFrom'=>$SupportFrom,'SupportTo'=>$SupportTo,'createdDate'=>date('Y-m-d H:i:sa'));
$asset = array('Asset_Name'=>$AssetName, 'Description'=>$Description,'Department'=>$Department,'Location'=>$Location,'User'=>$User,'SupplierName'=>$SupplierName,'DateOfPurchase'=>$DateOfPurchase,'DateOfCommission'=>$DateOfCommission,'AssetValue'=>$AssetValue,'Createdby'=>$Createdby,'createdDate'=>date('Y-m-d H:i:sa'));
$this->load->model('assetdetails_model'); $this->load->model('assetdetails_model');
$result = $this->assetdetails_model->addNewasset($asset); $result = $this->assetdetails_model->addNewasset($asset);
if($result > 0) if($result > 0)
{ {
$this->session->set_flashdata('success', 'New PO created successfully'); $this->session->set_flashdata('success', 'New Asset created successfully');
} }
else else
{ {
$this->session->set_flashdata('error', 'PO Not Create'); $this->session->set_flashdata('error', 'Asset Not Create');
} }
redirect('assetdetails/assetListing'); redirect('assetdetails/assetListing');
@ -153,8 +153,9 @@ class assetdetails extends BaseController
} }
$data['asset'] = $this->assetdetails_model->getUserInfo($assetcode); $data['asset'] = $this->assetdetails_model->getUserInfo($assetcode);
$data['SupplierName'] = $this->assetdetails_model->getSupplierName(); $data['SupplierList'] = $this->assetdetails_model->getSupplierName();
$data['DepartmentList'] = $this->assetdetails_model->getDepartment();
//$data['roles'] = $this->assetdetails_model->getUserRoles();
$this->global['pageTitle'] = 'Siddharth : Edit Asset'; $this->global['pageTitle'] = 'Siddharth : Edit Asset';
$this->loadViews("editOldasset", $this->global, $data,NULL); $this->loadViews("editOldasset", $this->global, $data,NULL);
@ -175,14 +176,11 @@ class assetdetails extends BaseController
$this->form_validation->set_rules('Description','Description','trim|required'); $this->form_validation->set_rules('Description','Description','trim|required');
$this->form_validation->set_rules('Department','Department','trim|required'); $this->form_validation->set_rules('Department','Department','trim|required');
$this->form_validation->set_rules('Location','Location','trim'); $this->form_validation->set_rules('Location','Location','trim');
$this->form_validation->set_rules('AssetOwner','AssetOwner','trim'); $this->form_validation->set_rules('User','AssetOwner','trim');
$this->form_validation->set_rules('SupplierName','SupplierName','trim|required'); $this->form_validation->set_rules('SupplierName','SupplierName','trim|required');
$this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim'); $this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim');
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim'); $this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim');
$this->form_validation->set_rules('SupportVendor','SupportVendor','trim'); $this->form_validation->set_rules('AssetValue','AssetValue','trim|required');
$this->form_validation->set_rules('SupportFrom','SupportFrom','trim');
$this->form_validation->set_rules('SupportTo','SupportTo','trim');
if($this->form_validation->run() == FALSE) if($this->form_validation->run() == FALSE)
{ {
@ -196,19 +194,17 @@ class assetdetails extends BaseController
$Description = $this->input->post('Description'); $Description = $this->input->post('Description');
$Department = $this->input->post('Department'); $Department = $this->input->post('Department');
$Location = $this->input->post('Location'); $Location = $this->input->post('Location');
$AssetOwner = $this->input->post('AssetOwner'); $User = $this->input->post('User');
$SupplierName = $this->input->post('SupplierName'); $SupplierName = $this->input->post('SupplierName');
$DateOfPurchase = $this->input->post('DateOfPurchase'); $DateOfPurchase = $this->input->post('DateOfPurchase');
$DateOfCommission = $this->input->post('DateOfCommission'); $DateOfCommission = $this->input->post('DateOfCommission');
$SupportVendor = $this->input->post('SupportVendor'); $Createdby = $this->input->post('Createdby');
$SupportFrom = $this->input->post('SupportFrom'); $AssetValue = $this->input->post('AssetValue');
$SupportTo = $this->input->post('SupportTo');
$asset = array(); $asset = array();
$asset = array('Asset_Name'=>$AssetName, 'Description'=>$Description,'Department'=>$Department,'Location'=>$Location,'User'=>$User,'SupplierName'=>$SupplierName,'DateOfPurchase'=>$DateOfPurchase,'DateOfCommission'=>$DateOfCommission,'AssetValue'=>$AssetValue,'Createdby'=>$Createdby,'createdDate'=>date('Y-m-d H:i:sa'));
$asset = array('Asset_Code'=>$Asset_Code,'Asset_Name'=>$AssetName, 'Description'=>$Description,'Department'=>$Department,'Location'=>$Location,'AssetOwner'=>$AssetOwner,'SupplierName'=>$SupplierName,'DateOfPurchase'=>$DateOfPurchase,'DateOfCommission'=>$DateOfCommission,'SupportVendor'=>$SupportVendor,'SupportFrom'=>$SupportFrom,'SupportTo'=>$SupportTo,'createdDate'=>date('Y-m-d H:i:sa'));
@ -222,8 +218,8 @@ class assetdetails extends BaseController
{ {
$this->session->set_flashdata('error', 'Asset updation failed'); $this->session->set_flashdata('error', 'Asset updation failed');
} }
echo $asset;
redirect('assetListing'); // redirect('assetListing');
} }
} }

View File

@ -58,21 +58,17 @@ class rawmaterialdetails extends BaseController
* This function is used to load the add new cost */ * This function is used to load the add new cost */
function addRawMaterial() function addRawMaterial()
{ {
if($this->isAdmin() == TRUE)
{
$this->loadThis();
}
else
{
$this->load->model('rawmaterialdetails_model'); $this->load->model('rawmaterialdetails_model');
$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName(); //$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName();
$data['material'] = $this->rawmaterialdetails_model->getmaterial(); $data['material'] = $this->rawmaterialdetails_model->getmaterial();
$data['UOM'] = $this->rawmaterialdetails_model->getUOM();
$this->global['pageTitle'] = 'siddharth : AddNew RawMaterial'; $this->global['pageTitle'] = 'siddharth : AddNew RawMaterial';
$this->loadViews("addRawmaterial", $this->global, $data, NULL); $this->loadViews("addRawmaterial", $this->global, $data, NULL);
}
} }
/** /**
@ -80,13 +76,7 @@ class rawmaterialdetails extends BaseController
*/ */
function addNewRawMaterial() function addNewRawMaterial()
{ {
echo 'allowed edit';
if($this->isAdmin() == TRUE)
{
$this->loadThis();
}
else
{
$this->load->library('form_validation'); $this->load->library('form_validation');
//$PO = $this->input->post('costID'); //$PO = $this->input->post('costID');
@ -94,24 +84,25 @@ class rawmaterialdetails extends BaseController
//$this->form_validation->set_rules('CostCenterID','cost Name','trim'); //$this->form_validation->set_rules('CostCenterID','cost Name','trim');
$this->form_validation->set_rules('MaterialName','Material Name','trim|required|'); $this->form_validation->set_rules('MaterialName','Material Name','trim|required|');
$this->form_validation->set_rules('MaterialType','MaterialType','trim'); $this->form_validation->set_rules('MaterialType','MaterialType','trim');
$this->form_validation->set_rules('SupplierID','SupplierID','trim'); $this->form_validation->set_rules('UOM','UOM','trim');
if($this->form_validation->run() == FALSE) if($this->form_validation->run() == FALSE)
{ {
$this->addcost(); $this->addRawMaterial();
} }
else else
{ {
$MaterialName = ucwords(strtolower($this->input->post('MaterialName'))); $MaterialName = ucwords(strtolower($this->input->post('MaterialName')));
$MaterialType = $this->input->post('MaterialType'); $MaterialType = $this->input->post('MaterialType');
$SupplierID = $this->input->post('SupplierID'); $UOM = $this->input->post('UOM');
$CreatedBy = $this->input->post('CreatedBy');
$RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'SupplierID'=>$SupplierID,'createdDate'=>date('Y-m-d H:i:sa')); $RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'CreatedBy'=>$CreatedBy,'createdDate'=>date('Y-m-d H:i:sa'));
$this->load->model('rawmaterialdetails_model'); $this->load->model('rawmaterialdetails_model');
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial); $result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
@ -127,37 +118,20 @@ class rawmaterialdetails extends BaseController
redirect('rawmaterialListing'); redirect('rawmaterialListing');
} }
}
} }
function viewRawmaterial($RawMaterialID = NULL) function viewRawmaterial($RawMaterialID = NULL)
{ {
//echo 'allowed edit';
if($this->isAdmin() == TRUE || $RawMaterialID == 1) $this->load->model('rawmaterialdetails_model');
{
//echo 'allowed Admin';
$this->loadThis();
}
else
{
//echo 'allowed Update';
if($RawMaterialID == null)
{
//echo 'Before Update';
redirect('rawmaterialListing');
}
//echo 'Before Update';
//$data['costName'] = $this->purchaseorder_model->getcostName();
$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName();
$data['userRecords'] = $this->rawmaterialdetails_model->getuserInfo($RawMaterialID); $data['userRecords'] = $this->rawmaterialdetails_model->getuserInfo($RawMaterialID);
$data['material'] = $this->rawmaterialdetails_model->getmaterial(); $data['material'] = $this->rawmaterialdetails_model->getmaterial();
$this->global['pageTitle'] = 'Siddharth : Edit RawMaterial'; $this->global['pageTitle'] = 'Siddharth : View MaterialMaster';
$this->loadViews("viewrawmaterial", $this->global,$data, NULL); $this->loadViews("viewrawmaterial", $this->global,$data, NULL);
}
} }
/** /**
* This function is used load user edit information * This function is used load user edit information
@ -165,31 +139,14 @@ class rawmaterialdetails extends BaseController
*/ */
function editOldRawmaterial($RawMaterialID = NULL) function editOldRawmaterial($RawMaterialID = NULL)
{ {
//echo 'allowed edit'; $data['material'] = $this->rawmaterialdetails_model->getmaterial();
$data['UOMList'] = $this->rawmaterialdetails_model->getUOM();
$data['userRecords'] = $this->rawmaterialdetails_model->getUserInfo($RawMaterialID);
$this->global['pageTitle'] = 'Siddharth : Edit MaterialMaster';
$this->loadViews("editOldrawmaterial", $this->global, $data, NULL);
if($this->isAdmin() == TRUE || $RawMaterialID == 1)
{
//echo 'allowed Admin';
$this->loadThis();
}
else
{
//echo 'allowed Update';
if($RawMaterialID == null)
{
//echo 'Before Update';
redirect('rawmaterialListing');
}
//echo 'Before Update';
//$data['costName'] = $this->purchaseorder_model->getcostName();
$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName();
$data['userRecords'] = $this->rawmaterialdetails_model->getuserInfo($RawMaterialID);
$data['material'] = $this->rawmaterialdetails_model->getmaterial();
$this->global['pageTitle'] = 'Siddharth : Edit RawMaterial';
$this->loadViews("editOldrawmaterial", $this->global,$data, NULL);
}
} }
@ -217,7 +174,7 @@ class rawmaterialdetails extends BaseController
$this->form_validation->set_rules('MaterialName','Material Name','trim|required|'); $this->form_validation->set_rules('MaterialName','Material Name','trim|required|');
$this->form_validation->set_rules('MaterialType','MaterialType','trim'); $this->form_validation->set_rules('MaterialType','MaterialType','trim');
$this->form_validation->set_rules('SupplierID','SupplierID','trim'); $this->form_validation->set_rules('UOM','UOM','trim');
if($this->form_validation->run() == FALSE) if($this->form_validation->run() == FALSE)
{ {
@ -229,14 +186,16 @@ class rawmaterialdetails extends BaseController
$MaterialCode = $this->input->post('MaterialCode'); $MaterialCode = $this->input->post('MaterialCode');
$MaterialName = ucwords(strtolower($this->input->post('MaterialName'))); $MaterialName = ucwords(strtolower($this->input->post('MaterialName')));
$MaterialType = $this->input->post('MaterialType'); $MaterialType = $this->input->post('MaterialType');
$SupplierID = $this->input->post('SupplierID'); $UOM = $this->input->post('UOM');
$UpdatedBy = $this->input->post('UpdatedBy');
$CreatedBy = $this->input->post('CreatedBy');
//echo $MaterialCode; //echo $MaterialCode;
//echo 'passed model'; //echo 'passed model';
$RawMaterial = array(); $RawMaterial = array();
$RawMaterial = array('MaterialName'=>$MaterialName,'MaterialType'=>$MaterialType, 'SupplierID'=>$SupplierID, 'MaterialCode'=>$MaterialCode, 'createdDate'=>date('Y-m-d H:i:sa')); $RawMaterial = array('MaterialName'=>$MaterialName,'MaterialType'=>$MaterialType,'CreatedBy'=>$CreatedBy,'UpdatedBy'=>$UpdatedBy, 'UOM'=>$UOM, 'MaterialCode'=>$MaterialCode, 'UpdatedDate'=>date('Y-m-d H:i:sa'));
// echo ' before db Call'; // echo ' before db Call';
$result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode); $result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode);

View File

@ -120,7 +120,7 @@ class supplier extends BaseController
$this->form_validation->set_rules('UANumber','UANumber','trim|required'); $this->form_validation->set_rules('UANumber','UANumber','trim|required');
$this->form_validation->set_rules('PaymentTerms','PaymentTerms','trim|required'); $this->form_validation->set_rules('PaymentTerms','PaymentTerms','trim|required');
$this->form_validation->set_rules('PaymentDays','PaymentTerms','trim|required'); $this->form_validation->set_rules('PaymentDays','PaymentTerms','trim|required');
$this->form_validation->set_rules('PayableAT','PaymentTerms','trim|required'); $this->form_validation->set_rules('PayableAT','PayableAT','trim|required');
if($this->form_validation->run() == FALSE) if($this->form_validation->run() == FALSE)
@ -239,6 +239,7 @@ class supplier extends BaseController
$PaymentDays = $this->input->post('PaymentDays'); $PaymentDays = $this->input->post('PaymentDays');
$PayableAT = $this->input->post('PayableAT'); $PayableAT = $this->input->post('PayableAT');
$UpdatedBy = $this->input->post('UpdatedBy'); $UpdatedBy = $this->input->post('UpdatedBy');
$Createdby = $this->input->post('Createdby');
$supplier = array(); $supplier = array();
@ -247,10 +248,10 @@ class supplier extends BaseController
if(empty($ContactNumber)) if(empty($ContactNumber))
{ {
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'Exiseregistration'=>$Exiseregistration,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'createdDate'=>date('Y-m-d H:i:sa')); $supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'Exiseregistration'=>$Exiseregistration,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'Createdby'=>$Createdby,'createdDate'=>date('Y-m-d H:i:sa'));
} }
else{ else{
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'Exiseregistration'=>$Exiseregistration,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'createdDate'=>date('Y-m-d H:i:sa')); $supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'Exiseregistration'=>$Exiseregistration,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'Createdby'=>$Createdby,'createdDate'=>date('Y-m-d H:i:sa'));
} }
$result = $this->supplier_model->editsupplier($supplier, $supplierID); $result = $this->supplier_model->editsupplier($supplier, $supplierID);

View File

@ -9,7 +9,7 @@ class assetdetails_model extends CI_Model
*/ */
function assetListingCount($searchText = ''){ function assetListingCount($searchText = ''){
$this->db->select('BaseT.Asset_Code, BaseT.Asset_Name, BaseT.Description, ID.SupplierName,BaseT.Department, BaseT.Location,BaseT.AssetOwner,BaseT.DateOfCommission,BaseT.SupportVendor,BaseT.SupportFrom,BaseT.SupportTo,BaseT.DateOfPurchase'); $this->db->select('BaseT.Asset_Code, BaseT.Asset_Name, BaseT.Description, ID.SupplierName,BaseT.Department, BaseT.Location,BaseT.User,BaseT.DateOfCommission,BaseT.AssetValue,BaseT.DateOfPurchase');
$this->db->from('T_AssetDetails as BaseT'); $this->db->from('T_AssetDetails as BaseT');
$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierName = BaseT.SupplierName','left'); $this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierName = BaseT.SupplierName','left');
@ -24,12 +24,11 @@ class assetdetails_model extends CI_Model
OR BaseT.Department LIKE '%".$searchText."%' OR BaseT.Department LIKE '%".$searchText."%'
OR BaseT.DateOfPurchase LIKE '%".$searchText."%' OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
OR BaseT.Location LIKE '%".$searchText."%' OR BaseT.Location LIKE '%".$searchText."%'
OR BaseT.AssetOwner LIKE '%".$searchText."%' OR BaseT.User LIKE '%".$searchText."%'
OR BaseT.DateOfCommission LIKE '%".$searchText."%' OR BaseT.DateOfCommission LIKE '%".$searchText."%'
OR BaseT.DateOfPurchase LIKE '%".$searchText."%' OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
OR BaseT.SupportVendor LIKE '%".$searchText."%' OR BaseT.AssetValue LIKE '%".$searchText."%'
OR BaseT.SupportFrom LIKE '%".$searchText."%' OR BaseT.AssetValue LIKE '%".$searchText."%'
OR BaseT.SupportTo LIKE '%".$searchText."%'
OR BaseT.CreatedDate LIKE '%".$searchText."%' OR BaseT.CreatedDate LIKE '%".$searchText."%'
)"; )";
$this->db->where($likeCriteria); $this->db->where($likeCriteria);
@ -48,7 +47,7 @@ class assetdetails_model extends CI_Model
*/ */
function assetListing($searchText = '', $page, $segment) function assetListing($searchText = '', $page, $segment)
{ {
$this->db->select('BaseT.Asset_Code, BaseT.Asset_Name, BaseT.Description, BaseT.Department, BaseT.Location,BaseT.AssetOwner,BaseT.DateOfCommission,BaseT.DateOfPurchase,BaseT.SupportVendor,BaseT.SupportFrom,BaseT.SupportTo,BaseT.CreatedDate,BaseT.SupplierName'); $this->db->select('BaseT.Asset_Code, BaseT.Asset_Name, BaseT.Description, BaseT.Department, BaseT.Location,BaseT.User,BaseT.DateOfCommission,BaseT.DateOfPurchase,BaseT.AssetValue,BaseT.CreatedDate,BaseT.SupplierName');
$this->db->from('T_AssetDetails as BaseT'); $this->db->from('T_AssetDetails as BaseT');
//$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierName = BaseT.SupplierName','left'); //$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierName = BaseT.SupplierName','left');
@ -61,12 +60,11 @@ class assetdetails_model extends CI_Model
OR BaseT.Department LIKE '%".$searchText."%' OR BaseT.Department LIKE '%".$searchText."%'
OR BaseT.DateOfPurchase LIKE '%".$searchText."%' OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
OR BaseT.Location LIKE '%".$searchText."%' OR BaseT.Location LIKE '%".$searchText."%'
OR BaseT.AssetOwner LIKE '%".$searchText."%' OR BaseT.User LIKE '%".$searchText."%'
OR BaseT.DateOfCommission LIKE '%".$searchText."%' OR BaseT.DateOfCommission LIKE '%".$searchText."%'
OR BaseT.DateOfPurchase LIKE '%".$searchText."%' OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
OR BaseT.SupportVendor LIKE '%".$searchText."%' OR BaseT.AssetValue LIKE '%".$searchText."%'
OR BaseT.SupportFrom LIKE '%".$searchText."%'
OR BaseT.SupportTo LIKE '%".$searchText."%'
OR BaseT.CreatedDate LIKE '%".$searchText."%' OR BaseT.CreatedDate LIKE '%".$searchText."%'
)"; )";
$this->db->where($likeCriteria); $this->db->where($likeCriteria);
@ -81,17 +79,30 @@ class assetdetails_model extends CI_Model
} }
function getDepartment()
{
$ConfigID = 'C005';
$this->db->select('ConfigValue');
$this->db->from('T_ConfigDetails');
$this->db->where('Config_id ',$ConfigID );
$query = $this->db->get();
return $query->result();
}
function getSupplierName() function getSupplierName()
{ {
$this->db->select('SupplierID, SupplierName'); $this->db->select('SupplierID, SupplierName');
$this->db->from('T_SupplierDetailsN'); $this->db->from('T_SupplierDetailsN');
//$this->db->where('roleId !=', 1); // $this->db->where('Address');
//$this->db->where('roleId !=', 1);
$query = $this->db->get(); $query = $this->db->get();
return $query->result(); return $query->result();
} }
/** /**
* This function used to get user information by id * This function used to get user information by id
* @param number $userId : This is user id * @param number $userId : This is user id
@ -117,7 +128,7 @@ function addNewasset($asset)
*/ */
function getuserInfo($Asset_Code) function getuserInfo($Asset_Code)
{ {
$this->db->select('Asset_Code, Asset_Name,Description,Department,Location,AssetOwner,SupplierName,DateOfPurchase,DateOfCommission,SupportVendor,SupportFrom,SupportTo,CreatedDate'); $this->db->select('Asset_Code, Asset_Name,Description,Department,Location,User,SupplierName,DateOfPurchase,DateOfCommission,AssetValue,Createdby,CreatedDate');
$this->db->from('T_AssetDetails'); $this->db->from('T_AssetDetails');
//$this->db->where('isDeleted', 0); //$this->db->where('isDeleted', 0);
//$this->db->where('roleId !=', 1); //$this->db->where('roleId !=', 1);

View File

@ -9,10 +9,10 @@ class rawmaterialdetails_model extends CI_Model
*/ */
function rawmaterialListingCount($searchText = '') function rawmaterialListingCount($searchText = '')
{ {
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, ID.SupplierID, BaseT.CreatedDate'); $this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.UOM, BaseT.CreatedDate');
$this->db->from('T_RawMaterialDetailsN as BaseT'); $this->db->from('T_MaterialMaster as BaseT');
//$this->db->join('tbl_users as users', 'users.userId = BaseT.userId','left'); //$this->db->join('tbl_users as users', 'users.userId = BaseT.userId','left');
$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierID = BaseT.SupplierID','left'); //$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierID = BaseT.SupplierID','left');
if(!empty($searchText)) { if(!empty($searchText)) {
$likeCriteria = "(BaseT.MaterialCode LIKE '%".$searchText."%' $likeCriteria = "(BaseT.MaterialCode LIKE '%".$searchText."%'
OR BaseT.MaterialName LIKE '%".$searchText."%' OR BaseT.MaterialName LIKE '%".$searchText."%'
@ -35,8 +35,8 @@ class rawmaterialdetails_model extends CI_Model
*/ */
function rawmaterialListing($searchText = '', $page, $segment) function rawmaterialListing($searchText = '', $page, $segment)
{ {
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.SupplierID ,BaseT.CreatedDate'); $this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.UOM ,BaseT.CreatedDate');
$this->db->from('T_RawMaterialDetailsN as BaseT'); $this->db->from('T_MaterialMaster as BaseT');
//$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierID = BaseT.SupplierID','left'); //$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierID = BaseT.SupplierID','left');
if(!empty($searchText)) { if(!empty($searchText)) {
@ -55,14 +55,17 @@ class rawmaterialdetails_model extends CI_Model
return $result; return $result;
} }
function getSupplierName()
function getUOM()
{ {
$ConfigID = 'C001';
$this->db->select('SupplierID, SupplierName'); $this->db->select('ConfigValue');
$this->db->from('T_SupplierDetailsN'); $this->db->from('T_ConfigDetails');
$query = $this->db->get(); $this->db->where('Config_id ',$ConfigID );
$query = $this->db->get();
return $query->result();
return $query->result();
} }
function getmaterial() function getmaterial()
@ -85,7 +88,7 @@ class rawmaterialdetails_model extends CI_Model
function addNewRawMaterial($RawMaterial) function addNewRawMaterial($RawMaterial)
{ {
$this->db->trans_start(); $this->db->trans_start();
$this->db->insert('T_RawMaterialDetailsN', $RawMaterial); $this->db->insert('T_MaterialMaster', $RawMaterial);
$MaterialCode = $this->db->insert_id(); $MaterialCode = $this->db->insert_id();
@ -101,8 +104,8 @@ function addNewRawMaterial($RawMaterial)
*/ */
function getuserInfo($MaterialCode) function getuserInfo($MaterialCode)
{ {
$this->db->select('MaterialCode, MaterialName,MaterialType,SupplierID,CreatedDate'); $this->db->select('MaterialCode, MaterialName,MaterialType,UOM,CreatedBy,UpdatedBy,CreatedDate');
$this->db->from('T_RawMaterialDetailsN'); $this->db->from('T_MaterialMaster');
//$this->db->where('isDeleted', 0); //$this->db->where('isDeleted', 0);
//$this->db->where('roleId !=', 1); //$this->db->where('roleId !=', 1);
$this->db->where('MaterialCode', $MaterialCode); $this->db->where('MaterialCode', $MaterialCode);
@ -116,7 +119,7 @@ function addNewRawMaterial($RawMaterial)
$this->db->where('MaterialCode', $MaterialCode); $this->db->where('MaterialCode', $MaterialCode);
$this->db->update('T_RawMaterialDetailsN', $RawMaterial); $this->db->update('T_MaterialMaster', $RawMaterial);
return TRUE; return TRUE;
} }
@ -127,7 +130,7 @@ function addNewRawMaterial($RawMaterial)
$this->db->where('MaterialCode', $MaterialCode); $this->db->where('MaterialCode', $MaterialCode);
$this->db->update('T_RawMaterialDetailsN', $RawMaterial); $this->db->update('T_MaterialMaster', $RawMaterial);
return TRUE; return TRUE;
} }

View File

@ -2,7 +2,7 @@
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center>Raw Material List </center> <center>Add Material Master </center>
</h1> </h1>
@ -22,11 +22,11 @@
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<center><h3 class="box-title">Add Raw Material Details</h3></center> <center><h3 class="box-title">Add Material Master Details</h3></center>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<!-- form start --> <!-- form start -->
<form role="form" id="addUser" action="<?php echo base_url() ?>RawMaterialDetails/addNewRawMaterial" method="post" role="form"> <form role="form" id="addUser" action="<?php echo base_url() ?>rawmaterialdetails/addNewRawMaterial" method="post" role="form">
<div class="box-body"> <div class="box-body">
<div class="row"> <div class="row">
<!--<div class="col-md-6"> <!--<div class="col-md-6">
@ -48,7 +48,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="MaterialType">Material Type</label> <label for="MaterialType">Material Type</label>
<select class="form-control required" id="SupplierID" name="SupplierID"> <select class="form-control required" id="MaterialType" name="MaterialType">
<option value="null" required>Select Material Type</option> <option value="null" required>Select Material Type</option>
<?php <?php
if(!empty($material)) if(!empty($material))
@ -66,16 +66,16 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="SupplierID">Supplier Name</label> <label for="UOM">Unit of Mesurement</label>
<select class="form-control required" id="SupplierID" name="SupplierID"> <select class="form-control required" id="UOM" name="UOM">
<option value="null" required>Select Supplier Name</option> <option value="0" required>Select UOM</option>
<?php <?php
if(!empty($SupplierName)) if(!empty($UOM))
{ {
foreach ($SupplierName as $SID) foreach ($UOM as $SID)
{ {
?> ?>
<option value="<?php echo $SID->SupplierID ?>"><?php echo $SID->SupplierID ?> - <?php echo $SID->SupplierName ?></option> <option value="<?php echo $SID->ConfigValue; ?>"><?php echo $SID->ConfigValue ?>
<?php <?php
} }
} }
@ -83,7 +83,7 @@
</select> </select>
</div> </div>
</div> </div>
<input type="hidden" class="form-control required " value="<?php echo $name; ?>"id="CreatedBy" name="CreatedBy">
</div> </div>

View File

@ -63,7 +63,20 @@
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="Department">Department</label> <label for="Department">Department</label>
<input type="text" class="form-control required" id="Department" name="Department"> <select class="form-control required" id="Department" name="Department">
<option>Department</option>
<?php
if(!empty($Department))
{
foreach ($Department as $SID)
{
?>
<option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div> </div>
</div> </div>
@ -81,7 +94,7 @@
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="AssetOwner">Asset Owner</label> <label for="AssetOwner">Asset Owner</label>
<input type="text" class="form-control required" id="AssetOwner" name="AssetOwner"> <input type="text" class="form-control required" id="User" name="User">
</div> </div>
</div> </div>
@ -90,14 +103,14 @@
<div class="form-group"> <div class="form-group">
<label for="SupplierName">Supplier Name</label> <label for="SupplierName">Supplier Name</label>
<select class="form-control required" id="SupplierName" name="SupplierName"> <select class="form-control required" id="SupplierName" name="SupplierName">
<option value="0">Select Name</option> <option >Select Supplier Name</option>
<?php <?php
if(!empty($SupplierName)) if(!empty($SupplierName))
{ {
foreach ($SupplierName as $SID) foreach ($SupplierName as $SID)
{ {
?> ?>
<option value="<?php echo $SID->SupplierName ?>"><?php echo $SID->SupplierID ?> - <?php echo $SID->SupplierName ?></option> <option value="<?php echo $SID->SupplierName; ?>"><?php echo $SID->SupplierID ?> - <?php echo $SID->SupplierName ?></option>
<?php <?php
} }
} }
@ -109,35 +122,24 @@
<div class="form-group"> <div class="form-group">
<label for="DateOfPurchase">Date Of Purchase</label> <label for="DateOfPurchase">Date Of Purchase</label>
<input type="date" name="DateOfPurchase" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" /> <input type="date" name="DateOfPurchase" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-7,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" />
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="DateOfCommission">Date Of Commission</label> <label for="DateOfCommission">Date Of Commission</label>
<input type="date" name="DateOfCommission" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" /> <input type="date" name="DateOfCommission" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-7,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" />
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="SupportVendor">Support Vendor</label> <label for="Assetvalue">Asset Value</label>
<input type="text" class="form-control required" id="SupportVendor" name="SupportVendor" maxlength="255"> <input type="text" class="form-control required" id="Assetvalue" name="Assetvalue" maxlength="255">
<input type="hidden" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
</div> </div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="SupportFrom">Support From</label>
<input type="date" name="SupportFrom" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="SupportTo">Support To</label>
<input type="date" name="SupportTo" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo date('Y-m-d'); ?>" class="form-control" placeholder="" />
</div>
</div>
</div> </div>
</div><!-- /.box-body --> </div><!-- /.box-body -->

View File

@ -127,7 +127,7 @@
<div class="col-md-6 col-xs-6"> <div class="col-md-6 col-xs-6">
<label for="payablefrom">Payable From</label> <label for="payablefrom">Payable From</label>
<select class="form-control required" id="PaymentTerms" name="PaymentTerms"> <select class="form-control required" id="PaymentTerms" name="PaymentTerms">
<option value="0">Select Payment method</option> <option >Select Payment method</option>
<?php <?php
if(!empty($payment)) if(!empty($payment))
{ {
@ -161,7 +161,7 @@
<div class="form"> <div class="form">
<label for="PayableAT">Payable AT</label> <label for="PayableAT">Payable AT</label>
<input type="text" class="form-control required" id="PayableAT" name="PayableAT" > <input type="text" class="form-control required" id="PayableAT" name="PayableAT" >
<input type="text" value="<?php echo $name;?>" class="form-control required" id="Createdby" name="Createdby" > <input type="hidden" value="<?php echo $name;?>" class="form-control required" id="Createdby" name="Createdby" >
</div> </div>
</div> </div>
</div> </div>

View File

@ -38,13 +38,13 @@
<th>Description</th> <th>Description</th>
<th>Department</th> <th>Department</th>
<th>Location</th> <th>Location</th>
<th>Asset Owner</th> <th>User</th>
<th>Supplier Name</th> <th>Supplier Name</th>
<th>Date Of Purchase</th> <th>Date Of Purchase</th>
<th>Support From</th> <th>Asset Value</th>
<th>Support To</th>
<th>Create Date</th> <th>Create Date</th>
<th>Edit</th> <th>Action</th>
</tr> </tr>
<?php <?php
@ -59,11 +59,12 @@
<td><?php echo $record->Description ?></td> <td><?php echo $record->Description ?></td>
<td><?php echo $record->Department ?></td> <td><?php echo $record->Department ?></td>
<td><?php echo $record->Location ?></td> <td><?php echo $record->Location ?></td>
<td><?php echo $record->AssetOwner ?></td> <td><?php echo $record->User ?></td>
<td><?php echo $record->SupplierName ?></td> <td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->DateOfPurchase ?></td> <td><?php echo $record->DateOfPurchase ?></td>
<td><?php echo $record->SupportFrom ?></td>
<td><?php echo $record->SupportTo ?></td> <td><?php echo $record->AssetValue ?></td>
<td><?php echo $record->CreatedDate ?></td> <td><?php echo $record->CreatedDate ?></td>
<td> <td>

View File

@ -3,9 +3,8 @@
$MaterialCode = ''; $MaterialCode = '';
$MaterialName = ''; $MaterialName = '';
$MaterialType = ''; $MaterialType = '';
$SupplierID = ''; $UOM = '';
$CreatedDate = ''; $CreatedBy = '';
if(!empty($userRecords)) if(!empty($userRecords))
{ {
@ -14,8 +13,9 @@ if(!empty($userRecords))
$MaterialCode = $uf->MaterialCode; $MaterialCode = $uf->MaterialCode;
$MaterialName = $uf->MaterialName; $MaterialName = $uf->MaterialName;
$MaterialType = $uf->MaterialType; $MaterialType = $uf->MaterialType;
$SupplierID = $uf->SupplierID; $UOM = $uf->UOM;
$CreatedDate = $uf->CreatedDate; $CreatedBy = $uf->CreatedBy;
} }
} }
@ -27,7 +27,7 @@ if(!empty($userRecords))
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center>Raw Material List</center> <center>Edit Material Master</center>
</h1> </h1>
</section> </section>
@ -46,7 +46,7 @@ if(!empty($userRecords))
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<center> <h3 class="box-title">Edit Raw Material Details</h3></center> <center> <h3 class="box-title">Edit Material Master</h3></center>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<!-- form start --> <!-- form start -->
@ -56,24 +56,22 @@ if(!empty($userRecords))
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="MaterialName">Material Name</label> <label for="MaterialName">Material Name</label>
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialName;?>"> <input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialCode;?>">
<input type="hidden" class="form-control" value="<?php echo $MaterialCode;?>" id="MaterialCode" name="MaterialCode" > <input type="hidden" class="form-control required " id="MaterialCode" value="<?php echo $MaterialCode;?>"name="MaterialCode" maxlength="255">
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="MaterialType">Material Type</label> <label for="MaterialType">Material Type</label>
<select class="form-control required" id="MaterialType" name="MaterialType"> <select class="form-control required" id="MaterialType" name="MaterialType">
<option value="<?php echo $MaterialType; ?>">Select Material Type</option> <option value="<?php echo $MaterialType;?> "required><?php echo $MaterialType;?></option>
<?php <?php
if(!empty($material)) if(!empty($material))
{ {
foreach ($material as $SID) foreach ($material as $SID)
{ {
?> ?>
<option value="<?php echo $SID->ConfigValue ?>"\><?php echo $SID->ConfigValue ?></option> <option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
<option value="<?php echo $SID->ConfigValue ?>"\><?php echo $SID->ConfigValue ?></option>
<?php <?php
} }
} }
@ -83,16 +81,16 @@ if(!empty($userRecords))
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="SupplierID">Supplier ID</label> <label for="UOM">Unit of Mesurement</label>
<select class="form-control required" id="SupplierID" name="SupplierID"> <select class="form-control required" id="UOM" name="UOM">
<option value="<?php echo $SupplierID; ?>">Select Supplier Name</option> <option value="<?php echo $UOM;?>" required><?php echo $UOM;?></option>
<?php <?php
if(!empty($SupplierName)) if(!empty($UOMList))
{ {
foreach ($SupplierName as $SID) foreach ($UOMList as $SID)
{ {
?> ?>
<option value="<?php echo $SID->SupplierID ?>"<?php if($SID->SupplierID == $SupplierID) {echo "selected=selected";} ?>><?php echo $SID->SupplierID ?> - <?php echo $SID->SupplierName ?></option> <option value="<?php echo $SID->ConfigValue; ?>"><?php echo $SID->ConfigValue ?>
<?php <?php
} }
} }
@ -100,7 +98,8 @@ if(!empty($userRecords))
</select> </select>
</div> </div>
</div> </div>
<input type="hidden" class="form-control required " value="<?php echo $CreatedBy; ?>"id="CreatedBy" name="CreatedBy">
<input type="hidden" class="form-control required " value="<?php echo $name; ?>"id="UpdatedBy" name="UpdatedBy">
</div> </div>

View File

@ -5,13 +5,12 @@ $Asset_Name = '';
$Description = ''; $Description = '';
$Department = ''; $Department = '';
$Location = ''; $Location = '';
$AssetOwner = ''; $User = '';
$SupplierName = ''; $SupplierName = '';
$DateOfPurchase = ''; $DateOfPurchase = '';
$DateOfCommission = ''; $DateOfCommission = '';
$SupportVendor = ''; $AssetValue = '';
$SupportFrom = ''; $Createdby = '';
$SupportTo = '';
@ -24,13 +23,12 @@ if(!empty($asset))
$Description = $uf->Description; $Description = $uf->Description;
$Department = $uf->Department; $Department = $uf->Department;
$Location = $uf->Location; $Location = $uf->Location;
$AssetOwner = $uf->AssetOwner; $User = $uf->User;
$SupplierName = $uf->SupplierName; $SupplierName = $uf->SupplierName;
$DateOfPurchase = $uf->DateOfPurchase; $DateOfPurchase = $uf->DateOfPurchase;
$DateOfCommission = $uf->DateOfCommission; $DateOfCommission = $uf->DateOfCommission;
$SupportVendor = $uf->SupportVendor; $Createdby = $uf->Createdby;
$SupportFrom = $uf->SupportFrom; $AssetValue = $uf->AssetValue;
$SupportTo = $uf->SupportTo;
} }
} }
@ -101,7 +99,20 @@ function demo(){
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="Department">Department</label> <label for="Department">Department</label>
<input type="text" class="form-control required" id="Department" name="Department" value="<?php echo $Department; ?>"> <select class="form-control required" id="Department" name="Department">
<option value="<?php echo $Department;?>"><?php echo $Department;?></option>
<?php
if(!empty($DepartmentList))
{
foreach ($DepartmentList as $SID)
{
?>
<option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div> </div>
</div> </div>
@ -118,8 +129,8 @@ function demo(){
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="AssetOwner">Asset Owner</label> <label for="User">User</label>
<input type="text" class="form-control required" id="AssetOwner" name="AssetOwner" value="<?php echo $AssetOwner;?>"> <input type="text" class="form-control required" id="AssetOwner" name="User" value="<?php echo $User;?>">
</div> </div>
</div> </div>
@ -127,7 +138,21 @@ function demo(){
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="SupplierName">Supplier Name</label> <label for="SupplierName">Supplier Name</label>
<input type="text" class="form-control required" id="SupplierName" name="SupplierName" value="<?php echo $SupplierName;?>"> <select class="form-control required" id="SupplierName" name="SupplierName">
<option value="<?php echo $SupplierName;?>"><?php echo $SupplierName;?></option>
<?php
if(!empty($SupplierList))
{
foreach ($SupplierList as $SID)
{
?>
<option value="<?php echo $SID->SupplierID; ?>"><?php echo $SID->SupplierID; ?> - <?php echo $SID->SupplierName; ?></option>
<?php
}
}
?>
</select>
</div> </div>
</div> </div>
@ -148,22 +173,11 @@ function demo(){
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="SupportVendor">Support Vendor</label> <label for="Assetvalue">Asset Value</label>
<input type="text" class="form-control required" id="SupportVendor" name="SupportVendor" maxlength="255"value="<?php echo $SupportVendor;?>"> <input type="text" value="<?php echo $AssetValue;?>"class="form-control required" id="Assetvalue" name="Assetvalue" maxlength="255">
<input type="hidden" class="form-control required" value="<?php echo $Createdby;?>"id="Createdby" name="Createdby" maxlength="255">
</div> </div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="SupportFrom">Support From</label>
<input type="date" name="SupportFrom" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $SupportFrom;?>" class="form-control" placeholder="" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="SupportTo">Support To</label>
<input type="date" name="SupportTo" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $SupportTo;?>" class="form-control" placeholder="" />
</div>
</div>
</div> </div>
</div><!-- /.box-body --> </div><!-- /.box-body -->
@ -175,37 +189,5 @@ function demo(){
</form> </form>
</div> </div>
</div> </div>
<div class="col-md-4">
<?php
$this->load->helper('form');
$error = $this->session->flashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = $this->session->flashdata('success');
if($success)
{
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>

View File

@ -168,7 +168,7 @@ function demo(){
<div class="col-md-6 col-xs-6"> <div class="col-md-6 col-xs-6">
<div class="form"> <div class="form">
<label for="UANumber">UA Number</label> <label for="UANumber">UA Number</label>
<input type="text" class="form-control " pattern="^\d{10,11}$"value="<?php echo $UANumber;?>" id="UANumber" name="UANumber" maxlength="10"> <input type="text" class="form-control " pattern="^\d{12}$"value="<?php echo $UANumber;?>" id="UANumber" name="UANumber" maxlength="12">
</div> </div>
</div> </div>

View File

@ -2,7 +2,7 @@
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center>RAW MATERIAL LIST</CENTER> <center>MATERIAL Master LIST</CENTER>
</h1> </h1>
</section> </section>
<section class="content"> <section class="content">
@ -17,7 +17,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<CENTER><h3 class="box-title">Raw Material List</h3><CENTER> <CENTER><h3 class="box-title">Material Master List</h3><CENTER>
<div class="box-tools"> <div class="box-tools">
<form action="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" method="POST" id="searchList"> <form action="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" method="POST" id="searchList">
<div class="input-group"> <div class="input-group">
@ -35,8 +35,8 @@
<th>Material Code</th> <th>Material Code</th>
<th>Material Name</th> <th>Material Name</th>
<th>Material Type</th> <th>Material Type</th>
<th>Supplier ID</th> <th>UOM</th>
<th>Created Date</th>
<th>Edit</th> <th>Edit</th>
@ -52,8 +52,8 @@
<td><?php echo $record->MaterialCode ?></td> <td><?php echo $record->MaterialCode ?></td>
<td><?php echo $record->MaterialName ?></td> <td><?php echo $record->MaterialName ?></td>
<td><?php echo $record->MaterialType ?></td> <td><?php echo $record->MaterialType ?></td>
<td><?php echo $record->SupplierID ?></td> <td><?php echo $record->UOM ?></td>
<td><?php echo $record->CreatedDate ?></td>
<td> <td>

View File

@ -5,13 +5,14 @@ $Asset_Name = '';
$Description = ''; $Description = '';
$Department = ''; $Department = '';
$Location = ''; $Location = '';
$AssetOwner = ''; $User = '';
$SupplierName = ''; $SupplierName = '';
$DateOfPurchase = ''; $DateOfPurchase = '';
$DateOfCommission = ''; $DateOfCommission = '';
$SupportVendor = ''; $AssetValue = '';
$SupportFrom = ''; $Createdby = '';
$SupportTo = ''; $CreatedDate = '';
@ -24,13 +25,13 @@ if(!empty($asset))
$Description = $uf->Description; $Description = $uf->Description;
$Department = $uf->Department; $Department = $uf->Department;
$Location = $uf->Location; $Location = $uf->Location;
$AssetOwner = $uf->AssetOwner; $User = $uf->User;
$SupplierName = $uf->SupplierName; $SupplierName = $uf->SupplierName;
$DateOfPurchase = $uf->DateOfPurchase; $DateOfPurchase = $uf->DateOfPurchase;
$DateOfCommission = $uf->DateOfCommission; $DateOfCommission = $uf->DateOfCommission;
$SupportVendor = $uf->SupportVendor; $AssetValue = $uf->AssetValue;
$SupportFrom = $uf->SupportFrom; $Createdby = $uf->Createdby;
$SupportTo = $uf->SupportTo; $CreatedDate = $uf->CreatedDate;
} }
} }
@ -112,8 +113,8 @@ function demo(){
<tr> <tr>
<td><label for="AssetOwner" class="col-md-7">Asset Owner</label></td> <td><label for="AssetOwner" class="col-md-7">User</label></td>
<td> <?php echo $AssetOwner?></td> <td> <?php echo $User?></td>
</tr> </tr>
@ -131,16 +132,16 @@ function demo(){
<td> <?php echo $DateOfCommission; ?></td> <td> <?php echo $DateOfCommission; ?></td>
</tr> </tr>
<tr> <tr>
<td> <label for="SupportVendor" class="col-md-7">Support Vendor</label></td> <td> <label for="CreatedDate" class="col-md-7">Created Date</label></td>
<td> <?php echo $SupportVendor; ?></td> <td> <?php echo $CreatedDate; ?></td>
</tr> </tr>
<tr> <tr>
<td> <label for="SupportFrom" class="col-md-7">Support From</label></td> <td> <label for="AssetValue" class="col-md-7">AssetValue</label></td>
<td> <?php echo $SupportFrom; ?></td> <td> <?php echo $AssetValue; ?></td>
</tr> </tr>
<tr> <tr>
<td> <label for="SupportTo" class="col-md-7">Support To</label></td> <td> <label for="Createdby" class="col-md-7">Created By</label></td>
<td> <?php echo $SupportTo; ?></td> <td> <?php echo $Createdby; ?></td>
</tr> </tr>
</div> </div>
</div> </div>

View File

@ -3,8 +3,9 @@
$MaterialCode = ''; $MaterialCode = '';
$MaterialName = ''; $MaterialName = '';
$MaterialType = ''; $MaterialType = '';
$SupplierID = ''; $UOM = '';
$CreatedDate = ''; $CreatedBy = '';
$UpdatedBy = '';
if(!empty($userRecords)) if(!empty($userRecords))
@ -14,8 +15,9 @@ if(!empty($userRecords))
$MaterialCode = $uf->MaterialCode; $MaterialCode = $uf->MaterialCode;
$MaterialName = $uf->MaterialName; $MaterialName = $uf->MaterialName;
$MaterialType = $uf->MaterialType; $MaterialType = $uf->MaterialType;
$SupplierID = $uf->SupplierID; $UOM = $uf->UOM;
$CreatedDate = $uf->CreatedDate; $CreatedBy = $uf->CreatedBy;
$UpdatedBy = $uf->UpdatedBy;
} }
} }
@ -81,8 +83,14 @@ if(!empty($userRecords))
<tr> <tr>
<td> <label for="SupplierID">Supplier ID</label></td> <td> <label for="UOM">UOM</label></td>
<td> <?php echo $SupplierID?></td> <td> <?php echo $UOM; ?></td>
</tr> <tr>
<td> <label for="CreatedBy">CreatedBy</label></td>
<td> <?php echo $CreatedBy; ?></td>
</tr> <tr>
<td> <label for="UpdatedBy">UpdatedBy</label></td>
<td> <?php echo $UpdatedBy; ?></td>
</tr> </tr>
</tbody> </tbody>
</div> </div>