Material Master
This commit is contained in:
parent
9956d0617b
commit
683883ddc7
@ -1,42 +1,9 @@
|
|||||||
<script>
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
var d = new Date();
|
|
||||||
|
|
||||||
var month = d.getMonth();
|
|
||||||
var day = d.getDate();
|
|
||||||
var year = d.getFullYear() ;
|
|
||||||
var SIAStartYear = year - 2015;
|
|
||||||
var mindt = year-70;
|
|
||||||
var maxdt = year-15;
|
|
||||||
|
|
||||||
$("#DateOfCreated").datepicker({
|
|
||||||
minDate : new Date(mindt,1,1),
|
|
||||||
maxDate : 'now',
|
|
||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
$("#DateOfUpdated").datepicker({
|
|
||||||
minDate : new Date(year-SIAStartYear,1,1),
|
|
||||||
maxDate :'now',
|
|
||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Add Material Master </center>
|
<center>Siddharth Industries - Add New Material </center>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@ -58,26 +25,21 @@ $(function() {
|
|||||||
|
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
|
|
||||||
<form role="form" id="addUser" action="<?php echo base_url() ?>rawmaterialdetails/addNewRawMaterial" method="post" role="form">
|
<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-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="MaterialName">Material Code</span>
|
|
||||||
<input type="text" class="form-control required " id="MaterialCode" name="MaterialCode" maxlength="10" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="MaterialName">Material Name</span>
|
<span for="MaterialName">Material Name</span>
|
||||||
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255">
|
<input type="text" class="form-control required " required id="MaterialName" name="MaterialName" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="MaterialType">Material Type</span>
|
<span for="MaterialType">Material Type</span>
|
||||||
<select class="form-control required" id="MaterialType" name="MaterialType">
|
<select class="form-control required" id="MaterialType" name="MaterialType">
|
||||||
<option value="null" required>Select Material Type</option>
|
<option value="-1" required>Select Material Type</option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($material))
|
if(!empty($material))
|
||||||
{
|
{
|
||||||
@ -96,7 +58,7 @@ $(function() {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="UOM">Unit of Mesurement</span>
|
<span for="UOM">Unit of Mesurement</span>
|
||||||
<select class="form-control required" id="UOM" name="UOM">
|
<select class="form-control required" id="UOM" name="UOM">
|
||||||
<option value="0" required>Select UOM</option>
|
<option value="-1" required>Select UOM</option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($UOM))
|
if(!empty($UOM))
|
||||||
{
|
{
|
||||||
@ -111,47 +73,17 @@ $(function() {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Active">IsActive</span> <br>
|
||||||
|
<input type="checkbox" id="isactive" name="isactive" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="DateOfCreated">Created Date</span>
|
|
||||||
<input id="DateOfCreated" required name="DateOfCreated" onkeypress="return false;" maxlength="10" class="form-control">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Createdby">Created By</span>
|
|
||||||
|
|
||||||
<input type="text" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="DateOfUpdated">Updated Date</span>
|
|
||||||
<input id="DateOfUpdated" required name="DateOfUpdated" onkeypress="return false;" maxlength="10" class="form-control">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="updatedby">Updated By</span>
|
|
||||||
|
|
||||||
<input type="text" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<input type="checkbox" id="isactive" name="isactive" onclick="checkactive"> IsActive
|
|
||||||
</div>
|
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
|
|
||||||
<div class="box-footer" style="text-align:right">
|
<div class="box-footer" style="text-align:right">
|
||||||
|
|||||||
@ -4,19 +4,26 @@ $MaterialCode = '';
|
|||||||
$MaterialName = '';
|
$MaterialName = '';
|
||||||
$MaterialType = '';
|
$MaterialType = '';
|
||||||
$UOM = '';
|
$UOM = '';
|
||||||
$CreatedBy = '';
|
$IsActive = '';
|
||||||
|
|
||||||
if(!empty($userRecords))
|
if(!empty($materialDetails))
|
||||||
{
|
{
|
||||||
foreach ($userRecords as $uf)
|
foreach ($materialDetails as $MD)
|
||||||
{
|
{
|
||||||
$MaterialCode = $uf->MaterialCode;
|
$MaterialCode = $MD->MaterialCode;
|
||||||
$MaterialName = $uf->MaterialName;
|
$MaterialName = $MD->MaterialName;
|
||||||
$MaterialType = $uf->MaterialType;
|
$MaterialType = $MD->MaterialType;
|
||||||
$UOM = $uf->UOM;
|
$UOM = $MD->UOM;
|
||||||
$CreatedBy = $uf->CreatedBy;
|
$chk = $MD->IsActive;
|
||||||
|
|
||||||
|
if($chk == 1)
|
||||||
|
{
|
||||||
|
$IsActive = 'checked';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$IsActive = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +34,7 @@ if(!empty($userRecords))
|
|||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Edit Material Master</center>
|
<center>Siddharth Industries - Edit Material -<?php echo $MaterialCode; ?> </center>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
@ -46,7 +53,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 Material Master</h3></center>
|
<center> <h3 class="box-title"></h3></center>
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
|
|
||||||
@ -56,7 +63,7 @@ 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 $MaterialCode;?>">
|
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialName;?>">
|
||||||
<input type="hidden" class="form-control required " id="MaterialCode" value="<?php echo $MaterialCode;?>"name="MaterialCode" maxlength="255">
|
<input type="hidden" class="form-control required " id="MaterialCode" value="<?php echo $MaterialCode;?>"name="MaterialCode" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -64,14 +71,14 @@ if(!empty($userRecords))
|
|||||||
<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;?> "required><?php echo $MaterialType;?></option>
|
<option value="<?php echo $MaterialType;?> "><?php echo $MaterialType;?></option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($material))
|
if(!empty($materialType))
|
||||||
{
|
{
|
||||||
foreach ($material as $SID)
|
foreach ($materialType as $MID)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
|
<option value="<?php echo $MID->ConfigValue ?>"><?php echo $MID->ConfigValue ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,16 +88,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="UOM">Unit of Mesurement</label>
|
<label for="UOM">Unit of Measurement</label>
|
||||||
<select class="form-control required" id="UOM" name="UOM">
|
<select class="form-control required" id="UOM" name="UOM">
|
||||||
<option value="<?php echo $UOM;?>" required><?php echo $UOM;?></option>
|
<option value="<?php echo $UOM;?>" ><?php echo $UOM;?></option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($UOMList))
|
if(!empty($UOMList))
|
||||||
{
|
{
|
||||||
foreach ($UOMList as $SID)
|
foreach ($UOMList as $UM)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $SID->ConfigValue; ?>"><?php echo $SID->ConfigValue ?>
|
<option value="<?php echo $UM->ConfigValue; ?>"><?php echo $UM->ConfigValue ?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,8 +105,12 @@ if(!empty($userRecords))
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" class="form-control required " value="<?php echo $CreatedBy; ?>"id="CreatedBy" name="CreatedBy">
|
<div class="col-md-3">
|
||||||
<input type="hidden" class="form-control required " value="<?php echo $name; ?>"id="UpdatedBy" name="UpdatedBy">
|
<div class="form-group">
|
||||||
|
<span for="Active">IsActive</span> <br>
|
||||||
|
<input type="checkbox" id="isactive" name="isactive" <?php echo $IsActive; ?> >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,8 +1,18 @@
|
|||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('table').tableSort( {
|
||||||
|
animation :'slide',
|
||||||
|
speed:500
|
||||||
|
} );
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>MATERIAL Master LIST</CENTER>
|
<center>Siddharth Industries - Material Master Details</CENTER>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
@ -17,7 +27,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">Material Master List</h3><CENTER>
|
<CENTER><h3 class="box-title"></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">
|
||||||
@ -29,14 +39,14 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body table-responsive no-padding">
|
<div class="box-body table-responsive no-padding" >
|
||||||
<table class="table table-hover">
|
<table id="datatable" class="table table-hover tableSorter" >
|
||||||
<tr>
|
<tr bgcolor="steelblue" >
|
||||||
<th>Material Code</th>
|
<th>Material Code</th>
|
||||||
<th>Material Name</th>
|
<th>Material Description</th>
|
||||||
<th>Material Type</th>
|
<th>Type of Material</th>
|
||||||
<th>UOM</th>
|
<th>Unit Of Measurement</th>
|
||||||
<th>Edit</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if(!empty($userRecords))
|
||||||
@ -45,15 +55,12 @@
|
|||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $record->MaterialCode ?></td>
|
|
||||||
|
<td><u><a href="<?php echo base_url().'rawmaterialdetails/viewRawmaterial/?RID='.$record->MaterialCode.'&MType='.$record->MaterialType.'&UOM='.$record->UOM ; ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></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->UOM ?></td>
|
<td><?php echo $record->UOM ?></td>
|
||||||
<td>
|
|
||||||
<a href="<?php echo base_url().'rawmaterialdetails/editOldrawmaterial/'.$record->MaterialCode; ?>"><i class="fa fa-pencil"></i> </a>
|
|
||||||
<a href="<?php echo base_url().'rawmaterialdetails/viewrawmaterial/'.$record->MaterialCode; ?>"><i class="fa fa-eye"></i> </a>
|
|
||||||
<!-- <a href="#" data-userid="<?php echo $record->userId; ?>" class="deleteUser"><i class="fa fa-trash"></i> </a>-->
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user