Skip to content

Firefly III: a personal finances manager

Add debug log

James Coleb3223feba2b4
diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php
index 188e102755..0f7fde2f3b 100644
--- a/app/Http/Controllers/Json/ReconcileController.php
+++ b/app/Http/Controllers/Json/ReconcileController.php
@@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
+use Log;
/**
* Class ReconcileController
@@ -75,7 +76,6 @@ class ReconcileController extends Controller
$clearedAmount = '0';
$route = '';
-
if (null === $start && null === $end) {
throw new FireflyException('Invalid dates submitted.');
}
@@ -119,6 +119,10 @@ class ReconcileController extends Controller
$clearedAmount = $this->processJournal($account, $accountCurrency, $journal, $clearedAmount);
}
}
+ Log::debug(sprintf('Start balance: "%s"', $startBalance));
+ Log::debug(sprintf('End balance: "%s"', $endBalance));
+ Log::debug(sprintf('Cleared amount: "%s"', $clearedAmount));
+ Log::debug(sprintf('Amount: "%s"', $amount));
$difference = bcadd(bcadd(bcsub($startBalance, $endBalance), $clearedAmount), $amount);
$diffCompare = bccomp($difference, '0');
$countCleared = count($clearedJournals);