From 80f6aeec9ed2f2fc11ef443fcc22526764b92cba Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 10 Aug 2021 09:29:51 -0500 Subject: [PATCH] Fix usage report range Show things from all of the start of range (today) --- lib/customer_usage.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/customer_usage.rb b/lib/customer_usage.rb index 7da46decfe5578bd9d966cb601bcd5c1a33fc1f9..a6aa1eccdca6a923d75954dd761148e9acc57304 100644 --- a/lib/customer_usage.rb +++ b/lib/customer_usage.rb @@ -58,7 +58,7 @@ class CustomerUsage date_trunc('day', start)::date as day, CEIL(SUM(billsec)/60.0)::integer as minutes FROM cdr - WHERE customer_id=$1 and start >= $3 and start < $2 + WHERE customer_id=$1 and start >= $3 and date_trunc('day', start) <= $2 GROUP BY date_trunc('day', start); SQL