commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@ -0,0 +1,74 @@
<div class="content-wrapper">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card card-primary card-outline">
<div class="card-header">
<h5 class="m-0"><?php echo isset($itemcategory) ? 'Edit' : 'Add'; ?> <?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($itemcategory) ? site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/" . $itemcategory->itemcategory_id) : site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add"); ?>" enctype="multipart/form-data" name="tbl_itemcategories">
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<?php fillComboWithValue("units_id","Units","units_id","tbl_units","title","unit_id", isset($itemcategory) ? $itemcategory->units_id : ''); ?>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="title"><?php myLang('Title'); ?></label><input type="text" class="form-control" id="title" value="<?php echo isset($itemcategory) ? $itemcategory->title : ''; ?>" name="title">
</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('Description'); ?></label>
<textarea class="form-control" id="description" name="description"><?php echo isset($itemcategory) ? $itemcategory->description : ''; ?></textarea>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="display_order"><?php myLang('Display Order'); ?></label><input type="text" class="form-control" id="display_order" value="<?php echo isset($itemcategory) ? $itemcategory->display_order : ''; ?>" name="display_order">
</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($itemcategory) ? $itemcategory->remarks : ''; ?></textarea>
</div>
</div>
<!--COL END-->
</div>
<button type="reset" class="btn btn-default">Reset</button> <button class="btn btn-primary" type="submit" name="submit"><?php echo isset($itemcategory) ? 'Update' : 'Save'; ?></button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,128 @@
<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($itemcategory) ? 'Edit' : 'Add'; ?>
<?php //echo $pageTitle; ?> <?php myLang('Inventory Group'); ?>
<?php //echo $pageTitle; ?> <?php //myLang('Category'); ?>
<?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($itemcategory) ? site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/" . $itemcategory->itemcategory_id) : site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add"); ?>" enctype="multipart/form-data" name="tbl_itemcategories">
<div class="row">
<!--COL START-->
<!-- <div class="col">
<div class="form-group">
<?php //fillComboWithValue("units_id","Units","units_id","tbl_units","title","unit_id", isset($itemcategory) ? $itemcategory->units_id : ''); ?>
</div>
</div> -->
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="title"><?php myLang('Inventory Group'); ?> <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="title" value="<?php echo isset($itemcategory) ? $itemcategory->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('Description'); ?></label>
<textarea class="form-control" id="description" name="description"><?php echo isset($itemcategory) ? $itemcategory->description : ''; ?></textarea>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<!-- <div class="col">
<div class="form-group">
<label for="display_order"><?php //myLang('Display Order'); ?></label><input type="text" class="form-control" id="display_order" value="<?php //echo isset($itemcategory) ? $itemcategory->display_order : ''; ?>" name="display_order">
</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($itemcategory) ? $itemcategory->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($itemcategory) ? '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 Groups'); ?>
<!-- <h5 class="m-0"><?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_itemcategories where status=1")->result(); ?>
<table class="table table-bordered table-striped dataTable">
<thead>
<tr>
<th width="5%"><?php myLang('S.N'); ?></th>
<th width="30%"><?php myLang('Inventory Group'); ?></th>
<!-- <th width="5%"><?php //myLang('Unit'); ?></th> -->
<th width="57%"><?php myLang('Description'); ?></th>
<td width="8%"><?php myLang("Action"); ?></th>
</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 getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->units_id); ?></td> -->
<td><?php echo $TableRow->description; ?></td>
<td>
<?php showEditButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/$id"); ?>
<?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>