mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Update various pages, clean up some code.
This commit is contained in:
		| @@ -76,7 +76,6 @@ class IndexController extends Controller | ||||
|         $collection      = $this->repository->getBills(); | ||||
|         $total           = $collection->count(); | ||||
| 
 | ||||
|         $defaultCurrency = app('amount')->getDefaultCurrency(); | ||||
|         $parameters      = new ParameterBag(); | ||||
|         // sub one day from temp start so the last paid date is one day before it should be.
 | ||||
|         $tempStart       = clone $start; | ||||
| @@ -84,7 +83,8 @@ class IndexController extends Controller | ||||
|         // $tempStart->subDay();
 | ||||
|         $parameters->set('start', $tempStart); | ||||
|         $parameters->set('end', $end); | ||||
| 
 | ||||
|         $parameters->set('convertToNative', $this->convertToNative); | ||||
|         $parameters->set('defaultCurrency', $this->defaultCurrency); | ||||
|         /** @var BillTransformer $transformer */ | ||||
|         $transformer     = app(BillTransformer::class); | ||||
|         $transformer->setParameters($parameters); | ||||
| @@ -112,7 +112,7 @@ class IndexController extends Controller | ||||
|                 'bills'              => [], | ||||
|             ]; | ||||
| 
 | ||||
|             $currency                         = $bill->transactionCurrency ?? $defaultCurrency; | ||||
|             $currency                         = $bill->transactionCurrency ?? $this->defaultCurrency; | ||||
|             $array['currency_id']             = $currency->id; | ||||
|             $array['currency_name']           = $currency->name; | ||||
|             $array['currency_symbol']         = $currency->symbol; | ||||
| @@ -122,7 +122,6 @@ class IndexController extends Controller | ||||
|             $array['rules']                   = $rules[$bill['id']] ?? []; | ||||
|             $bills[$groupOrder]['bills'][]    = $array; | ||||
|         } | ||||
| 
 | ||||
|         // order by key
 | ||||
|         ksort($bills); | ||||
| 
 | ||||
|   | ||||
| @@ -123,10 +123,10 @@ class ReconcileController extends Controller | ||||
|         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); | ||||
|         $difference      = bcadd(bcadd(bcsub($startBalance ?? '0', $endBalance ?? '0'), $clearedAmount?? '0'), $amount); | ||||
|         $diffCompare     = bccomp($difference, '0'); | ||||
|         $countCleared    = count($clearedJournals); | ||||
|         $reconSum        = bcadd(bcadd($startBalance, $amount), $clearedAmount); | ||||
|         $reconSum        = bcadd(bcadd($startBalance ?? '0', $amount ?? '0'), $clearedAmount ?? '0'); | ||||
| 
 | ||||
|         try { | ||||
|             $view = view('accounts.reconcile.overview', compact('account', 'start', 'diffCompare', 'difference', 'end', 'clearedAmount', 'startBalance', 'endBalance', 'amount', 'route', 'countCleared', 'reconSum', 'selectedIds'))->render(); | ||||
|   | ||||
| @@ -24,7 +24,6 @@ declare(strict_types=1); | ||||
| 
 | ||||
| namespace FireflyIII\Http\Middleware; | ||||
| 
 | ||||
| use DB; | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Support\System\OAuthKeys; | ||||
| use Illuminate\Database\QueryException; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user