2024-07-10 12:43:19 +00:00
|
|
|
<div class="content-wrapper">
|
|
|
|
<div class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-3">
|
|
|
|
<div class="card card-primary card-outline">
|
|
|
|
<div class="card-header">
|
|
|
|
<h5 class="m-0"><?php echo isset($unit) ? 'Edit' : 'Add'; ?>
|
|
|
|
<?php myLang('Inventory Unit'); ?>
|
|
|
|
<?php //echo $pageTitle; ?>
|
|
|
|
<?php //showListButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/list","List ".$pageTitle); ?>
|
|
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<form method="POST" action="<?php echo isset($unit) ? site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/" . $unit->unit_id) : site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add"); ?>" enctype="multipart/form-data" name="tbl_units">
|
|
|
|
<div class="row">
|
|
|
|
<!--COL START-->
|
|
|
|
<div class="col">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="title"><?php myLang('Unit Name'); ?><span class="text-danger">*</span></label>
|
|
|
|
<input type="text" class="form-control" id="title" value="<?php echo isset($unit) ? $unit->title : ''; ?>" name="title" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--COL END-->
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<!--COL START-->
|
|
|
|
<div class="col">
|
|
|
|
</div>
|
|
|
|
<!--COL END-->
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<!--COL START-->
|
|
|
|
<div class="col">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="description"><?php myLang('Unit Code'); ?></label>
|
2024-07-12 12:12:29 +00:00
|
|
|
<input class="form-control" id="description" name="description" value="<?php echo isset($unit) ? $unit->description : ''; ?>" name="description" >
|
2024-07-10 12:43:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--COL END-->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!--COL START-->
|
|
|
|
<!-- <div class="col">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="remarks"><?php //myLang('Remarks'); ?></label>
|
|
|
|
<textarea class="form-control" id="remarks" name="remarks"><?php //echo isset($unit) ? $unit->remarks : ''; ?></textarea>
|
|
|
|
</div>
|
|
|
|
</div> -->
|
|
|
|
<!--COL END-->
|
|
|
|
</div>
|
|
|
|
<!-- <button type="reset" class="btn btn-default btn-sm">Reset</button> -->
|
|
|
|
<button class="btn btn-primary btn-sm float-right" type="submit" name="submit"><?php echo isset($unit) ? 'Update' : 'Save'; ?></button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-9">
|
|
|
|
<div class="card card-primary card-outline">
|
|
|
|
<div class="card-header">
|
|
|
|
<h5 class="m-0"> <?php myLang(' List Inventory Units'); ?> <?php //echo $pageTitle; ?>
|
|
|
|
<?php //showCreateButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add", "Create New " . $pageTitle); ?>
|
|
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<?php $TableData = $this->db->query("select * from tbl_units where status=1")->result(); ?>
|
2024-07-12 12:12:29 +00:00
|
|
|
<table class="table table-bordered table-striped longdataTable">
|
2024-07-10 12:43:19 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="table-col col-1"><?php myLang('S.N'); ?></th>
|
|
|
|
<th><?php myLang('Unit Name '); ?></th>
|
|
|
|
<th><?php myLang('Unit Code'); ?></th>
|
2024-08-08 12:56:24 +00:00
|
|
|
<th class="col-1 text-center">Action</th>
|
2024-07-10 12:43:19 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php $a = 0;
|
|
|
|
foreach ($TableData as $TableRow) : $a++; ?>
|
|
|
|
<?php foreach ($TableRow as $cols) : $id = $cols;
|
|
|
|
break;
|
|
|
|
endforeach; ?><tr>
|
|
|
|
<td><?php echo $a; ?></td>
|
|
|
|
<td><?php echo $TableRow->title; ?></td>
|
|
|
|
<td><?php echo $TableRow->description; ?></td>
|
2024-08-08 12:56:24 +00:00
|
|
|
<td class="text-center"><?php showEditButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/$id"); ?>
|
2024-07-10 12:43:19 +00:00
|
|
|
<?php showDeleteButton($id); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tbody>
|
|
|
|
</table>
|
|
|
|
<script>
|
|
|
|
function doDelete(id) {
|
|
|
|
if (confirm('Are you sure to delete?')) {
|
|
|
|
window.location = '<?php echo site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/delete/"); ?>' + id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|