changes for filter and print
This commit is contained in:
@ -94,8 +94,13 @@
|
||||
?></a> -->
|
||||
</h5>
|
||||
<div class="card-tools">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<!-- test -->
|
||||
|
||||
<!-- test ends -->
|
||||
|
||||
<form method="post" action=<?php echo site_url('/Inventory/Stocks/summary'); ?> id="FilterForm">
|
||||
<!-- button with a dropdown -->
|
||||
<input type="hidden" name="stocklocations_id" value="1" />
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
|
||||
Filters
|
||||
@ -106,6 +111,8 @@
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control " name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" data-start="<?php echo $fiscalStart; ?>" data-end="<?php echo $fiscalEnd; ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
<!-- <input type="text" class="form-control " name="fromDate" value="" data-end="<?php echo $fiscalEnd; ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period"> -->
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php myLang("Ending Period"); ?></label>
|
||||
@ -123,6 +130,7 @@
|
||||
<input type="checkbox" class="form-check-input " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "CHECKED" : ""; ?>>
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
<label class="form-check-label" for="showOB">Opening</label>
|
||||
StockRecords
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
@ -201,27 +209,30 @@
|
||||
$STotal = 0;
|
||||
$CTotal = 0;
|
||||
foreach ($StockRecords as $index => $TableRow) : ?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo $index + 1; ?></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 class="text-right"><?php echo $TableRow->Summary->Opening->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Opening->rate; ?></td>
|
||||
<td><?php echo myCurrency($lTotal = $TableRow->Summary->Opening->amount);
|
||||
$Total += $lTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Purchase->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Purchase->rate; ?></td>
|
||||
<td><?php echo myCurrency($pTotal = $TableRow->Summary->Purchase->amount);
|
||||
$PTotal += $pTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Sales->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Sales->rate; ?></td>
|
||||
<td><?php echo myCurrency($sTotal = $TableRow->Summary->Sales->amount);
|
||||
$STotal += $sTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Closing->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Closing->rate; ?></td>
|
||||
<td><?php echo myCurrency($cTotal = $TableRow->Summary->Closing->amount);
|
||||
$CTotal += $cTotal; ?></td>
|
||||
</tr>
|
||||
<?php if ((count($TableRow->Item)) > 0):; ?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo $index + 1; ?></td>
|
||||
<td><?php echo ($TableRow->Summary->Item->title) ? $TableRow->Summary->Item->title : "N/A"; ?></td>
|
||||
<!-- $StockRecord->Summary->Unit->unit_id -->
|
||||
<td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->Summary->Unit->unit_id); ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Opening->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Opening->rate; ?></td>
|
||||
<td><?php echo myCurrency($lTotal = $TableRow->Summary->Opening->amount);
|
||||
$Total += $lTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Purchase->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Purchase->rate; ?></td>
|
||||
<td><?php echo myCurrency($pTotal = $TableRow->Summary->Purchase->amount);
|
||||
$PTotal += $pTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Sales->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Sales->rate; ?></td>
|
||||
<td><?php echo myCurrency($sTotal = $TableRow->Summary->Sales->amount);
|
||||
$STotal += $sTotal; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Closing->qty; ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Closing->rate; ?></td>
|
||||
<td><?php echo myCurrency($cTotal = $TableRow->Summary->Closing->amount);
|
||||
$CTotal += $cTotal; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<tbody>
|
||||
<tfoot>
|
||||
@ -234,7 +245,7 @@
|
||||
<td><?php echo myCurrency($STotal); ?></td>
|
||||
<td colspan="2"></td>
|
||||
<td><?php echo myCurrency($CTotal); ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@ -316,12 +327,11 @@
|
||||
</script>
|
||||
<script>
|
||||
$("#toDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
}
|
||||
);
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
Reference in New Issue
Block a user