mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-25 21:16:47 +00:00 
			
		
		
		
	Catch errors in database table create statements.
This commit is contained in:
		| @@ -67,11 +67,11 @@ class BudgetLimitTransformer extends AbstractTransformer | ||||
|      */ | ||||
|     public function transform(BudgetLimit $budgetLimit): array | ||||
|     { | ||||
| //        $repository = app(OperationsRepository::class); | ||||
| //        $repository->setUser($budgetLimit->budget->user); | ||||
| //        $expenses              = $repository->sumExpenses( | ||||
| //            $budgetLimit->start_date, $budgetLimit->end_date, null, new Collection([$budgetLimit->budget]), $budgetLimit->transactionCurrency | ||||
| //        ); | ||||
|         //        $repository = app(OperationsRepository::class); | ||||
|         //        $repository->setUser($budgetLimit->budget->user); | ||||
|         //        $expenses              = $repository->sumExpenses( | ||||
|         //            $budgetLimit->start_date, $budgetLimit->end_date, null, new Collection([$budgetLimit->budget]), $budgetLimit->transactionCurrency | ||||
|         //        ); | ||||
|         $currency              = $budgetLimit->transactionCurrency; | ||||
|         $amount                = $budgetLimit->amount; | ||||
|         $currencyDecimalPlaces = 2; | ||||
|   | ||||
| @@ -68,30 +68,30 @@ class BudgetTransformer extends AbstractTransformer | ||||
|         $start = $this->parameters->get('start'); | ||||
|         $end   = $this->parameters->get('end'); | ||||
|         //$autoBudget = $this->repository->getAutoBudget($budget); | ||||
| //        $spent      = []; | ||||
| //        if (null !== $start && null !== $end) { | ||||
| //            $spent = $this->beautify($this->opsRepository->sumExpenses($start, $end, null, new Collection([$budget]))); | ||||
| //        } | ||||
|         //        $spent      = []; | ||||
|         //        if (null !== $start && null !== $end) { | ||||
|         //            $spent = $this->beautify($this->opsRepository->sumExpenses($start, $end, null, new Collection([$budget]))); | ||||
|         //        } | ||||
|  | ||||
| //        $abCurrencyId   = null; | ||||
| //        $abCurrencyCode = null; | ||||
| //        $abType         = null; | ||||
| //        $abAmount       = null; | ||||
| //        $abPeriod       = null; | ||||
| //        $notes          = $this->repository->getNoteText($budget); | ||||
| // | ||||
| //        $types = [ | ||||
| //            AutoBudget::AUTO_BUDGET_RESET    => 'reset', | ||||
| //            AutoBudget::AUTO_BUDGET_ROLLOVER => 'rollover', | ||||
| //        ]; | ||||
| // | ||||
| //        if (null !== $autoBudget) { | ||||
| //            $abCurrencyId   = (string) $autoBudget->transactionCurrency->id; | ||||
| //            $abCurrencyCode = $autoBudget->transactionCurrency->code; | ||||
| //            $abType         = $types[$autoBudget->auto_budget_type]; | ||||
| //            $abAmount       = number_format((float) $autoBudget->amount, $autoBudget->transactionCurrency->decimal_places, '.', ''); | ||||
| //            $abPeriod       = $autoBudget->period; | ||||
| //        } | ||||
|         //        $abCurrencyId   = null; | ||||
|         //        $abCurrencyCode = null; | ||||
|         //        $abType         = null; | ||||
|         //        $abAmount       = null; | ||||
|         //        $abPeriod       = null; | ||||
|         //        $notes          = $this->repository->getNoteText($budget); | ||||
|         // | ||||
|         //        $types = [ | ||||
|         //            AutoBudget::AUTO_BUDGET_RESET    => 'reset', | ||||
|         //            AutoBudget::AUTO_BUDGET_ROLLOVER => 'rollover', | ||||
|         //        ]; | ||||
|         // | ||||
|         //        if (null !== $autoBudget) { | ||||
|         //            $abCurrencyId   = (string) $autoBudget->transactionCurrency->id; | ||||
|         //            $abCurrencyCode = $autoBudget->transactionCurrency->code; | ||||
|         //            $abType         = $types[$autoBudget->auto_budget_type]; | ||||
|         //            $abAmount       = number_format((float) $autoBudget->amount, $autoBudget->transactionCurrency->decimal_places, '.', ''); | ||||
|         //            $abPeriod       = $autoBudget->period; | ||||
|         //        } | ||||
|  | ||||
|         return [ | ||||
|             'id'         => (string)$budget->id, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user