149 lines
6.8 KiB
PHP
149 lines
6.8 KiB
PHP
<?php
|
||
|
||
$MaterialCode = '';
|
||
$MaterialName = '';
|
||
$MaterialType = '';
|
||
$SupplierID = '';
|
||
$CreatedDate = '';
|
||
|
||
|
||
if(!empty($userRecords))
|
||
{
|
||
foreach ($userRecords as $uf)
|
||
{
|
||
$MaterialCode = $uf->MaterialCode;
|
||
$MaterialName = $uf->MaterialName;
|
||
$MaterialType = $uf->MaterialType;
|
||
$SupplierID = $uf->SupplierID;
|
||
$CreatedDate = $uf->CreatedDate;
|
||
|
||
}
|
||
}
|
||
|
||
|
||
?>
|
||
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
<center> RAW MATERIAL DETAILS</center>
|
||
|
||
</h1>
|
||
</section>
|
||
|
||
<section class="content">
|
||
<div style="text-align:right;">
|
||
<a href="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" class="btn btn-info" value="Back"/>Back</a>
|
||
</div>
|
||
<br/>
|
||
<div class="row">
|
||
<!-- left column -->
|
||
<div class="col-md-12">
|
||
<!-- general form elements -->
|
||
|
||
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header">
|
||
<center> <h3 class="box-title">Edit Raw Material Details</h3></center>
|
||
</div><!-- /.box-header -->
|
||
<!-- form start -->
|
||
|
||
<form role="form" action="<?php echo base_url() ?>rawmaterialdetails/editRawmaterial" method="post" id="editRawmaterial" role="form">
|
||
<div class="box-body">
|
||
<div class="row">
|
||
<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" >
|
||
</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>
|
||
<?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>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</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>
|
||
<?php
|
||
if(!empty($SupplierName))
|
||
{
|
||
foreach ($SupplierName 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>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div><!-- /.box-body -->
|
||
|
||
<div class="box-footer" style="text-align:right">
|
||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||
<!-- <input type="reset" class="btn btn-default" value="Reset" />-->
|
||
</div>
|
||
</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>
|