- Adesso è possibile modificare solamente gli inventari sparati nel giorno (data_ora_inv === oggi) - Pulizia delle query (Sostituite da tempo dai servizi) - Pulizia codice
106 lines
5.5 KiB
PHP
106 lines
5.5 KiB
PHP
<div class="row no-gutters">
|
|
<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
|
|
<div class="row">
|
|
<div class="col-sm-5">
|
|
<input type="file" id="file_inv" accept="text/xml" class="hidden"/>
|
|
<button type="button" id="upload_inventario" class="btn btn-sm icbtn btn-primary btn-block">
|
|
<i class="fa fa-upload"></i> Upload inventario
|
|
</button>
|
|
</div>
|
|
<div class="col-sm-6 col-sm-offset-1">
|
|
<button id="bt_getXmlArticoli" type="button" class="btn btn-sm icbtn btn-primary btn-block">
|
|
<i class="fa fa-download"></i> Scarica XML anagrafica articoli
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="mt-10">
|
|
<?php
|
|
$focusedRow = isset($_GET["focus"]) ? $_GET["focus"] : "";
|
|
$isPuntoVendita = \User::is_puntoVendita();
|
|
$ret = Inventario::get_listInventari();
|
|
|
|
if ($ret->is_OK()) {
|
|
$arr_rows = $ret->getDto();
|
|
|
|
if (count($arr_rows) > 0) {
|
|
$pagination = $ret->get("pagination");
|
|
?>
|
|
<div class="text-center">
|
|
<?php $pagination->display(); ?>
|
|
</div>
|
|
<table class="table table-hover table-striped mt-20">
|
|
<thead>
|
|
<tr>
|
|
<?php if (!$isPuntoVendita) { ?>
|
|
<th>Deposito</th>
|
|
<?php } ?>
|
|
<th>Inventario</th>
|
|
<th>Num. righe</th>
|
|
<th>Filtro</th>
|
|
<th>Operazioni</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$hasReport = Inventario::hasReport();
|
|
|
|
foreach ($arr_rows as $row) {
|
|
$idInventario = array_get($row, "idInventario");
|
|
$dataInventario = array_get($row, "dataInventario");
|
|
$dataOraInv = array_get($row, "dataOraInv");
|
|
$filtro = array_get($row, "filtro");
|
|
$codMdep = array_get($row, "codMdep");
|
|
$numRighe = array_get($row, "numRighe");
|
|
$profileDb = array_get($row, "profileDb");
|
|
?>
|
|
<tr data-idInventario="<?= $idInventario ?>"
|
|
data-codMdep="<?= $codMdep ?>"
|
|
data-dataInventario="<?= $dataInventario ?>"
|
|
data-dataOraInv="<?= $dataOraInv ?>"
|
|
data-profileDb="<?= $profileDb ?>"
|
|
class="<?= ($focusedRow == $idInventario) ? "focus_fade" : "" ?>">
|
|
<?php if (!$isPuntoVendita) { ?>
|
|
<td class="text-center"><?= $codMdep ?></td>
|
|
<?php } ?>
|
|
<td class="text-center"><?= $idInventario . "<br/><span class='small'>" . strftime(Format::strftimeDMY, \Utility\Date::strtotime($dataInventario, Format::strtotimeDMYHMS)) . "</span>" ?></td>
|
|
<td class="text-center"><?= number_format($numRighe, 0, ".", "'") ?></td>
|
|
<td class="text-center vertical-middle">
|
|
<?php if (!is_null($filtro)) { ?>
|
|
<button class="btn btn-primary icbtn stampaInv"
|
|
title="Esiste un filtro sull'inventario">
|
|
<i class="fa fa-fw fa-filter"></i>
|
|
</button>
|
|
<?php } ?>
|
|
</td>
|
|
<td class="text-center vertical-middle">
|
|
<?php if ($isPuntoVendita || (!is_null($filtro))) { ?>
|
|
<button class="btn icbtn btn-warning bt_view <?= $numRighe == 0 ? "disabled_all" : "" ?>"
|
|
title="Consulta inventario">
|
|
<i class="fa fa-fw fa-file-alt"></i>
|
|
</button>
|
|
<?php } ?>
|
|
<?php if ($hasReport) { ?>
|
|
<button class="btn icbtn btn-danger bt_pdf" title="Scarica PDF">
|
|
<i class="fa fa-fw fa-file-pdf"></i>
|
|
</button>
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
<div class="text-center">
|
|
<?php $pagination->display(); ?>
|
|
</div>
|
|
<?php
|
|
} else {
|
|
$alert = new BC\Alert;
|
|
$alert->text("Non sono stati trovati inventari per questo punto vendita")->show();
|
|
}
|
|
} else {
|
|
$ret->showErrorAlert();
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|