completed Material master and asset details check for testing team
This commit is contained in:
parent
74aea3790b
commit
8958aa4b47
@ -61,6 +61,7 @@ class assetdetails extends BaseController
|
||||
|
||||
$this->load->model('assetdetails_model');
|
||||
$data['SupplierName'] = $this->assetdetails_model->getSupplierName();
|
||||
$data['Department'] = $this->assetdetails_model->getDepartment();
|
||||
//$data['POdate'] = $this->assetdetails_model->getPODate();
|
||||
|
||||
$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('Department','Department','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('DateOfPurchase','DateOfPurchase','trim');
|
||||
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim');
|
||||
$this->form_validation->set_rules('SupportVendor','SupportVendor','trim');
|
||||
$this->form_validation->set_rules('SupportFrom','SupportFrom','trim');
|
||||
$this->form_validation->set_rules('SupportTo','SupportTo','trim');
|
||||
$this->form_validation->set_rules('AssetValue','AssetValue','trim');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -104,29 +104,29 @@ class assetdetails extends BaseController
|
||||
$Description = $this->input->post('Description');
|
||||
$Department = $this->input->post('Department');
|
||||
$Location = $this->input->post('Location');
|
||||
$AssetOwner = $this->input->post('AssetOwner');
|
||||
$User = $this->input->post('User');
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||
$SupportVendor = $this->input->post('SupportVendor');
|
||||
$SupportFrom = $this->input->post('SupportFrom');
|
||||
$SupportTo = $this->input->post('SupportTo');
|
||||
$Createdby = $this->input->post('Createdby');
|
||||
$AssetValue = $this->input->post('AssetValue');
|
||||
|
||||
|
||||
|
||||
|
||||
$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');
|
||||
$result = $this->assetdetails_model->addNewasset($asset);
|
||||
|
||||
if($result > 0)
|
||||
{
|
||||
$this->session->set_flashdata('success', 'New PO created successfully');
|
||||
$this->session->set_flashdata('success', 'New Asset created successfully');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_flashdata('error', 'PO Not Create');
|
||||
$this->session->set_flashdata('error', 'Asset Not Create');
|
||||
}
|
||||
|
||||
redirect('assetdetails/assetListing');
|
||||
@ -153,8 +153,9 @@ class assetdetails extends BaseController
|
||||
}
|
||||
|
||||
$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->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('Department','Department','trim|required');
|
||||
$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('DateOfPurchase','DateOfPurchase','trim');
|
||||
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim');
|
||||
$this->form_validation->set_rules('SupportVendor','SupportVendor','trim');
|
||||
$this->form_validation->set_rules('SupportFrom','SupportFrom','trim');
|
||||
$this->form_validation->set_rules('SupportTo','SupportTo','trim');
|
||||
|
||||
$this->form_validation->set_rules('AssetValue','AssetValue','trim|required');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
@ -196,19 +194,17 @@ class assetdetails extends BaseController
|
||||
$Description = $this->input->post('Description');
|
||||
$Department = $this->input->post('Department');
|
||||
$Location = $this->input->post('Location');
|
||||
$AssetOwner = $this->input->post('AssetOwner');
|
||||
$User = $this->input->post('User');
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||
$SupportVendor = $this->input->post('SupportVendor');
|
||||
$SupportFrom = $this->input->post('SupportFrom');
|
||||
$SupportTo = $this->input->post('SupportTo');
|
||||
$Createdby = $this->input->post('Createdby');
|
||||
$AssetValue = $this->input->post('AssetValue');
|
||||
|
||||
$asset = array();
|
||||
|
||||
|
||||
|
||||
$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'));
|
||||
$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'));
|
||||
|
||||
|
||||
|
||||
@ -222,8 +218,8 @@ class assetdetails extends BaseController
|
||||
{
|
||||
$this->session->set_flashdata('error', 'Asset updation failed');
|
||||
}
|
||||
|
||||
redirect('assetListing');
|
||||
echo $asset;
|
||||
// redirect('assetListing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -58,21 +58,17 @@ class rawmaterialdetails extends BaseController
|
||||
* This function is used to load the add new cost */
|
||||
function addRawMaterial()
|
||||
{
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->load->model('rawmaterialdetails_model');
|
||||
$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName();
|
||||
//$data['SupplierName'] = $this->rawmaterialdetails_model->getSupplierName();
|
||||
$data['material'] = $this->rawmaterialdetails_model->getmaterial();
|
||||
$data['UOM'] = $this->rawmaterialdetails_model->getUOM();
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'siddharth : AddNew RawMaterial';
|
||||
|
||||
$this->loadViews("addRawmaterial", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,13 +76,7 @@ class rawmaterialdetails extends BaseController
|
||||
*/
|
||||
function addNewRawMaterial()
|
||||
{
|
||||
echo 'allowed edit';
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
//$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('MaterialName','Material Name','trim|required|');
|
||||
$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)
|
||||
{
|
||||
$this->addcost();
|
||||
$this->addRawMaterial();
|
||||
}
|
||||
else
|
||||
{
|
||||
$MaterialName = ucwords(strtolower($this->input->post('MaterialName')));
|
||||
$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');
|
||||
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
|
||||
@ -127,37 +118,20 @@ class rawmaterialdetails extends BaseController
|
||||
|
||||
redirect('rawmaterialListing');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function viewRawmaterial($RawMaterialID = NULL)
|
||||
{
|
||||
//echo 'allowed edit';
|
||||
|
||||
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();
|
||||
$this->load->model('rawmaterialdetails_model');
|
||||
$data['userRecords'] = $this->rawmaterialdetails_model->getuserInfo($RawMaterialID);
|
||||
$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 function is used load user edit information
|
||||
@ -165,31 +139,14 @@ class rawmaterialdetails extends BaseController
|
||||
*/
|
||||
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('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)
|
||||
{
|
||||
@ -229,14 +186,16 @@ class rawmaterialdetails extends BaseController
|
||||
$MaterialCode = $this->input->post('MaterialCode');
|
||||
$MaterialName = ucwords(strtolower($this->input->post('MaterialName')));
|
||||
$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 'passed model';
|
||||
$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';
|
||||
$result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode);
|
||||
|
||||
@ -120,7 +120,7 @@ class supplier extends BaseController
|
||||
$this->form_validation->set_rules('UANumber','UANumber','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('PayableAT','PaymentTerms','trim|required');
|
||||
$this->form_validation->set_rules('PayableAT','PayableAT','trim|required');
|
||||
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
@ -239,6 +239,7 @@ class supplier extends BaseController
|
||||
$PaymentDays = $this->input->post('PaymentDays');
|
||||
$PayableAT = $this->input->post('PayableAT');
|
||||
$UpdatedBy = $this->input->post('UpdatedBy');
|
||||
$Createdby = $this->input->post('Createdby');
|
||||
|
||||
|
||||
$supplier = array();
|
||||
@ -247,10 +248,10 @@ class supplier extends BaseController
|
||||
|
||||
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{
|
||||
$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);
|
||||
|
||||
@ -9,7 +9,7 @@ class assetdetails_model extends CI_Model
|
||||
*/
|
||||
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->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.DateOfPurchase LIKE '%".$searchText."%'
|
||||
OR BaseT.Location LIKE '%".$searchText."%'
|
||||
OR BaseT.AssetOwner LIKE '%".$searchText."%'
|
||||
OR BaseT.User LIKE '%".$searchText."%'
|
||||
OR BaseT.DateOfCommission LIKE '%".$searchText."%'
|
||||
OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportVendor LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportFrom LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportTo LIKE '%".$searchText."%'
|
||||
OR BaseT.AssetValue LIKE '%".$searchText."%'
|
||||
OR BaseT.AssetValue LIKE '%".$searchText."%'
|
||||
OR BaseT.CreatedDate LIKE '%".$searchText."%'
|
||||
)";
|
||||
$this->db->where($likeCriteria);
|
||||
@ -48,7 +47,7 @@ class assetdetails_model extends CI_Model
|
||||
*/
|
||||
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->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.DateOfPurchase LIKE '%".$searchText."%'
|
||||
OR BaseT.Location LIKE '%".$searchText."%'
|
||||
OR BaseT.AssetOwner LIKE '%".$searchText."%'
|
||||
OR BaseT.User LIKE '%".$searchText."%'
|
||||
OR BaseT.DateOfCommission LIKE '%".$searchText."%'
|
||||
OR BaseT.DateOfPurchase LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportVendor LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportFrom LIKE '%".$searchText."%'
|
||||
OR BaseT.SupportTo LIKE '%".$searchText."%'
|
||||
OR BaseT.AssetValue LIKE '%".$searchText."%'
|
||||
|
||||
OR BaseT.CreatedDate LIKE '%".$searchText."%'
|
||||
)";
|
||||
$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()
|
||||
{
|
||||
$this->db->select('SupplierID, SupplierName');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
//$this->db->where('roleId !=', 1);
|
||||
// $this->db->where('Address');
|
||||
//$this->db->where('roleId !=', 1);
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function used to get user information by id
|
||||
* @param number $userId : This is user id
|
||||
@ -117,7 +128,7 @@ function addNewasset($asset)
|
||||
*/
|
||||
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->where('isDeleted', 0);
|
||||
//$this->db->where('roleId !=', 1);
|
||||
|
||||
@ -9,10 +9,10 @@ class rawmaterialdetails_model extends CI_Model
|
||||
*/
|
||||
function rawmaterialListingCount($searchText = '')
|
||||
{
|
||||
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, ID.SupplierID, BaseT.CreatedDate');
|
||||
$this->db->from('T_RawMaterialDetailsN as BaseT');
|
||||
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.UOM, BaseT.CreatedDate');
|
||||
$this->db->from('T_MaterialMaster as BaseT');
|
||||
//$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)) {
|
||||
$likeCriteria = "(BaseT.MaterialCode LIKE '%".$searchText."%'
|
||||
OR BaseT.MaterialName LIKE '%".$searchText."%'
|
||||
@ -35,8 +35,8 @@ class rawmaterialdetails_model extends CI_Model
|
||||
*/
|
||||
function rawmaterialListing($searchText = '', $page, $segment)
|
||||
{
|
||||
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.SupplierID ,BaseT.CreatedDate');
|
||||
$this->db->from('T_RawMaterialDetailsN as BaseT');
|
||||
$this->db->select('BaseT.MaterialCode, BaseT.MaterialName, BaseT.MaterialType, BaseT.UOM ,BaseT.CreatedDate');
|
||||
$this->db->from('T_MaterialMaster as BaseT');
|
||||
|
||||
//$this->db->join('T_SupplierDetailsN as ID', 'ID.SupplierID = BaseT.SupplierID','left');
|
||||
if(!empty($searchText)) {
|
||||
@ -55,14 +55,17 @@ class rawmaterialdetails_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getSupplierName()
|
||||
|
||||
|
||||
function getUOM()
|
||||
{
|
||||
|
||||
$this->db->select('SupplierID, SupplierName');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
$ConfigID = 'C001';
|
||||
$this->db->select('ConfigValue');
|
||||
$this->db->from('T_ConfigDetails');
|
||||
$this->db->where('Config_id ',$ConfigID );
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function getmaterial()
|
||||
@ -85,7 +88,7 @@ class rawmaterialdetails_model extends CI_Model
|
||||
function addNewRawMaterial($RawMaterial)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_RawMaterialDetailsN', $RawMaterial);
|
||||
$this->db->insert('T_MaterialMaster', $RawMaterial);
|
||||
|
||||
$MaterialCode = $this->db->insert_id();
|
||||
|
||||
@ -101,8 +104,8 @@ function addNewRawMaterial($RawMaterial)
|
||||
*/
|
||||
function getuserInfo($MaterialCode)
|
||||
{
|
||||
$this->db->select('MaterialCode, MaterialName,MaterialType,SupplierID,CreatedDate');
|
||||
$this->db->from('T_RawMaterialDetailsN');
|
||||
$this->db->select('MaterialCode, MaterialName,MaterialType,UOM,CreatedBy,UpdatedBy,CreatedDate');
|
||||
$this->db->from('T_MaterialMaster');
|
||||
//$this->db->where('isDeleted', 0);
|
||||
//$this->db->where('roleId !=', 1);
|
||||
$this->db->where('MaterialCode', $MaterialCode);
|
||||
@ -116,7 +119,7 @@ function addNewRawMaterial($RawMaterial)
|
||||
|
||||
|
||||
$this->db->where('MaterialCode', $MaterialCode);
|
||||
$this->db->update('T_RawMaterialDetailsN', $RawMaterial);
|
||||
$this->db->update('T_MaterialMaster', $RawMaterial);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -127,7 +130,7 @@ function addNewRawMaterial($RawMaterial)
|
||||
|
||||
|
||||
$this->db->where('MaterialCode', $MaterialCode);
|
||||
$this->db->update('T_RawMaterialDetailsN', $RawMaterial);
|
||||
$this->db->update('T_MaterialMaster', $RawMaterial);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Raw Material List </center>
|
||||
<center>Add Material Master </center>
|
||||
|
||||
</h1>
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
|
||||
<div class="box box-primary">
|
||||
<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 -->
|
||||
<!-- 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="row">
|
||||
<!--<div class="col-md-6">
|
||||
@ -48,7 +48,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
<?php
|
||||
if(!empty($material))
|
||||
@ -66,16 +66,16 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupplierID">Supplier Name</label>
|
||||
<select class="form-control required" id="SupplierID" name="SupplierID">
|
||||
<option value="null" required>Select Supplier Name</option>
|
||||
<label for="UOM">Unit of Mesurement</label>
|
||||
<select class="form-control required" id="UOM" name="UOM">
|
||||
<option value="0" required>Select UOM</option>
|
||||
<?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
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control required " value="<?php echo $name; ?>"id="CreatedBy" name="CreatedBy">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -63,7 +63,20 @@
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@ -81,7 +94,7 @@
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@ -90,14 +103,14 @@
|
||||
<div class="form-group">
|
||||
<label for="SupplierName">Supplier Name</label>
|
||||
<select class="form-control required" id="SupplierName" name="SupplierName">
|
||||
<option value="0">Select Name</option>
|
||||
<option >Select Supplier Name</option>
|
||||
<?php
|
||||
if(!empty($SupplierName))
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
@ -109,35 +122,24 @@
|
||||
|
||||
<div class="form-group">
|
||||
<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 class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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 class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupportVendor">Support Vendor</label>
|
||||
<input type="text" class="form-control required" id="SupportVendor" name="SupportVendor" maxlength="255">
|
||||
<label for="Assetvalue">Asset Value</label>
|
||||
<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 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><!-- /.box-body -->
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
<div class="col-md-6 col-xs-6">
|
||||
<label for="payablefrom">Payable From</label>
|
||||
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||
<option value="0">Select Payment method</option>
|
||||
<option >Select Payment method</option>
|
||||
<?php
|
||||
if(!empty($payment))
|
||||
{
|
||||
@ -161,7 +161,7 @@
|
||||
<div class="form">
|
||||
<label for="PayableAT">Payable AT</label>
|
||||
<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>
|
||||
|
||||
@ -38,13 +38,13 @@
|
||||
<th>Description</th>
|
||||
<th>Department</th>
|
||||
<th>Location</th>
|
||||
<th>Asset Owner</th>
|
||||
<th>User</th>
|
||||
<th>Supplier Name</th>
|
||||
<th>Date Of Purchase</th>
|
||||
<th>Support From</th>
|
||||
<th>Support To</th>
|
||||
<th>Asset Value</th>
|
||||
|
||||
<th>Create Date</th>
|
||||
<th>Edit</th>
|
||||
<th>Action</th>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
@ -59,11 +59,12 @@
|
||||
<td><?php echo $record->Description ?></td>
|
||||
<td><?php echo $record->Department ?></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->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>
|
||||
|
||||
@ -3,9 +3,8 @@
|
||||
$MaterialCode = '';
|
||||
$MaterialName = '';
|
||||
$MaterialType = '';
|
||||
$SupplierID = '';
|
||||
$CreatedDate = '';
|
||||
|
||||
$UOM = '';
|
||||
$CreatedBy = '';
|
||||
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
@ -14,8 +13,9 @@ if(!empty($userRecords))
|
||||
$MaterialCode = $uf->MaterialCode;
|
||||
$MaterialName = $uf->MaterialName;
|
||||
$MaterialType = $uf->MaterialType;
|
||||
$SupplierID = $uf->SupplierID;
|
||||
$CreatedDate = $uf->CreatedDate;
|
||||
$UOM = $uf->UOM;
|
||||
$CreatedBy = $uf->CreatedBy;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,7 @@ if(!empty($userRecords))
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Raw Material List</center>
|
||||
<center>Edit Material Master</center>
|
||||
|
||||
</h1>
|
||||
</section>
|
||||
@ -46,7 +46,7 @@ if(!empty($userRecords))
|
||||
|
||||
<div class="box box-primary">
|
||||
<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 -->
|
||||
<!-- form start -->
|
||||
|
||||
@ -56,24 +56,22 @@ if(!empty($userRecords))
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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="hidden" class="form-control" value="<?php echo $MaterialCode;?>" id="MaterialCode" name="MaterialCode" >
|
||||
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialCode;?>">
|
||||
<input type="hidden" class="form-control required " id="MaterialCode" value="<?php echo $MaterialCode;?>"name="MaterialCode" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="MaterialType">Material Type</label>
|
||||
<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
|
||||
if(!empty($material))
|
||||
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
@ -83,16 +81,16 @@ if(!empty($userRecords))
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupplierID">Supplier ID</label>
|
||||
<select class="form-control required" id="SupplierID" name="SupplierID">
|
||||
<option value="<?php echo $SupplierID; ?>">Select Supplier Name</option>
|
||||
<label for="UOM">Unit of Mesurement</label>
|
||||
<select class="form-control required" id="UOM" name="UOM">
|
||||
<option value="<?php echo $UOM;?>" required><?php echo $UOM;?></option>
|
||||
<?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
|
||||
}
|
||||
}
|
||||
@ -100,7 +98,8 @@ if(!empty($userRecords))
|
||||
</select>
|
||||
</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>
|
||||
|
||||
@ -5,13 +5,12 @@ $Asset_Name = '';
|
||||
$Description = '';
|
||||
$Department = '';
|
||||
$Location = '';
|
||||
$AssetOwner = '';
|
||||
$User = '';
|
||||
$SupplierName = '';
|
||||
$DateOfPurchase = '';
|
||||
$DateOfCommission = '';
|
||||
$SupportVendor = '';
|
||||
$SupportFrom = '';
|
||||
$SupportTo = '';
|
||||
$AssetValue = '';
|
||||
$Createdby = '';
|
||||
|
||||
|
||||
|
||||
@ -24,13 +23,12 @@ if(!empty($asset))
|
||||
$Description = $uf->Description;
|
||||
$Department = $uf->Department;
|
||||
$Location = $uf->Location;
|
||||
$AssetOwner = $uf->AssetOwner;
|
||||
$User = $uf->User;
|
||||
$SupplierName = $uf->SupplierName;
|
||||
$DateOfPurchase = $uf->DateOfPurchase;
|
||||
$DateOfCommission = $uf->DateOfCommission;
|
||||
$SupportVendor = $uf->SupportVendor;
|
||||
$SupportFrom = $uf->SupportFrom;
|
||||
$SupportTo = $uf->SupportTo;
|
||||
$Createdby = $uf->Createdby;
|
||||
$AssetValue = $uf->AssetValue;
|
||||
|
||||
}
|
||||
}
|
||||
@ -101,7 +99,20 @@ function demo(){
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@ -118,8 +129,8 @@ function demo(){
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="AssetOwner">Asset Owner</label>
|
||||
<input type="text" class="form-control required" id="AssetOwner" name="AssetOwner" value="<?php echo $AssetOwner;?>">
|
||||
<label for="User">User</label>
|
||||
<input type="text" class="form-control required" id="AssetOwner" name="User" value="<?php echo $User;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -127,7 +138,21 @@ function demo(){
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
@ -148,22 +173,11 @@ function demo(){
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupportVendor">Support Vendor</label>
|
||||
<input type="text" class="form-control required" id="SupportVendor" name="SupportVendor" maxlength="255"value="<?php echo $SupportVendor;?>">
|
||||
<label for="Assetvalue">Asset Value</label>
|
||||
<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 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><!-- /.box-body -->
|
||||
|
||||
@ -175,37 +189,5 @@ function demo(){
|
||||
</form>
|
||||
</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>
|
||||
@ -168,7 +168,7 @@ function demo(){
|
||||
<div class="col-md-6 col-xs-6">
|
||||
<div class="form">
|
||||
<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>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>RAW MATERIAL LIST</CENTER>
|
||||
<center>MATERIAL Master LIST</CENTER>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<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">
|
||||
<form action="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" method="POST" id="searchList">
|
||||
<div class="input-group">
|
||||
@ -35,8 +35,8 @@
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Material Type</th>
|
||||
<th>Supplier ID</th>
|
||||
<th>Created Date</th>
|
||||
<th>UOM</th>
|
||||
|
||||
<th>Edit</th>
|
||||
|
||||
|
||||
@ -52,8 +52,8 @@
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php echo $record->MaterialType ?></td>
|
||||
<td><?php echo $record->SupplierID ?></td>
|
||||
<td><?php echo $record->CreatedDate ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
@ -5,13 +5,14 @@ $Asset_Name = '';
|
||||
$Description = '';
|
||||
$Department = '';
|
||||
$Location = '';
|
||||
$AssetOwner = '';
|
||||
$User = '';
|
||||
$SupplierName = '';
|
||||
$DateOfPurchase = '';
|
||||
$DateOfCommission = '';
|
||||
$SupportVendor = '';
|
||||
$SupportFrom = '';
|
||||
$SupportTo = '';
|
||||
$AssetValue = '';
|
||||
$Createdby = '';
|
||||
$CreatedDate = '';
|
||||
|
||||
|
||||
|
||||
|
||||
@ -24,13 +25,13 @@ if(!empty($asset))
|
||||
$Description = $uf->Description;
|
||||
$Department = $uf->Department;
|
||||
$Location = $uf->Location;
|
||||
$AssetOwner = $uf->AssetOwner;
|
||||
$User = $uf->User;
|
||||
$SupplierName = $uf->SupplierName;
|
||||
$DateOfPurchase = $uf->DateOfPurchase;
|
||||
$DateOfCommission = $uf->DateOfCommission;
|
||||
$SupportVendor = $uf->SupportVendor;
|
||||
$SupportFrom = $uf->SupportFrom;
|
||||
$SupportTo = $uf->SupportTo;
|
||||
$AssetValue = $uf->AssetValue;
|
||||
$Createdby = $uf->Createdby;
|
||||
$CreatedDate = $uf->CreatedDate;
|
||||
|
||||
}
|
||||
}
|
||||
@ -112,8 +113,8 @@ function demo(){
|
||||
|
||||
<tr>
|
||||
|
||||
<td><label for="AssetOwner" class="col-md-7">Asset Owner</label></td>
|
||||
<td> <?php echo $AssetOwner?></td>
|
||||
<td><label for="AssetOwner" class="col-md-7">User</label></td>
|
||||
<td> <?php echo $User?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
@ -131,16 +132,16 @@ function demo(){
|
||||
<td> <?php echo $DateOfCommission; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <label for="SupportVendor" class="col-md-7">Support Vendor</label></td>
|
||||
<td> <?php echo $SupportVendor; ?></td>
|
||||
<td> <label for="CreatedDate" class="col-md-7">Created Date</label></td>
|
||||
<td> <?php echo $CreatedDate; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <label for="SupportFrom" class="col-md-7">Support From</label></td>
|
||||
<td> <?php echo $SupportFrom; ?></td>
|
||||
<td> <label for="AssetValue" class="col-md-7">AssetValue</label></td>
|
||||
<td> <?php echo $AssetValue; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <label for="SupportTo" class="col-md-7">Support To</label></td>
|
||||
<td> <?php echo $SupportTo; ?></td>
|
||||
<td> <label for="Createdby" class="col-md-7">Created By</label></td>
|
||||
<td> <?php echo $Createdby; ?></td>
|
||||
</tr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
$MaterialCode = '';
|
||||
$MaterialName = '';
|
||||
$MaterialType = '';
|
||||
$SupplierID = '';
|
||||
$CreatedDate = '';
|
||||
$UOM = '';
|
||||
$CreatedBy = '';
|
||||
$UpdatedBy = '';
|
||||
|
||||
|
||||
if(!empty($userRecords))
|
||||
@ -14,8 +15,9 @@ if(!empty($userRecords))
|
||||
$MaterialCode = $uf->MaterialCode;
|
||||
$MaterialName = $uf->MaterialName;
|
||||
$MaterialType = $uf->MaterialType;
|
||||
$SupplierID = $uf->SupplierID;
|
||||
$CreatedDate = $uf->CreatedDate;
|
||||
$UOM = $uf->UOM;
|
||||
$CreatedBy = $uf->CreatedBy;
|
||||
$UpdatedBy = $uf->UpdatedBy;
|
||||
|
||||
}
|
||||
}
|
||||
@ -81,8 +83,14 @@ if(!empty($userRecords))
|
||||
|
||||
|
||||
<tr>
|
||||
<td> <label for="SupplierID">Supplier ID</label></td>
|
||||
<td> <?php echo $SupplierID?></td>
|
||||
<td> <label for="UOM">UOM</label></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>
|
||||
</tbody>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user