[bugfix] minimum usage calculation is done on strings

min() function was operating on string retrived from the HTTP request, and was
producing wrong result in some occations.

Changed the code to conver the two values to integer before the min() act on
them.
Hide remaining usage for remaining days on last day of the month