Some TODO's for the future.

This commit is contained in:
James Cole
2019-08-16 06:20:07 +02:00
parent 1ba45afeab
commit fdf99400bc
11 changed files with 16 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ class PiggyBankController extends Controller
// get currency:
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);
@@ -120,6 +121,7 @@ class PiggyBankController extends Controller
// get currency:
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);
@@ -298,6 +300,7 @@ class PiggyBankController extends Controller
{
$amount = $request->get('amount') ?? '0';
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);
@@ -340,6 +343,7 @@ class PiggyBankController extends Controller
{
$amount = $request->get('amount') ?? '0';
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);
@@ -383,6 +387,7 @@ class PiggyBankController extends Controller
$repetition = $this->piggyRepos->getRepetition($piggyBank);
// get currency:
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);
@@ -403,6 +408,7 @@ class PiggyBankController extends Controller
$repetition = $this->piggyRepos->getRepetition($piggyBank);
// get currency:
$currency = app('amount')->getDefaultCurrency();
// TODO we can use getAccountCurrency() instead
$currencyId = (int)$this->accountRepos->getMetaValue($piggyBank->account, 'currency_id');
if ($currencyId > 0) {
$currency = $this->currencyRepos->findNull($currencyId);