BBnepal-Accounts/account/application/views/setup/selectbranch.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

48 lines
2.8 KiB
PHP

<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 $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_branches where status<>-1")->result(); ?>
<form method="POST" action="">
<table class="table table-bordered table-striped dataTable">
<thead>
<tr>
<th><?php myLang("branch_name"); ?></th>
<th><?php myLang("branch_address"); ?></th>
<th><?php myLang("status"); ?></th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $a=0; foreach ($TableData as $TableRow) : $a++; ?>
<?php foreach ($TableRow as $cols) : $id = $cols;
break;
endforeach; ?><tr class="bg-<?php echo ($TableRow->status==0)?"danger":"success"; ?>">
<td><?php echo $TableRow->branch_name; ?></td>
<td><?php echo $TableRow->branch_address; ?></td>
<td><?php echo $TableRow->status; ?></td>
<td>
<?php if($TableRow->status==0):?>
<button class="btn btn-primary btn-sm" type="submit" name="branch" value="<?php echo $id; ?>" >Select Branch</button>
<?php else: ?>
SELECTED
<?php endif;?>
</td>
</tr>
<?php endforeach; ?>
<tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>