Fix: fatture con tante righe diventano molto lente

This commit is contained in:
Emanuele "ToX" Toscano 2023-03-21 17:11:25 +01:00
parent a8644fe16b
commit 76a83b0d15
1 changed files with 2 additions and 2 deletions

View File

@ -54,6 +54,7 @@ echo '
// Righe documento
if (!empty($fattura)) {
$optionsConti = AJAX::select($conti, [], null, 0, 10000);
$righe = $fattura->getRighe();
$num = 0;
foreach ($righe as $riga) {
@ -107,7 +108,7 @@ echo '
</td>
<td>
{[ "type": "select", "name": "idconto['.$riga['id'].']", "required": 1, "value": "'.$riga->id_conto.'", "ajax-source": "'.$conti.'", "class": "unblockable" ]}
{[ "type": "select", "name": "idconto['.$riga['id'].']", "required": 1, "value": "'.$riga->id_conto.'", "values": ' . json_encode($optionsConti['results']) . ', "class": "unblockable" ]}
</td>
</tr>';
}
@ -149,4 +150,3 @@ function copy() {
}
}
</script>';