mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
# Conflicts: # .ci/php-cs-fixer/composer.lock
This commit is contained in:
		| @@ -85,7 +85,7 @@ class AccountController extends Controller | ||||
|         $result = $this->repository->searchAccount((string) $query, $types, $this->parameters->get('limit')); | ||||
| 
 | ||||
|         // set date to subday + end-of-day for account balance. so it is at $date 23:59:59
 | ||||
|         $date->subDay()->endOfDay(); | ||||
|         $date->endOfDay(); | ||||
| 
 | ||||
|         /** @var Account $account */ | ||||
|         foreach ($result as $account) { | ||||
|   | ||||
| @@ -213,6 +213,47 @@ class BasicController extends Controller | ||||
|                 'sub_title'               => '', | ||||
|             ]; | ||||
|         } | ||||
|         if (0 === count($return)) { | ||||
|             $currency = $this->nativeCurrency; | ||||
|             // create objects for big array.
 | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('balance-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_balance_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatAnything($currency, '0', false), | ||||
|                 'local_icon'              => 'balance-scale', | ||||
|                 'sub_title'               => app('amount')->formatAnything($currency, '0', false) | ||||
|                     .' + '.app('amount')->formatAnything($currency, '0', false), | ||||
|             ]; | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('spent-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_spent_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatAnything($currency, '0', false), | ||||
|                 'local_icon'              => 'balance-scale', | ||||
|                 'sub_title'               => '', | ||||
|             ]; | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('earned-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatAnything($currency, '0', false), | ||||
|                 'local_icon'              => 'balance-scale', | ||||
|                 'sub_title'               => '', | ||||
|             ]; | ||||
|         } | ||||
| 
 | ||||
|         return $return; | ||||
|     } | ||||
| @@ -268,6 +309,37 @@ class BasicController extends Controller | ||||
|         } | ||||
|         app('log')->debug(sprintf('Done with getBillInformation("%s", "%s")', $start->format('Y-m-d'), $end->format('Y-m-d-'))); | ||||
| 
 | ||||
|         if (0 === count($return)) { | ||||
|             $currency = $this->nativeCurrency; | ||||
|             unset($info, $amount); | ||||
| 
 | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('bills-paid-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_bill_paid_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatFlat($currency->symbol, $currency->decimal_places, '0', false), | ||||
|                 'local_icon'              => 'check', | ||||
|                 'sub_title'               => '', | ||||
|             ]; | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('bills-unpaid-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatFlat($currency->symbol, $currency->decimal_places, '0', false), | ||||
|                 'local_icon'              => 'calendar-o', | ||||
|                 'sub_title'               => '', | ||||
|             ]; | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         return $return; | ||||
|     } | ||||
| 
 | ||||
| @@ -315,6 +387,26 @@ class BasicController extends Controller | ||||
|                 ), | ||||
|             ]; | ||||
|         } | ||||
|         if (0 === count($return)) { | ||||
|             $currency = $this->nativeCurrency; | ||||
|             $return[] = [ | ||||
|                 'key'                     => sprintf('left-to-spend-in-%s', $currency->code), | ||||
|                 'title'                   => trans('firefly.box_left_to_spend_in_currency', ['currency' => $currency->symbol]), | ||||
|                 'monetary_value'          => '0', | ||||
|                 'currency_id'             => (string) $currency->id, | ||||
|                 'currency_code'           => $currency->code, | ||||
|                 'currency_symbol'         => $currency->symbol, | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|                 'value_parsed'            => app('amount')->formatFlat($currency->symbol, $currency->decimal_places, '0', false), | ||||
|                 'local_icon'              => 'money', | ||||
|                 'sub_title'               => app('amount')->formatFlat( | ||||
|                     $currency->symbol, | ||||
|                     $currency->decimal_places, | ||||
|                     '0', | ||||
|                     false | ||||
|                 ), | ||||
|             ]; | ||||
|         } | ||||
| 
 | ||||
|         return $return; | ||||
|     } | ||||
|   | ||||
| @@ -129,6 +129,11 @@ class GracefulNotFoundHandler extends ExceptionHandler | ||||
| 
 | ||||
|                 return redirect(route('rules.index')); | ||||
| 
 | ||||
|             case 'rule-groups.edit': | ||||
|                 $request->session()->reflash(); | ||||
| 
 | ||||
|                 return redirect(route('rules.index')); | ||||
| 
 | ||||
|             case 'transactions.mass.edit': | ||||
|             case 'transactions.mass.delete': | ||||
|             case 'transactions.bulk.edit': | ||||
|   | ||||
| @@ -74,7 +74,7 @@ class TagFormRequest extends FormRequest | ||||
|             'tag'         => $tagRule, | ||||
|             'id'          => $idRule, | ||||
|             'description' => 'max:32768|min:1|nullable', | ||||
|             'date'        => 'date|nullable', | ||||
|             'date'        => 'date|nullable|after:1984-09-17', | ||||
|         ]; | ||||
| 
 | ||||
|         return Location::requestRules($rules); | ||||
|   | ||||
| @@ -74,7 +74,6 @@ interface AccountRepositoryInterface | ||||
| 
 | ||||
|     public function getObjectGroups(Collection $accounts): array; | ||||
| 
 | ||||
|     public function getUserGroup(): UserGroup; | ||||
| 
 | ||||
|     /** | ||||
|      * Reset order types of the mentioned accounts. | ||||
|   | ||||
| @@ -234,7 +234,7 @@ class AccountEnrichment implements EnrichmentInterface | ||||
| 
 | ||||
|     private function collectMetaData(): void | ||||
|     { | ||||
|         $set                 = AccountMeta::whereIn('name', ['is_multi_currency', 'include_net_worth', 'currency_id', 'account_role', 'account_number', 'liability_direction', 'interest', 'interest_period', 'current_debt']) | ||||
|         $set                 = AccountMeta::whereIn('name', ['is_multi_currency', 'include_net_worth', 'currency_id', 'account_role', 'account_number', 'BIC', 'liability_direction', 'interest', 'interest_period', 'current_debt']) | ||||
|             ->whereIn('account_id', $this->accountIds) | ||||
|             ->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data'])->toArray() | ||||
|         ; | ||||
|   | ||||
| @@ -60,6 +60,7 @@ class ActionExpressionLanguageProvider implements ExpressionFunctionProviderInte | ||||
| 
 | ||||
|             ExpressionFunction::fromPhp('substr'), | ||||
|             ExpressionFunction::fromPhp('strlen'), | ||||
|             ExpressionFunction::fromPhp('strpos'), | ||||
|         ]; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user