This commit is contained in:
Raju Shrestha 2024-08-25 16:17:28 +05:45
parent 2ebd3a2ea9
commit 8c5bfd147b
4 changed files with 16 additions and 48 deletions

View File

@ -117,7 +117,7 @@
<table class="table table-bordered table-striped longdataTable"> <table class="table table-bordered table-striped longdataTable">
<thead> <thead>
<tr> <tr>
<th width="5%"><?php myLang('S.N'); ?></th> <th width="5%" class="text-center"><?php myLang('S.N'); ?></th>
<th width="25%"><?php myLang('Name'); ?></th> <th width="25%"><?php myLang('Name'); ?></th>
<th width="10%"><?php myLang('Code'); ?></th> <th width="10%"><?php myLang('Code'); ?></th>
<th width="10%"><?php myLang('Units'); ?></th> <th width="10%"><?php myLang('Units'); ?></th>
@ -134,7 +134,7 @@
<?php foreach ($TableRow as $cols) : $id = $cols; <?php foreach ($TableRow as $cols) : $id = $cols;
break; break;
endforeach; ?><tr> endforeach; ?><tr>
<td><?php echo $a; ?></td> <td class="text-center"><?php echo $a; ?></td>
<td><?php echo $TableRow->title; ?></td> <td><?php echo $TableRow->title; ?></td>
<td><?php echo $TableRow->item_code; ?></td> <td><?php echo $TableRow->item_code; ?></td>
<td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->units_id); ?></td> <td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->units_id); ?></td>

View File

@ -5,7 +5,7 @@
<div class="col"> <div class="col">
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-header"> <div class="card-header">
<h5 class="m-0"><?php echo $pageTitle; ?> <a href="<?php echo site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/create"); ?>" class="btn btn-sm btn-primary float-right">Create New <?php echo $pageTitle; ?></a></h5> <h5 class="m-0 card-title"><?php echo $pageTitle; ?> </h5><a href="<?php echo site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/create"); ?>" class="btn btn-sm btn-primary float-right">Create New <?php echo $pageTitle; ?></a>
</div> </div>
<div class="card-body"> <div class="card-body">
<?php $TableData = $this->db->query("select * from tbl_sales where status=1")->result(); ?> <?php $TableData = $this->db->query("select * from tbl_sales where status=1")->result(); ?>
@ -16,7 +16,7 @@
<th class="col-1"><?php myLang('Date'); ?></th> <th class="col-1"><?php myLang('Date'); ?></th>
<th><?php myLang('Transaction'); ?></th> <th><?php myLang('Transaction'); ?></th>
<th class="table-col col-1 text-center"><?php myLang('Amount'); ?></th> <th class="table-col col-1 text-center"><?php myLang('Amount'); ?></th>
<th class="text-center col-1"><?php myLang('Action'); ?></th> <th class="text-center" width="5%"> <?php myLang('Action'); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -24,9 +24,7 @@
<tr> <tr>
<td class="text-center"><?php echo $TableRow->sales_id; ?></td> <td class="text-center"><?php echo $TableRow->sales_id; ?></td>
<td><?php echo $TableRow->sales_date; ?></td> <td><?php echo $TableRow->sales_date; ?></td>
<td><?php echo $this->myaccounts->getAccountDetails($TableRow->accounts_id)->account_name; ?> <td><?php echo $this->myaccounts->getAccountDetails($TableRow->accounts_id)->account_name; ?>
</td> </td>
<td><?php echo myCurrency($TableRow->totalsales); ?></td> <td><?php echo myCurrency($TableRow->totalsales); ?></td>
<td class="text-center"><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$TableRow->sales_id"); ?> <td class="text-center"><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$TableRow->sales_id"); ?>

View File

@ -2,21 +2,14 @@
<!-- <div class="content"> <!-- <div class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="card card-primary "> <div class="card card-primary ">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"><?php //echo $pageTitle; <h3 class="card-title"><?php //echo $pageTitle;
?> </h3> ?> </h3>
<div class="card-tools"> <div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-plus"></i> <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-plus"></i>
</button> </button>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<form method="post" action="" id="FilterForm"> <form method="post" action="" id="FilterForm">
<div class="row align-items-end"> <div class="row align-items-end">
@ -62,7 +55,6 @@
</div> </div>
<div class="col"> <div class="col">
<div class="form-group d-flex justify-content-end"> <div class="form-group d-flex justify-content-end">
<button type="submit" class="btn btn-primary mr-2">Choose</button> <button type="submit" class="btn btn-primary mr-2">Choose</button>
<button type="submit" class="btn btn-primary mr-2">Filter</button> <button type="submit" class="btn btn-primary mr-2">Filter</button>
<button type="submit" class="btn btn-success mr-2">Export</button> <button type="submit" class="btn btn-success mr-2">Export</button>
@ -70,7 +62,6 @@
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<script> <script>
function resetForm() { function resetForm() {
@ -89,10 +80,7 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div class="content"> <div class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
@ -100,15 +88,11 @@
<div class="card-header"> <div class="card-header">
<h5 class="card-title"> <h5 class="card-title">
<?php echo $pageTitle; ?> <?php echo $pageTitle; ?>
<!-- <?php //echo $pageTitle; <!-- <?php //echo $pageTitle;
?> <a href="<?php //echo site_url("inventory/purchases/add"); ?> <a href="<?php //echo site_url("inventory/purchases/add");
?>" class="btn btn-sm btn-primary float-right">Create New <?php //echo $pageTitle; ?>" class="btn btn-sm btn-primary float-right">Create New <?php //echo $pageTitle;
?></a> --> ?></a> -->
</h5> </h5>
<div class="card-tools"> <div class="card-tools">
<!-- button with a dropdown --> <!-- button with a dropdown -->
<div class="btn-group"> <div class="btn-group">
@ -116,16 +100,12 @@
Filters Filters
</button> </button>
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
<div class="form-group p-2 pb-0"> <div class="form-group p-2 pb-0">
<div class="col"> <div class="col">
<div class="form-group"> <div class="form-group">
<label for="fromDate"><?php myLang("Starting Period"); ?></label> <label for="fromDate"><?php myLang("Starting Period"); ?></label>
<input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period"> <input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="toDate"><?php myLang("Ending Period"); ?></label> <label for="toDate"><?php myLang("Ending Period"); ?></label>
<input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period"> <input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
@ -133,7 +113,6 @@
</div> </div>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="checkbox"> <input class="form-check-input" type="checkbox">
<label class="form-check-label">Select <label class="form-check-label">Select
All</label> All</label>
@ -171,28 +150,21 @@
<a href="#" class="dropdown-item">View calendar</a> <a href="#" class="dropdown-item">View calendar</a>
</div> --> </div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<table class="table table-bordered table-striped dataTable"> <table class="table table-bordered table-striped dataTable">
<thead> <thead>
<tr> <tr>
<th rowspan="2" width="40" style="vertical-align: middle;"><?php myLang('S.No.'); ?></th> <th rowspan="2" width="40" style="vertical-align: middle;"><?php myLang('S.No.'); ?></th>
<th rowspan="2" style="vertical-align: middle;"> <?php myLang('Item'); ?></th> <th rowspan="2" style="vertical-align: middle;"> <?php myLang('Item'); ?></th>
<th rowspan="2" width="80" style="vertical-align: middle;"><?php myLang('Units'); ?></th> <th rowspan="2" width="80" style="vertical-align: middle;"><?php myLang('Units'); ?></th>
<th colspan="3" class="text-center"><?php myLang('Opening'); ?></th> <th colspan="3" class="text-center"><?php myLang('Opening'); ?></th>
<th colspan="3" class="text-center"><?php myLang('Purchase'); ?></th> <th colspan="3" class="text-center"><?php myLang('Purchase'); ?></th>
<th colspan="3" class="text-center"><?php myLang('Sales'); ?></th> <th colspan="3" class="text-center"><?php myLang('Sales'); ?></th>
<th colspan="3" class="text-center"><?php myLang('Closing'); ?></th> <th colspan="3" class="text-center"><?php myLang('Closing'); ?></th>
</tr> </tr>
<tr> <tr>
<th class="text-center" width="80"><?php myLang('Qty'); ?></th> <th class="text-center" width="80"><?php myLang('Qty'); ?></th>
<th class="text-center" width="80"><?php myLang('Avg. Rate'); ?></th> <th class="text-center" width="80"><?php myLang('Avg. Rate'); ?></th>
<th class="text-center" width="80"><?php myLang('Amount'); ?></th> <th class="text-center" width="80"><?php myLang('Amount'); ?></th>
@ -205,15 +177,14 @@
<th class="text-center" width="80"><?php myLang('Qty'); ?></th> <th class="text-center" width="80"><?php myLang('Qty'); ?></th>
<th class="text-center" width="80"><?php myLang('Avg. Rate'); ?></th> <th class="text-center" width="80"><?php myLang('Avg. Rate'); ?></th>
<th class="text-center" width="80"><?php myLang('Amount'); ?></th> <th class="text-center" width="80"><?php myLang('Amount'); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php $Total = 0;$PTotal=0;$STotal=0;$CTotal=0; <?php $Total = 0;$PTotal=0;$STotal=0;$CTotal=0;
foreach ($StockRecords as $TableRow) : ?> foreach ($StockRecords as $TableRow) : ?>
<tr> <tr>
<td></td>
<td></td>
<td><?php echo ($TableRow->Item)?$TableRow->Item->title:"N/A"; ?></td> <td><?php echo ($TableRow->Item)?$TableRow->Item->title:"N/A"; ?></td>
<td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->Item->units_id); ?></td> <td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->Item->units_id); ?></td>
<td class="text-right"><?php echo $TableRow->Summary->Opening->qty; ?></td> <td class="text-right"><?php echo $TableRow->Summary->Opening->qty; ?></td>
@ -232,14 +203,12 @@
<td class="text-right"><?php echo $TableRow->Summary->Closing->rate; ?></td> <td class="text-right"><?php echo $TableRow->Summary->Closing->rate; ?></td>
<td><?php echo myCurrency($cTotal = $TableRow->Summary->Closing->amount); <td><?php echo myCurrency($cTotal = $TableRow->Summary->Closing->amount);
$CTotal += $cTotal; ?></td> $CTotal += $cTotal; ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<tbody> <tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="4" class="text-right"><b><?php echo myLang("Total"); ?></b></td> <td colspan="5" class="text-right"><b><?php echo myLang("Total"); ?></b></td>
<td><?php echo myCurrency($Total); ?></td> <td><?php echo myCurrency($Total); ?></td>
<td colspan="2"></td> <td colspan="2"></td>
<td><?php echo myCurrency($PTotal); ?></td> <td><?php echo myCurrency($PTotal); ?></td>
@ -247,6 +216,7 @@
<td><?php echo myCurrency($STotal); ?></td> <td><?php echo myCurrency($STotal); ?></td>
<td colspan="2"></td> <td colspan="2"></td>
<td><?php echo myCurrency($CTotal); ?></td> <td><?php echo myCurrency($CTotal); ?></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>

View File

@ -5,7 +5,7 @@
<div class="col-3"> <div class="col-3">
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-header"> <div class="card-header">
<h5 class="m-0"><?php echo isset($unit) ? 'Edit' : 'Add'; ?> <h5 class="m-0 card-title"><?php echo isset($unit) ? 'Edit' : 'Add'; ?>
<?php myLang('Inventory Unit'); ?> <?php myLang('Inventory Unit'); ?>
<?php //echo $pageTitle; ?> <?php //echo $pageTitle; ?>
<?php //showListButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/list","List ".$pageTitle); ?> <?php //showListButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/list","List ".$pageTitle); ?>
@ -59,7 +59,7 @@
<div class="col-9"> <div class="col-9">
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-header"> <div class="card-header">
<h5 class="m-0"> <?php myLang(' List Inventory Units'); ?> <?php //echo $pageTitle; ?> <h5 class="m-0 card-title"> <?php myLang(' List Inventory Units'); ?> <?php //echo $pageTitle; ?>
<?php //showCreateButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add", "Create New " . $pageTitle); ?> <?php //showCreateButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add", "Create New " . $pageTitle); ?>
</h5> </h5>
</div> </div>
@ -68,10 +68,10 @@
<table class="table table-bordered table-striped longdataTable"> <table class="table table-bordered table-striped longdataTable">
<thead> <thead>
<tr> <tr>
<th class="col-1"><?php myLang('S.N'); ?></th> <th class="text-center" width="5%"><?php myLang('S.N'); ?></th>
<th class="col-5"><?php myLang('Unit Name '); ?></th> <th class="col-5" width="30%"><?php myLang('Unit Name '); ?></th>
<th class="col-5"><?php myLang('Unit Code'); ?></th> <th class="col-5" width="57%"><?php myLang('Unit Code'); ?></th>
<th class="col-1 text-center">Action</th> <th class="col-1 text-center" >Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -80,7 +80,7 @@
<?php foreach ($TableRow as $cols) : $id = $cols; <?php foreach ($TableRow as $cols) : $id = $cols;
break; break;
endforeach; ?><tr> endforeach; ?><tr>
<td><?php echo $a; ?></td> <td class="text-center"><?php echo $a; ?></td>
<td><?php echo $TableRow->title; ?></td> <td><?php echo $TableRow->title; ?></td>
<td><?php echo $TableRow->description; ?></td> <td><?php echo $TableRow->description; ?></td>
<td class="text-center"><?php showEditButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/$id"); ?> <td class="text-center"><?php showEditButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/$id"); ?>