Fix upgrade problem in Softaculous.

This commit is contained in:
James Cole 2019-02-11 17:22:46 +01:00
parent e2530c5486
commit f999be81c2

View File

@ -130,7 +130,7 @@ class UpgradeDatabase extends Command
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
if (null === $currency) {
$this->line('Fall back to default currency in migrateBillsToRules().');
$currency = app('amount')->getDefaultCurrency();
$currency = app('amount')->getDefaultCurrencyByUser($user);
}
if (null === $ruleGroup) {
@ -452,7 +452,7 @@ class UpgradeDatabase extends Command
if (null !== $budget) {
$user = $budget->user;
if (null !== $user) {
$currency = \Amount::getDefaultCurrencyByUser($user);
$currency = app('amount')->getDefaultCurrencyByUser($user);
$budgetLimit->transaction_currency_id = $currency->id;
$budgetLimit->save();
$this->line(
@ -464,6 +464,9 @@ class UpgradeDatabase extends Command
}
}
/**
*
*/
private function createNewTypes(): void
{
// create transaction type "Reconciliation".