From: Anne Limoges Date: Thu, 24 Jan 2013 15:15:47 +0000 (+0100) Subject: Limits the number of money transfers shown to 18. X-Git-Tag: xorg/1.1.7~13 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d32d309fc274aa20a9e2bc4c5f0ff87543c2747b;p=platal.git Limits the number of money transfers shown to 18. --- diff --git a/modules/payment.php b/modules/payment.php index f8e5dae..86d538b 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -673,6 +673,7 @@ class PaymentModule extends PLModule $recongps = array(); + // récupère les réconciliations non groupées $res = XDB::query("SELECT r.id, short_name AS method, period_start, period_end, status, payment_count, sum_amounts, sum_commissions FROM payment_reconcilations AS r @@ -682,10 +683,12 @@ class PaymentModule extends PLModule foreach ($res->fetchAllAssoc() as $recon) $recongps[] = array('recons' => array($recon), 'transfers' => array()); + // ne récupère que les 18 derniers groupements $res = XDB::query("SELECT recongroup_id AS id FROM payment_reconcilations GROUP BY recongroup_id - ORDER BY MAX(period_end) DESC, MIN(period_start) DESC"); + ORDER BY MAX(period_end) DESC, MIN(period_start) DESC + LIMIT 18"); foreach ($res->fetchAllAssoc() as $recongp) { $res = XDB::query("SELECT r.id, short_name AS method, period_start, period_end, status, payment_count, sum_amounts, sum_commissions