From d32d309fc274aa20a9e2bc4c5f0ff87543c2747b Mon Sep 17 00:00:00 2001 From: Anne Limoges Date: Thu, 24 Jan 2013 16:15:47 +0100 Subject: [PATCH] Limits the number of money transfers shown to 18. --- modules/payment.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.1.4