mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Various nestor-related fixes.
This commit is contained in:
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Json;
|
||||
|
||||
use Throwable;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Enums\TransactionTypeEnum;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
@@ -77,7 +78,7 @@ class ReconcileController extends Controller
|
||||
$amount = '0';
|
||||
$clearedAmount = '0';
|
||||
|
||||
if (null === $start && null === $end) {
|
||||
if (!$start instanceof Carbon && !$end instanceof Carbon) {
|
||||
throw new FireflyException('Invalid dates submitted.');
|
||||
}
|
||||
if ($end->lt($start)) {
|
||||
@@ -130,7 +131,7 @@ class ReconcileController extends Controller
|
||||
|
||||
try {
|
||||
$view = view('accounts.reconcile.overview', compact('account', 'start', 'diffCompare', 'difference', 'end', 'clearedAmount', 'startBalance', 'endBalance', 'amount', 'route', 'countCleared', 'reconSum', 'selectedIds'))->render();
|
||||
} catch (\Throwable $e) {
|
||||
} catch (Throwable $e) {
|
||||
app('log')->debug(sprintf('View error: %s', $e->getMessage()));
|
||||
app('log')->error($e->getTraceAsString());
|
||||
$view = sprintf('Could not render accounts.reconcile.overview: %s', $e->getMessage());
|
||||
@@ -183,7 +184,7 @@ class ReconcileController extends Controller
|
||||
*/
|
||||
public function transactions(Account $account, ?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
if (null === $start || null === $end) {
|
||||
if (!$start instanceof Carbon || !$end instanceof Carbon) {
|
||||
throw new FireflyException('Invalid dates submitted.');
|
||||
}
|
||||
if ($end->lt($start)) {
|
||||
@@ -228,7 +229,7 @@ class ReconcileController extends Controller
|
||||
'accounts.reconcile.transactions',
|
||||
compact('account', 'journals', 'currency', 'start', 'end', 'selectionStart', 'selectionEnd')
|
||||
)->render();
|
||||
} catch (\Throwable $e) {
|
||||
} catch (Throwable $e) {
|
||||
app('log')->debug(sprintf('Could not render: %s', $e->getMessage()));
|
||||
app('log')->error($e->getTraceAsString());
|
||||
$html = sprintf('Could not render accounts.reconcile.transactions: %s', $e->getMessage());
|
||||
|
Reference in New Issue
Block a user