Ajout pagination liste factures

This commit is contained in:
Jean-Christophe Engel 2024-01-12 11:30:37 +01:00
parent b6bb4fd80d
commit c9300fe943
3 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ $session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
$list = $facture->list(); $list = $facture->list();
$list->loadFromQueryString(); $list->loadFromQueryString();
$list->setPageSize(50);
$tpl->assign(compact('list')); $tpl->assign(compact('list'));

View File

@ -352,11 +352,11 @@ class Facture
'select' => sprintf('CASE WHEN receveur_membre THEN %s ELSE c.nom END', $id_field), 'select' => sprintf('CASE WHEN receveur_membre THEN %s ELSE c.nom END', $id_field),
], ],
'receveur_adresse' => [ 'receveur_adresse' => [
'label' => 'Son adresse', 'label' => 'Adresse',
'select' => 'CASE WHEN receveur_membre THEN u.adresse ELSE c.adresse END', 'select' => 'CASE WHEN receveur_membre THEN u.adresse ELSE c.adresse END',
], ],
'receveur_ville' => [ 'receveur_ville' => [
'label' => 'Sa ville', 'label' => 'Ville',
'select' => 'CASE WHEN receveur_membre THEN u.ville ELSE c.ville END', 'select' => 'CASE WHEN receveur_membre THEN u.ville ELSE c.ville END',
], ],
'date_emission' => [ 'date_emission' => [
@ -391,6 +391,7 @@ class Facture
$list = new DynamicList($columns, $tables); $list = new DynamicList($columns, $tables);
$list->orderBy('date_emission', true); $list->orderBy('date_emission', true);
$list->setCount('COUNT(f.id)');
$currency = Config::getInstance()->monnaie; $currency = Config::getInstance()->monnaie;
@ -420,7 +421,6 @@ class Facture
} }
}); });
$list->setPageSize(1000);
return $list; return $list;
} }

View File

@ -33,6 +33,7 @@
</tbody> </tbody>
</table> </table>
{$list->getHTMLPagination()|raw}
<p class="help"> <p class="help">
Export de la liste&nbsp;: Export de la liste&nbsp;: