From a665dc58e97edc5f3bdd6f99fc3604515dd2307e Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 18 Jul 2017 13:24:48 +0530 Subject: [PATCH] materialmaster changes code --- .../controllers/rawmaterialdetails.php | 343 ++++++++++-------- .../models/rawmaterialdetails_model.php | 162 ++++++--- application/views/addRawMaterial.php | 192 ++++++++-- application/views/editOldRawmaterial.php | 278 +++++++++++--- application/views/rawmaterialListing.php | 37 +- 5 files changed, 716 insertions(+), 296 deletions(-) diff --git a/application/controllers/rawmaterialdetails.php b/application/controllers/rawmaterialdetails.php index 5fe3ac95..3c7bde10 100755 --- a/application/controllers/rawmaterialdetails.php +++ b/application/controllers/rawmaterialdetails.php @@ -14,27 +14,27 @@ class rawmaterialdetails extends BaseController /** * This is default constructor of the class */ - public function __construct() + public function __construct() { parent::__construct(); $this->load->model('rawmaterialdetails_model'); - $this->load->library('pagination'); - $this->load->library('form_validation'); - $this->load->library('Excel'); + $this->load->library('pagination'); + $this->load->library('form_validation'); + $this->load->library('Excel'); - $this->isLoggedIn(); + $this->isLoggedIn(); } - /** + /** * This function used to load the first screen of the user */ - public function index() + public function index() { $this->global['pageTitle'] = 'Siddharth : RawMaterialDetails'; $this->loadViews("rawmaterialListing", $this->global, NULL , NULL); } - - /** + + /** * This function is used to load the RawMaterialDetails list */ function rawmaterialListing() @@ -42,8 +42,6 @@ class rawmaterialdetails extends BaseController $this->load->model('rawmaterialdetails_model'); - - $data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing(); $this->global['pageTitle'] = 'Siddharth : RawMaterial Listing'; @@ -51,62 +49,78 @@ class rawmaterialdetails extends BaseController $this->loadViews("rawmaterialListing", $this->global, $data, NULL); } - /** + /** * This function is used to load the add new cost */ function addRawMaterial() { $this->load->model('rawmaterialdetails_model'); $data['material'] = $this->rawmaterialdetails_model->getmaterialType(); - $data['UOM'] = $this->rawmaterialdetails_model->getUOM(); - + $data['materialcategory'] = $this->rawmaterialdetails_model->getmaterialCategory(); + $data['UOM'] = $this->rawmaterialdetails_model->getUOM(); + $data['assetcode'] = $this->rawmaterialdetails_model->getAssetcode(); + $data['costcentercode'] =$this->rawmaterialdetails_model->getcostcentercode(); + $data['cfUOM'] = $this->rawmaterialdetails_model->getConversionfactorUOM(); $this->global['pageTitle'] = 'siddharth : AddNew RawMaterial'; - $this->loadViews("addRawMaterial", $this->global, $data, NULL); } - /* - Validation for Material Type Dropdown - */ - function MaterialType_validate($selectValue) -{ - //echo 'select_validate method called'; + + /* Validation for Material Type Dropdown */ + function MaterialType_validate($selectValue) + { + //echo 'select_validate method called'; + //'none' is the first option and the text says something like "-Choose one-" + if($selectValue == '-1') + { + $this->form_validation->set_message('MaterialType_validate', 'Please Select Material Type.'); + return false; + } + else // user picked something + { + return true; + } + } + + /* Validation for Material Type Dropdown */ + function UOM_validate($selectValue) + { + //echo 'select_validate method called'; // 'none' is the first option and the text says something like "-Choose one-" - if($selectValue == '-1') - { - $this->form_validation->set_message('MaterialType_validate', 'Please Select Material Type.'); - return false; + if($selectValue == '-1') + { + $this->form_validation->set_message('UOM_validate', 'Please Select UOM.'); + return false; + } + else // user picked something + { + return true; + } } - else // user picked something - { - return true; - } -} -/* - Validation for Material Type Dropdown - */ - function UOM_validate($selectValue) -{ - //echo 'select_validate method called'; - // 'none' is the first option and the text says something like "-Choose one-" - if($selectValue == '-1') - { - $this->form_validation->set_message('UOM_validate', 'Please Select UOM.'); - return false; - } - else // user picked something - { - return true; - } -} - /* This function is used to add new Cost to the system - */ + + /* Validation for Material Category Dropdown */ + function materialcategory_validate($selectValue) + { + + if($selectValue == '0') + { + $this->form_validation->set_message('materialcategory_validate', 'Please Select Material Category.'); + return false; + } + else + { + return true; + } + } + + function addNewRawMaterial() { - + $this->form_validation->set_rules('MaterialName','Material Name','trim|required|'); - $this->form_validation->set_rules('MaterialType','MaterialType','trim|callback_MaterialType_validate'); - $this->form_validation->set_rules('UOM','UOM','trim|callback_UOM_validate'); + $this->form_validation->set_rules('MaterialType','MaterialType','trim|callback_MaterialType_validate'); + $this->form_validation->set_rules('UOM','UOM','trim|callback_UOM_validate'); + $this->form_validation->set_rules('MaterialCategory','MaterialCategory','trim|callback__validate'); if($this->form_validation->run() == FALSE) { @@ -117,117 +131,137 @@ class rawmaterialdetails extends BaseController $MaterialName = $this->input->post('MaterialName'); $MaterialType = $this->input->post('MaterialType'); $UOM = $this->input->post('UOM'); + $MaterialCategory = $this->input->post('MaterialCategory'); + $Remarks = $this->input->post('remarks'); + $AssetCode = $this->input->post('Assetcode'); + $CostCenterCode = $this->input->post('Costcenter'); + $ConversionFactor = $this->input->post('conversionfactor'); + $ConversionFactorUOM = $this->input->post('conversionfactorUOM'); $CreatedBy = $this->session->userdata('userId'); - - $chked = $this->input->post('isactive'); - - if( $chked != '') - { - $IsActive = '1'; - } - else - { - $IsActive = '0'; - } - - $RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'CreatedBy'=>$CreatedBy,'IsActive' => $IsActive); + $chked = $this->input->post('isactive'); + + if( $chked != '') + { + $IsActive = '1'; + } + else + { + $IsActive = '0'; + } + + $RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'Category'=>$MaterialCategory, 'CreatedBy'=>$CreatedBy,'IsActive' => $IsActive,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks); $result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial); if($result > 0) { redirect('rawmaterialListing','refresh'); - echo ""; - + echo ""; + } else { redirect('rawmaterialListing','refresh'); - echo ""; - + echo ""; + } } } - function viewRawmaterial($RID= '') + + function viewRawmaterial($RID= '') { - $MaterialType = ''; - $UOM = ''; - if($RID == '') - { - $RawMaterialID = $_GET['RID']; - $MaterialType = $_GET['MType']; - $UOM = $_GET['UOM']; - } - else - { - $RawMaterialID = $RID; - } - + $MaterialType = ''; + $UOM = ''; + $MaterialCategory = ''; + + + if($RID == '') + { + $RawMaterialID = $_GET['RID']; + $MaterialType = $_GET['MType']; + $UOM = $_GET['UOM']; + } + else + { + $RawMaterialID = $RID; + } + $data['materialDetails'] = $this->rawmaterialdetails_model->getMaterialDetails($RawMaterialID); - - $data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType ); - $data['UOMList'] = $this->rawmaterialdetails_model->getUOM($UOM); + $data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType ); + $data['materialCategory'] = $this->rawmaterialdetails_model->getmaterialCategory($MaterialCategory); + $data['UOMList'] = $this->rawmaterialdetails_model->getUOM($UOM); + $data['costcentercode'] =$this->rawmaterialdetails_model->getCostCenterCode(); + $data['cfUOM'] = $this->rawmaterialdetails_model->getConversionfactorUOM(); + $data['assetcode'] = $this->rawmaterialdetails_model->getAssetcode(); $this->global['pageTitle'] = 'Siddharth : Edit Material Master'; $this->loadViews("editOldRawmaterial", $this->global,$data, NULL); } - - - /** + + + /** * This function is used to edit the user information */ function editRawmaterial() { - if($this->isAdmin() == TRUE) + if($this->isAdmin() == TRUE) { - $this->loadThis(); + $this->loadThis(); } else { - $RawmaterialID = $this->input->post('MaterialCode'); + $RawmaterialID = $this->input->post('MaterialCode'); $this->form_validation->set_rules('MaterialName','Material Name','trim|required|'); $this->form_validation->set_rules('MaterialType','MaterialType','trim'); $this->form_validation->set_rules('UOM','UOM','trim'); + if($this->form_validation->run() == FALSE) { $this->viewRawmaterial($RawmaterialID); - + } else { - $MaterialCode = $this->input->post('MaterialCode'); + $MaterialCode = $this->input->post('MaterialCode'); $MaterialName = $this->input->post('MaterialName'); $MaterialType = $this->input->post('MaterialType'); + $MaterialCategory =$this->input->post('MaterialCategory'); $UOM = $this->input->post('UOM'); + $rmcode = $this->input->post('RMcode'); + $Remarks = $this->input->post('remarks'); + $AssetCode = $this->input->post('Assetcode'); + $CostCenterCode = $this->input->post('Costcenter'); + $ConversionFactor = $this->input->post('conversionfactor'); + $ConversionFactorUOM = $this->input->post('conversionfactorUOM'); $UpdatedBy = $this->session->userdata ('userId'); - $chked = $this->input->post('isactive'); - - if( $chked != '') - { - $IsActive = '1'; - } - else - { - $IsActive = '0'; - } - + $chked = $this->input->post('isactive'); + + if( $chked != '') + { + $IsActive = '1'; + } + else + { + $IsActive = '0'; + } + $RawMaterial = array(); - $RawMaterial = array('MaterialName'=>$MaterialName,'MaterialType'=>$MaterialType,'UpdatedBy'=>$UpdatedBy, 'UOM'=>$UOM,'IsActive' => $IsActive); - + $RawMaterial = array('MaterialName'=>$MaterialName,'MaterialType'=>$MaterialType,'UpdatedBy'=>$UpdatedBy, 'UOM'=>$UOM,'IsActive' => $IsActive,'Category'=>$MaterialCategory,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode);//,'RMCode'=>$rmcode); + //print_r($RawMaterial);die(); $result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode); if($result == true) { - redirect('rawmaterialListing','refresh'); + redirect('rawmaterialListing','refresh'); - echo ""; + echo ""; } else { - redirect('rawmaterialListing','refresh'); - echo ""; + redirect('rawmaterialListing','refresh'); + echo ""; } @@ -235,24 +269,32 @@ class rawmaterialdetails extends BaseController } } } - /** this function can be use for excel report **/ - - function export_material(){ - - - $this->load->library('excel'); + + /** this function can be use for excel report **/ + + function export_material(){ + + + $this->load->library('excel'); $this->excel->setActiveSheetIndex(0)->mergeCells('D3:J3'); - $this->excel->getActiveSheet()->setTitle('Material Master'); + $this->excel->getActiveSheet()->setTitle('Material Master'); $this->excel->getActiveSheet()->setCellValue('D3', 'SIDDHARTH INDUSTRIES Raw Material'); $this->excel->getActiveSheet()->setCellValue('C5', 'MaterialCode'); $this->excel->getActiveSheet()->setCellValue('D5', 'MaterialName'); $this->excel->getActiveSheet()->setCellValue('E5', 'MaterialType'); $this->excel->getActiveSheet()->setCellValue('F5', 'UOM'); - $this->excel->getActiveSheet()->setCellValue('G5', 'Created by'); - $this->excel->getActiveSheet()->setCellValue('H5', 'Updated By'); - $this->excel->getActiveSheet()->setCellValue('I5', 'IsActive'); + $this->excel->getActiveSheet()->setCellValue('G5', 'RMCode'); + $this->excel->getActiveSheet()->setCellValue('H5', 'Category'); + $this->excel->getActiveSheet()->setCellValue('I5', 'assetcode'); + $this->excel->getActiveSheet()->setCellValue('J5', 'CostCenterCode'); + $this->excel->getActiveSheet()->setCellValue('K5', 'ConversionFactorUnit'); + $this->excel->getActiveSheet()->setCellValue('L5', 'ConversionFactorUOM'); + $this->excel->getActiveSheet()->setCellValue('M5', 'Remarks'); + $this->excel->getActiveSheet()->setCellValue('N5', 'Created by'); + $this->excel->getActiveSheet()->setCellValue('O5', 'Updated By'); + $this->excel->getActiveSheet()->setCellValue('P5', 'IsActive'); @@ -263,39 +305,54 @@ class rawmaterialdetails extends BaseController $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('E5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('F5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('G5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('H5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('I5')->getFont()->setBold(true); - - + $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('J5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('K5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('L5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('M5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('N5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('O5')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setBold(true); $exportData = $this->rawmaterialdetails_model->export_excel(); - + // print_r($exportData);die(); if ($exportData) { $i = 6; $s = 1; foreach ($exportData as $data) { - - $this->excel->getActiveSheet()->setCellValue('C' . $i,$data['MaterialCode']); - $this->excel->getActiveSheet()->setCellValue('D' . $i,$data['MaterialName']); - $this->excel->getActiveSheet()->setCellValue('E' . $i,$data['MaterialType']); - $this->excel->getActiveSheet()->setCellValue('F' . $i,$data['UOM']); - $this->excel->getActiveSheet()->setCellValue('G' . $i,$data['firstname']); - $this->excel->getActiveSheet()->setCellValue('H' . $i,$data['Updated_By']); - $this->excel->getActiveSheet()->setCellValue('I' . $i,$data['IsActive']); - - - - - + + $this->excel->getActiveSheet()->setCellValue('C' . $i,$data['MaterialCode']); + $this->excel->getActiveSheet()->setCellValue('D' . $i,$data['MaterialName']); + $this->excel->getActiveSheet()->setCellValue('E' . $i,$data['MaterialType']); + $this->excel->getActiveSheet()->setCellValue('F' . $i,$data['UOM']); + $this->excel->getActiveSheet()->setCellValue('G' . $i,$data['RMCode']); + $this->excel->getActiveSheet()->setCellValue('H' . $i,$data['Category']); + $this->excel->getActiveSheet()->setCellValue('I' . $i,$data['assetcode']); + $this->excel->getActiveSheet()->setCellValue('J' . $i,$data['CostCenterCode']); + $this->excel->getActiveSheet()->setCellValue('K' . $i,$data['ConversionFactorUnit']); + $this->excel->getActiveSheet()->setCellValue('L' . $i,$data['ConversionFactorUOM']); + $this->excel->getActiveSheet()->setCellValue('M' . $i,$data['Remarks']); + $this->excel->getActiveSheet()->setCellValue('N' . $i,$data['firstname']); + $this->excel->getActiveSheet()->setCellValue('O' . $i,$data['Updated_By']); + $this->excel->getActiveSheet()->setCellValue('P' . $i,$data['IsActive']); + $i++; $s++; @@ -313,7 +370,7 @@ class rawmaterialdetails extends BaseController } - + function pageNotFound() { $this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found'; diff --git a/application/models/rawmaterialdetails_model.php b/application/models/rawmaterialdetails_model.php index 4ed5ff59..ef5087c7 100755 --- a/application/models/rawmaterialdetails_model.php +++ b/application/models/rawmaterialdetails_model.php @@ -3,7 +3,7 @@ class rawmaterialdetails_model extends CI_Model { - /** + /** * This function is used to get the user listing count * @param string $searchText : This is optional search text * @param number $page : This is pagination offset @@ -14,57 +14,86 @@ class rawmaterialdetails_model extends CI_Model { $this->db->select('*'); $this->db->from('T_MaterialMaster'); - - $query = $this->db->get(); - $result = $query->result(); return $result; } - - - - function getUOM($UOM = '') + + function getUOM($UOM = '') { - $ConfigID = 'C001'; - $this->db->select('ConfigValue'); - $this->db->from('T_ConfigDetails'); + $ConfigID = 'C001'; + $this->db->select('ConfigValue'); + $this->db->from('T_ConfigDetails'); $this->db->where('Config_id ',$ConfigID ); - if($UOM != '') - { - $this->db->where('ConfigValue !=',$UOM ); - } + if($UOM != '') + { + $this->db->where('ConfigValue !=',$UOM ); + } $query = $this->db->get(); return $query->result(); } - - function getmaterialType($MaterialType = '') + + function getmaterialType($MaterialType = '') { - $Config_ID = 'C003'; - - $this->db->select('Config_ID,ConfigValue'); + $Config_ID = 'C003'; + $this->db->select('Config_ID,ConfigValue'); $this->db->from('T_ConfigDetails'); - $this->db->where('Config_id',$Config_ID ); - if($MaterialType != '') - { - $this->db->where('ConfigValue !=',$MaterialType ); - } + $this->db->where('Config_id',$Config_ID ); + if($MaterialType != '') + { + $this->db->where('ConfigValue !=',$MaterialType ); + } $query = $this->db->get(); return $query->result(); } - /** + + //This function used to get the material category using configdetails table + function getmaterialCategory($MaterialCategory = '') + { + $Config_ID = 'C023'; + $this->db->select('Config_ID,ConfigValue'); + $this->db->from('T_ConfigDetails'); + $this->db->where('Config_id',$Config_ID ); + if($MaterialCategory != '') + { + $this->db->where('ConfigValue !=',$MaterialCategory ); + } + $query = $this->db->get(); + + return $query->result(); + } + + //This function used to get the conversionfactor using configdetails table + function getConversionfactorUOM($ConversionFactorUOM ='') + { + $Config_ID = 'C024'; + $this->db->select('Config_ID,ConfigValue'); + $this->db->from('T_ConfigDetails'); + $this->db->where('Config_id',$Config_ID ); + if($ConversionFactorUOM != '') + { + $this->db->where('ConfigValue !=',$ConversionFactorUOM ); + } + $query = $this->db->get(); + + return $query->result(); + + } + + //AssetCode + /** * This function used to get user information by id * @param number $userId : This is user id * @return array $result : This is user information */ -function addNewRawMaterial($RawMaterial='') + + function addNewRawMaterial($RawMaterial='') { $this->db->insert('T_MaterialMaster', $RawMaterial); - return TRUE; } @@ -73,58 +102,77 @@ function addNewRawMaterial($RawMaterial='') * @param number $userId : This is user id * @return array $result : This is user information */ - function getMaterialDetails($MaterialCode) + function getMaterialDetails($MaterialCode) { $this->db->select('*'); $this->db->from('T_MaterialMaster'); - $this->db->where('MaterialCode', $MaterialCode); $query = $this->db->get(); //sprint_r($this->db->last_query()); return $query->result(); } - function editRawmaterial($RawMaterial, $MaterialCode) + + function getAssetcode() { - - - + $this->db->select('AssetCode,AssetName'); + $this->db->from('T_Asset_Details'); + //$this->db->where('Assetcode',$Assetcode ); + //$this->db->where('AssetCode',$Assetcode ); + $query = $this->db->get(); + return $query->result(); + } + + + function getCostCenterCode()//$CostCenterCode='') + { + $this->db->select('CostCenterCode,CostCenterName'); + $this->db->from('T_CostCenter_Master'); + //$this->db->where('CostCenterCode', $CostCenterCode); + $query = $this->db->get(); + return $query->result(); + } + + + function editRawmaterial($RawMaterial, $MaterialCode) + { + $this->db->where('MaterialCode', $MaterialCode); $this->db->update('T_MaterialMaster', $RawMaterial); return TRUE; } - - function viewrawmaterial($RawMaterial, $MaterialCode) + + + function viewrawmaterial($RawMaterial, $MaterialCode) { - echo $MaterialCode; //."and".$RawMaterial ; - - + echo $MaterialCode; //."and".$RawMaterial ; + $this->db->where('MaterialCode', $MaterialCode); $this->db->update('T_MaterialMaster', $RawMaterial); return TRUE; } - - function export_excel(){ - - $this->db->select('det.MaterialCode,det.MaterialName,det.MaterialType,det.UOM,emp.firstname,emp1.firstname as Updated_By,det.IsActive'); - $this->db->join('tbl_users as tbl',' det.createdby = tbl.userid','left'); - $this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid','left'); - $this->db->join('tbl_users as tbl1',' det.UpdatedBy = tbl1.userid','left'); - $this->db->join('T_Employee_Details as emp1', 'emp1.empid=tbl1.empid','left'); + + function export_excel(){ + + $this->db->select('det.*,emp.firstname,emp1.firstname as Updated_By,det.IsActive'); + $this->db->join('tbl_users as tbl',' det.createdby = tbl.userid','left'); + $this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid','left'); + $this->db->join('tbl_users as tbl1',' det.UpdatedBy = tbl1.userid','left'); + $this->db->join('T_Employee_Details as emp1', 'emp1.empid=tbl1.empid','left'); return $this->db->get('T_MaterialMaster as det')->result_array(); - } - /** + } + + /** * This function is used to delete the user information * @param number $userId : This is user id - * @return boolean $result : TRUE / FALSE + * @return boolean $result : TRUE / FALSE*/ - function deletePO($PO, $POinfo) - { - $this->db->where('PO', $PO); - $this->db->update('T_PurchaseOrderDetails', $POInfo); - - return $this->db->affected_rows(); - }*/ + // function deletePO($PO, $POinfo) + // { + // $this->db->where('PO', $PO); + // $this->db->update('T_PurchaseOrderDetails', $POInfo); + // return $this->db->affected_rows(); + // } } ?> \ No newline at end of file diff --git a/application/views/addRawMaterial.php b/application/views/addRawMaterial.php index 4bdd0fec..253ac0cc 100755 --- a/application/views/addRawMaterial.php +++ b/application/views/addRawMaterial.php @@ -1,25 +1,28 @@
@@ -28,39 +31,36 @@ function BlockSpecial(evt) {
Siddharth Industries - Add New Material
- +
Back -
-
+
+
- - -
-
-
- +
+
- Material Name - + Material Name* +
-
+ +
- Material Type -
-
+
- Unit of Measurement - + + + + + +
+
+ +
+
+ Unit of Measurement* +
-
-
+
+
+ +
+ +
+
+ Asset Code + +
+
+ +
+
+ Cost Center Code + +
+
+
+
+ Conversion Factor + +
+
+
+
+ Conversion Factor UOM + +
+
+
+
+
+
+ Remarks + +
+
+
IsActive
- -
- - - +
+
- \ No newline at end of file + + \ No newline at end of file diff --git a/application/views/editOldRawmaterial.php b/application/views/editOldRawmaterial.php index e029a92e..7dd6279a 100755 --- a/application/views/editOldRawmaterial.php +++ b/application/views/editOldRawmaterial.php @@ -3,7 +3,14 @@ $MaterialCode = ''; $MaterialName = ''; $MaterialType = ''; +$MaterialCategory = ''; $UOM = ''; +$Assetcode =''; +$costcenter=''; +$remarks=''; +$conversionfactorUOM=''; +$conversionactor =''; +$RMCode = ''; $IsActive = ''; if(!empty($materialDetails)) @@ -13,23 +20,82 @@ if(!empty($materialDetails)) $MaterialCode = $MD->MaterialCode; $MaterialName = $MD->MaterialName; $MaterialType = $MD->MaterialType; - $UOM = $MD->UOM; - $chk = $MD->IsActive; - - if($chk == 1) - { - $IsActive = 'checked'; - } - else - { - $IsActive = ''; - } + $MaterialCategory = $MD->Category; + $UOM = $MD->UOM; + $Assetcode = $MD->assetcode; + $costcenter = $MD->CostCenterCode; + $remarks = $MD->Remarks; + $conversionfactor = $MD->ConversionFactorUnit; + $conversionfactorUOM = $MD->ConversionFactorUOM; + $RMCode = $MD->RMCode; + $chk = $MD->IsActive; + + if($chk == 1) + { + $IsActive = 'checked'; + } + else + { + $IsActive = ''; + } } } ?> + + +
@@ -42,8 +108,8 @@ if(!empty($materialDetails))
Back -
-
+
+
@@ -60,37 +126,74 @@ if(!empty($materialDetails))
-
-
- - - -
-
-
-
- - +
+
+
+
+ Material Name* + + +
+
+ +
+
+
+ Material Type + + +
+
+ +
+
+ Material Category + + +
+
+ +
+
- - +
-
-
+
+ +
+ +
+ + +
- IsActive
+ Asset Code + + +
+
+
+
+ Cost Center Code + +
+
+
+
+ Conversion Factor + +
+
+
+
+ Conversion Factor UOM + +
+
+
+
+ +
+
+ Remarks + +
+
+
+
+ IsActive
>
- - +
+
+
@@ -156,4 +340,4 @@ if(!empty($materialDetails))
- \ No newline at end of file + diff --git a/application/views/rawmaterialListing.php b/application/views/rawmaterialListing.php index bb677e33..8c08e31c 100755 --- a/application/views/rawmaterialListing.php +++ b/application/views/rawmaterialListing.php @@ -16,23 +16,29 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
- + + - + + + + + + - - + + + - + + - + + + + + + - +
Material CodeRaw Material Code Material Description Type of MaterialUnit Of MeasurementUnit Of MeasurementMaterial CategoryConversion FactorConversion Factor UOMAsset CodeCost Center
MaterialCode ?> MaterialCode ?> RMCode ?> MaterialName ?> MaterialType ?>UOM ?>UOM ?>Category ?>ConversionFactorUnit ?>ConversionFactorUOM ?>assetcode ?>CostCenterCode ?>
- +