Fix usage report range

Stephen Paul Weber created

Show things from all of the start of range (today)

Change summary

lib/customer_usage.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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