Expand budget box and clear some languages.

This commit is contained in:
James Cole
2017-09-29 14:22:40 +02:00
parent 76ed261441
commit aa4682af6a
5 changed files with 32 additions and 18 deletions

View File

@@ -32,7 +32,9 @@ use Response;
class BoxController extends Controller
{
/**
* @param BudgetRepositoryInterface $repository
*
* @return \Illuminate\Http\JsonResponse
*/
public function available(BudgetRepositoryInterface $repository)
{
@@ -61,7 +63,7 @@ class BoxController extends Controller
if (bccomp($left, '0') === -1) {
$left = '0';
}
$days = $today->diffInDays($end);
$days = $today->diffInDays($end) + 1;
$perDay = '0';
if ($days !== 0) {
$perDay = bcdiv($left, strval($days));