mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Aggiornamento Piano dei Conti per mostrare il totale reddito
This commit is contained in:
parent
d2186aea04
commit
bb2b8a560b
@ -479,7 +479,14 @@ function replaceAll(str, find, replace) {
|
|||||||
|
|
||||||
function cleanup_inputs() {
|
function cleanup_inputs() {
|
||||||
$('.bound').removeClass("bound");
|
$('.bound').removeClass("bound");
|
||||||
$('.superselect, .superselectajax').select2().select2("destroy");
|
|
||||||
|
$('.superselect, .superselectajax').each(function () {
|
||||||
|
let $this = $(this);
|
||||||
|
|
||||||
|
if ($this.data('select2')) {
|
||||||
|
$this.select2().select2("destroy")
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function restart_inputs() {
|
function restart_inputs() {
|
||||||
|
12
gulpfile.js
12
gulpfile.js
@ -239,16 +239,16 @@ function csrf() {
|
|||||||
|
|
||||||
function pdfjs() {
|
function pdfjs() {
|
||||||
const web = gulp.src([
|
const web = gulp.src([
|
||||||
config.main.bowerDirectory + '/pdf/web/**/*',
|
config.main.bowerDirectory + '/pdf.js/web/**/*',
|
||||||
'!' + config.main.bowerDirectory + '/pdf/web/cmaps/*',
|
'!' + config.main.bowerDirectory + '/pdf.js/web/cmaps/*',
|
||||||
'!' + config.main.bowerDirectory + '/pdf/web/*.map',
|
'!' + config.main.bowerDirectory + '/pdf.js/web/*.map',
|
||||||
'!' + config.main.bowerDirectory + '/pdf/web/*.pdf',
|
'!' + config.main.bowerDirectory + '/pdf.js/web/*.pdf',
|
||||||
])
|
])
|
||||||
.pipe(gulp.dest(config.production + '/pdfjs/web'));
|
.pipe(gulp.dest(config.production + '/pdfjs/web'));
|
||||||
|
|
||||||
const build = gulp.src([
|
const build = gulp.src([
|
||||||
config.main.bowerDirectory + '/pdf/build/*',
|
config.main.bowerDirectory + '/pdf.js/build/*',
|
||||||
'!' + config.main.bowerDirectory + '/pdf/build/*.map',
|
'!' + config.main.bowerDirectory + '/pdf.js/build/*.map',
|
||||||
])
|
])
|
||||||
.pipe(gulp.dest(config.production + '/pdfjs/build'));
|
.pipe(gulp.dest(config.production + '/pdfjs/build'));
|
||||||
|
|
||||||
|
@ -34,16 +34,18 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
echo '
|
echo '
|
||||||
<hr>
|
<hr>
|
||||||
<h2>'.$titolo.'</h2>
|
<div class="box">
|
||||||
<div class="pull-right">
|
<div class="box-header">
|
||||||
<br>'.Prints::getLink('Mastrino', $conto_primo['id'], null, tr('Stampa'), null, 'lev=1').'
|
<h3 class="box-title">'.$titolo.'</h3>
|
||||||
|
<div class="pull-right">
|
||||||
|
'.Prints::getLink('Mastrino', $conto_primo['id'], null, tr('Stampa'), null, 'lev=1').'
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
|
||||||
|
|
||||||
<div style="padding-left:10px;">';
|
<div class="box-body">';
|
||||||
|
|
||||||
// Livello 2
|
// Livello 2
|
||||||
$query2 = "SELECT * FROM `co_pianodeiconti2` WHERE idpianodeiconti1='".$conto_primo['id']."' ORDER BY numero ASC";
|
$query2 = 'SELECT * FROM `co_pianodeiconti2` WHERE idpianodeiconti1 = '.prepare($conto_primo['id']).' ORDER BY numero ASC';
|
||||||
$secondo_livello = $dbo->fetchArray($query2);
|
$secondo_livello = $dbo->fetchArray($query2);
|
||||||
|
|
||||||
foreach ($secondo_livello as $conto_secondo) {
|
foreach ($secondo_livello as $conto_secondo) {
|
||||||
@ -52,26 +54,55 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
'.Prints::getLink('Mastrino', $conto_secondo['id'], 'btn-info btn-xs', '', null, 'lev=2').'
|
'.Prints::getLink('Mastrino', $conto_secondo['id'], 'btn-info btn-xs', '', null, 'lev=2').'
|
||||||
|
|
||||||
<button type="button" class="btn btn-warning btn-xs" data-toggle="tooltip" title="Modifica questo conto..." onclick="launch_modal(\'Modifica conto\', \''.$structure->fileurl('edit_conto.php').'?id='.$conto_secondo['id'].'&lvl=2\');">
|
<button type="button" class="btn btn-warning btn-xs" onclick="modificaConto('.$conto_secondo['id'].', 2)">
|
||||||
<i class="fa fa-edit"></i>
|
<i class="fa fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5><b>'.$conto_secondo['numero'].' '.$conto_secondo['descrizione'].'</b></h5>
|
<h5><b>'.$conto_secondo['numero'].' '.$conto_secondo['descrizione'].'</b></h5>
|
||||||
|
|
||||||
<div style="padding-left:10px;">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-hover table-condensed" style="margin-bottom:0;">';
|
<table class="table table-striped table-hover table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>'.tr('Descrizione').'</th>
|
||||||
|
<th style="width: 10%" class="text-center">'.tr('Importo').'</th>
|
||||||
|
<th style="width: 10%" class="text-center">'.tr('Importo reddito').'</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>';
|
||||||
|
|
||||||
// Livello 3
|
// Livello 3
|
||||||
$query3 = 'SELECT `co_pianodeiconti3`.*, movimenti.numero_movimenti, movimenti.totale, anagrafica.idanagrafica, anagrafica.deleted_at FROM `co_pianodeiconti3` LEFT OUTER JOIN (SELECT idanagrafica, idconto_cliente, idconto_fornitore, deleted_at FROM an_anagrafiche) AS anagrafica ON co_pianodeiconti3.id IN (anagrafica.idconto_cliente, idconto_fornitore) LEFT OUTER JOIN (SELECT COUNT(idconto) AS numero_movimenti, idconto, SUM( ROUND(totale,2)) AS totale FROM co_movimenti WHERE data BETWEEN '.prepare($_SESSION['period_start']).' AND '.prepare($_SESSION['period_end']).' GROUP BY idconto) movimenti ON co_pianodeiconti3.id=movimenti.idconto WHERE `idpianodeiconti2` = '.prepare($conto_secondo['id']).' ORDER BY numero ASC';
|
$query3 = 'SELECT `co_pianodeiconti3`.*, movimenti.numero_movimenti, movimenti.totale, movimenti.totale_reddito, anagrafica.idanagrafica, anagrafica.deleted_at
|
||||||
|
FROM `co_pianodeiconti3`
|
||||||
|
LEFT OUTER JOIN (
|
||||||
|
SELECT idanagrafica,
|
||||||
|
idconto_cliente,
|
||||||
|
idconto_fornitore,
|
||||||
|
deleted_at
|
||||||
|
FROM an_anagrafiche
|
||||||
|
) AS anagrafica ON co_pianodeiconti3.id IN (anagrafica.idconto_cliente, anagrafica.idconto_fornitore)
|
||||||
|
LEFT OUTER JOIN (
|
||||||
|
SELECT COUNT(idconto) AS numero_movimenti,
|
||||||
|
idconto,
|
||||||
|
SUM(ROUND(totale, 2)) AS totale,
|
||||||
|
SUM(ROUND(totale_reddito, 2)) AS totale_reddito
|
||||||
|
FROM co_movimenti
|
||||||
|
WHERE data BETWEEN '.prepare($_SESSION['period_start']).' AND '.prepare($_SESSION['period_end']).' GROUP BY idconto
|
||||||
|
) movimenti ON co_pianodeiconti3.id=movimenti.idconto
|
||||||
|
WHERE `idpianodeiconti2` = '.prepare($conto_secondo['id']).' ORDER BY numero ASC';
|
||||||
$terzo_livello = $dbo->fetchArray($query3);
|
$terzo_livello = $dbo->fetchArray($query3);
|
||||||
|
|
||||||
foreach ($terzo_livello as $conto_terzo) {
|
foreach ($terzo_livello as $conto_terzo) {
|
||||||
// Se il conto non ha documenti collegati posso eliminarlo
|
// Se il conto non ha documenti collegati posso eliminarlo
|
||||||
$numero_movimenti = $conto_terzo['numero_movimenti'];
|
$numero_movimenti = $conto_terzo['numero_movimenti'];
|
||||||
|
|
||||||
$totale_conto = $conto_terzo['totale'];
|
$totale_conto = $conto_terzo['totale'];
|
||||||
$totale_conto = ($conto_primo['descrizione'] == 'Patrimoniale') ? $totale_conto : -$totale_conto;
|
$totale_reddito = $conto_terzo['totale_reddito'];
|
||||||
|
if ($conto_primo['descrizione'] == 'Patrimoniale'){
|
||||||
|
$totale_conto = -$totale_conto;
|
||||||
|
$totale_reddito = -$totale_reddito;
|
||||||
|
}
|
||||||
|
|
||||||
// Somma dei totali
|
// Somma dei totali
|
||||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||||
@ -89,7 +120,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
||||||
<td>';
|
<td>';
|
||||||
|
|
||||||
// Possibilità di esplodere i movimenti del conto
|
// Possibilità di esplodere i movimenti del conto
|
||||||
@ -123,7 +154,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
// Pulsante per modificare il nome del conto di livello 3
|
// Pulsante per modificare il nome del conto di livello 3
|
||||||
echo '
|
echo '
|
||||||
<button type="button" class="btn btn-warning btn-xs" data-toggle="tooltip" title="Modifica questo conto..." onclick="launch_modal(\'Modifica conto\', \''.$structure->fileurl('edit_conto.php').'?id='.$conto_terzo['id'].'\');">
|
<button type="button" class="btn btn-warning btn-xs" onclick="modificaConto('.$conto_terzo['id'].')">
|
||||||
<i class="fa fa-edit"></i>
|
<i class="fa fa-edit"></i>
|
||||||
</button>';
|
</button>';
|
||||||
|
|
||||||
@ -140,19 +171,31 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
// Span con info del conto
|
// Span con info del conto
|
||||||
echo '
|
echo '
|
||||||
<span style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'" class="clickable" id="movimenti-'.$conto_terzo['id'].'">
|
<span class="clickable" id="movimenti-'.$conto_terzo['id'].'">
|
||||||
'.$conto_secondo['numero'].'.'.$conto_terzo['numero'].' '.$conto_terzo['descrizione'].'
|
'.$conto_secondo['numero'].'.'.$conto_terzo['numero'].' '.$conto_terzo['descrizione'].'
|
||||||
</span>
|
</span>
|
||||||
<div id="conto_'.$conto_terzo['id'].'" style="display:none;"></div>
|
<div id="conto_'.$conto_terzo['id'].'" style="display:none;"></div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td width="100" class="text-right" valign="top" style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
<td class="text-right">
|
||||||
'.moneyFormat(sum($totale_conto), 2).'
|
'.moneyFormat($totale_conto, 2).'
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
'.moneyFormat($totale_reddito, 2).'
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th>'.tr('Descrizione').'</th>
|
||||||
|
<th class="text-center">'.tr('Importo').'</th>
|
||||||
|
<th class="text-center">'.tr('Importo reddito').'</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
// Possibilità di inserire un nuovo conto
|
// Possibilità di inserire un nuovo conto
|
||||||
@ -168,8 +211,8 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
echo '
|
echo '
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table table-condensed table-hover">'
|
<table class="table table-condensed table-hover">';
|
||||||
;
|
|
||||||
// Riepiloghi
|
// Riepiloghi
|
||||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||||
$attivita = abs(sum($totale_attivita));
|
$attivita = abs(sum($totale_attivita));
|
||||||
@ -185,104 +228,106 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
// Attività
|
// Attività
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Totale attività').':</big>
|
<big>'.tr('Totale attività').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat($attivita, 2).'</big>
|
<big>'.moneyFormat($attivita, 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
<td width="50"></td>';
|
<td width="50"></td>';
|
||||||
|
|
||||||
// Passività
|
// Passività
|
||||||
echo '
|
echo '
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Passività').':</big>
|
<big>'.tr('Passività').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat($passivita, 2).'</big>
|
<big>'.moneyFormat($passivita, 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
// Perdita d'esercizio
|
// Perdita d'esercizio
|
||||||
if ($utile_perdita < 0) {
|
if ($utile_perdita < 0) {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr("Perdita d'esercizio").':</big>
|
<big>'.tr("Perdita d'esercizio").':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<big>'.moneyFormat(sum($utile_perdita), 2).'</big>
|
<big>'.moneyFormat(sum($utile_perdita), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
} else {
|
} else {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Utile').':</big>
|
<big>'.tr('Utile').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<big>'.moneyFormat(sum($utile_perdita), 2).'</big>
|
<big>'.moneyFormat(sum($utile_perdita), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Totale a pareggio
|
// Totale a pareggio
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Totale a pareggio').':</big>
|
<big>'.tr('Totale a pareggio').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat(sum($pareggio1), 2).'</big>
|
<big>'.moneyFormat(sum($pareggio1), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
<td width="50"></td>
|
<td width="50"></td>
|
||||||
|
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Totale a pareggio').':</big>
|
<big>'.tr('Totale a pareggio').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat(sum($pareggio2), 2).'</big>
|
<big>'.moneyFormat(sum($pareggio2), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
} else {
|
} else {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Ricavi').':</big>
|
<big>'.tr('Ricavi').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat(sum($totale_ricavi), 2).'</big>
|
<big>'.moneyFormat(sum($totale_ricavi), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Costi').':</big>
|
<big>'.tr('Costi').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat(sum($totale_costi), 2).'</big>
|
<big>'.moneyFormat(sum($totale_costi), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Utile/perdita').':</big>
|
<big>'.tr('Utile/perdita').':</big>
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right" width="150">
|
<td class="text-right" width="150">
|
||||||
<big>'.moneyFormat(sum($totale_ricavi) - abs(sum($totale_costi)), 2).'</big>
|
<big>'.moneyFormat(sum($totale_ricavi) - abs(sum($totale_costi)), 2).'</big>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</table>';
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verifico se è già stata eseguita l'apertura bilancio
|
// Verifico se è già stata eseguita l'apertura bilancio
|
||||||
@ -303,6 +348,9 @@ echo '
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("tr").each(function() {
|
$("tr").each(function() {
|
||||||
@ -336,6 +384,10 @@ echo '
|
|||||||
openModal("'.tr('Nuovo conto').'", "'.$structure->fileurl('add_conto.php').'?id=" + id_conto_lvl2);
|
openModal("'.tr('Nuovo conto').'", "'.$structure->fileurl('add_conto.php').'?id=" + id_conto_lvl2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function modificaConto(id_conto, level = 3) {
|
||||||
|
launch_modal("'.tr('Modifica conto').'", "'.$structure->fileurl('edit_conto.php').'?id=" + id_conto + "&lvl=" + level);
|
||||||
|
}
|
||||||
|
|
||||||
function caricaMovimenti(selector, id_conto) {
|
function caricaMovimenti(selector, id_conto) {
|
||||||
$("#main_loading").show();
|
$("#main_loading").show();
|
||||||
|
|
||||||
|
12
package.json
12
package.json
@ -10,7 +10,6 @@
|
|||||||
"chart.js": "^2.7.0",
|
"chart.js": "^2.7.0",
|
||||||
"ckeditor4": "^4.14.1",
|
"ckeditor4": "^4.14.1",
|
||||||
"components-jqueryui": "^1.12.1",
|
"components-jqueryui": "^1.12.1",
|
||||||
"core-js": "^2.5.1",
|
|
||||||
"datatables.net-bs": "^1.10.15",
|
"datatables.net-bs": "^1.10.15",
|
||||||
"datatables.net-buttons-bs": "^1.3.1",
|
"datatables.net-buttons-bs": "^1.3.1",
|
||||||
"datatables.net-scroller-bs": "^1.4.2",
|
"datatables.net-scroller-bs": "^1.4.2",
|
||||||
@ -20,19 +19,18 @@
|
|||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"fullcalendar": "^3.4.0",
|
"fullcalendar": "^3.4.0",
|
||||||
"geocomplete": "^1.7.0",
|
"geocomplete": "^1.7.0",
|
||||||
"hotkeys-js": "3.7.3",
|
"hotkeys-js": "^3.7.3",
|
||||||
"inputmask": "3.3.9",
|
"inputmask": "^3.3.9",
|
||||||
"jquery": "3.4.1",
|
"jquery": "^3.5.1",
|
||||||
"jquery-form": "^4.2.1",
|
"jquery-form": "^4.2.1",
|
||||||
"jquery-ui-touch-punch": "^0.2.3",
|
"jquery-ui-touch-punch": "^0.2.3",
|
||||||
"jquery.shorten": "^1.0.0",
|
"jquery.shorten": "^1.0.0",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
"parsleyjs": "^2.7.2",
|
"parsleyjs": "^2.7.2",
|
||||||
"pdf": "git://github.com/mozilla/pdf.js#gh-pages",
|
"pdf.js": "mozilla/pdf.js#gh-pages",
|
||||||
"pdf.js": "git://github.com/mozilla/pdf.js#gh-pages",
|
|
||||||
"pwstrength-bootstrap": "^3.0.4",
|
"pwstrength-bootstrap": "^3.0.4",
|
||||||
"select2": "4.0.3",
|
"select2": "^4.0.3",
|
||||||
"select2-bootstrap-theme": "^0.1.0-beta.10",
|
"select2-bootstrap-theme": "^0.1.0-beta.10",
|
||||||
"signature_pad": "^2.1.1",
|
"signature_pad": "^2.1.1",
|
||||||
"smartwizard": "^4.2.2",
|
"smartwizard": "^4.2.2",
|
||||||
|
@ -53,10 +53,10 @@ class AJAX
|
|||||||
}
|
}
|
||||||
|
|
||||||
$total = $results['recordsFiltered'] ?: count($results);
|
$total = $results['recordsFiltered'] ?: count($results);
|
||||||
$list = $results['results'] ? $results['results'] : $results;
|
$list = isset($results['results']) ? $results['results'] : $results;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'results' => $list,
|
'results' => $list ?: [],
|
||||||
'recordsFiltered' => $total,
|
'recordsFiltered' => $total,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user