|
|
|
@ -11,6 +11,7 @@ $regdata = [
|
|
|
|
|
'id' => '',
|
|
|
|
|
'name' => ''
|
|
|
|
|
];
|
|
|
|
|
$cash = [];
|
|
|
|
|
|
|
|
|
|
$editing = false;
|
|
|
|
|
|
|
|
|
@ -33,7 +34,7 @@ if (!empty($VARS['id'])) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($editing) {
|
|
|
|
|
|
|
|
|
|
$cash = $database->select('cash_drawer', ['cashid', 'open', 'close'], ['AND' => ['registerid' => $regdata['id'], 'open[!]' => null, 'close[!]' => null], 'ORDER' => 'cashid', 'LIMIT' => 30]);
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
@ -59,6 +60,30 @@ if ($editing) {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="card-body row">
|
|
|
|
|
<div class="form-group col-12 col-md-6">
|
|
|
|
|
<label for="zreport"><i class="fas fa-receipt"></i> <?php lang("z report"); ?></label>
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<select id="zreport" class="form-control">
|
|
|
|
|
<option value=""><?php lang("pick cash") ?></option>
|
|
|
|
|
<?php
|
|
|
|
|
for ($i = count($cash) - 1; $i >= 0; $i--) {
|
|
|
|
|
$c = $cash[$i];
|
|
|
|
|
echo "<option value=\"$c[cashid]\">"
|
|
|
|
|
. date(DATETIME_FORMAT, strtotime($c['open']))
|
|
|
|
|
. ' - '
|
|
|
|
|
. date(DATETIME_FORMAT, strtotime($c['close']))
|
|
|
|
|
. "</option>";
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</select>
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<button type="button" id="printzreportbtn" class="btn btn-primary"><i class="fas fa-print"></i> <?php lang("print"); ?></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<iframe id="zframe" class="w-100 shadow-lg"></iframe>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="hidden" name="id" value="<?php echo htmlspecialchars($regdata['id']); ?>" />
|
|
|
|
|
<input type="hidden" name="action" value="editregister" />
|
|
|
|
|
<input type="hidden" name="source" value="registers" />
|
|
|
|
|