mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Compare commits
7 Commits
develop-20
...
develop-20
Author | SHA1 | Date | |
---|---|---|---|
|
c0204c810c | ||
|
944c107e26 | ||
|
18e05c06fd | ||
|
fb79dbf17c | ||
|
31a8163c61 | ||
|
8bcd729250 | ||
|
80c4e69528 |
@@ -106,7 +106,7 @@ class ExportsData extends Command
|
||||
$exporter->setExportTags($options['export']['tags']);
|
||||
$exporter->setExportRecurring($options['export']['recurring']);
|
||||
$exporter->setExportRules($options['export']['rules']);
|
||||
$exporter->setExportBills($options['export']['subscriptions']);
|
||||
$exporter->setExportBills($options['export']['bills']);
|
||||
$exporter->setExportPiggies($options['export']['piggies']);
|
||||
$data = $exporter->export();
|
||||
if (0 === count($data)) {
|
||||
|
@@ -31,6 +31,7 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\ObjectGroup\OrganisesObjectGroups;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
|
||||
use FireflyIII\Transformers\AccountTransformer;
|
||||
use FireflyIII\Transformers\PiggyBankTransformer;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
@@ -81,25 +82,25 @@ class IndexController extends Controller
|
||||
{
|
||||
$this->cleanupObjectGroups();
|
||||
$this->piggyRepos->resetOrder();
|
||||
$collection = $this->piggyRepos->getPiggyBanks();
|
||||
$collection = $this->piggyRepos->getPiggyBanks();
|
||||
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
|
||||
// transform piggies using the transformer:
|
||||
$parameters = new ParameterBag();
|
||||
$parameters->set('end', $end);
|
||||
// $parameters = new ParameterBag();
|
||||
// $parameters->set('end', $end);
|
||||
|
||||
|
||||
/** @var AccountTransformer $accountTransformer */
|
||||
$accountTransformer = app(AccountTransformer::class);
|
||||
$accountTransformer->setParameters($parameters);
|
||||
// /** @var AccountTransformer $accountTransformer */
|
||||
// $accountTransformer = app(AccountTransformer::class);
|
||||
// $accountTransformer->setParameters($parameters);
|
||||
|
||||
// data
|
||||
$piggyBanks = $this->groupPiggyBanks($collection);
|
||||
$accounts = $this->collectAccounts($collection);
|
||||
$accounts = $this->mergeAccountsAndPiggies($piggyBanks, $accounts);
|
||||
$piggyBanks = $this->makeSums($piggyBanks);
|
||||
$piggyBanks = $this->groupPiggyBanks($collection);
|
||||
$accounts = $this->collectAccounts($collection);
|
||||
$accounts = $this->mergeAccountsAndPiggies($piggyBanks, $accounts);
|
||||
$piggyBanks = $this->makeSums($piggyBanks);
|
||||
|
||||
ksort($piggyBanks);
|
||||
|
||||
@@ -144,6 +145,9 @@ class IndexController extends Controller
|
||||
$accountTransformer = app(AccountTransformer::class);
|
||||
$accountTransformer->setParameters($parameters);
|
||||
|
||||
// enrich each account.
|
||||
$enrichment = new AccountEnrichment();
|
||||
|
||||
$return = [];
|
||||
|
||||
/** @var PiggyBank $piggy */
|
||||
@@ -152,6 +156,7 @@ class IndexController extends Controller
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$account = $enrichment->enrichSingle($account);
|
||||
$array = $accountTransformer->transform($account);
|
||||
$accountId = (int) $array['id'];
|
||||
if (!array_key_exists($accountId, $return)) {
|
||||
|
@@ -62,6 +62,10 @@ class AccountTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Account $account): array
|
||||
{
|
||||
if (null === $account->meta) {
|
||||
$account->meta = [];
|
||||
}
|
||||
|
||||
// get account type:
|
||||
$accountType = (string) config(sprintf('firefly.shortNamesByFullName.%s', $account->full_account_type));
|
||||
$liabilityType = (string) config(sprintf('firefly.shortLiabilityNameByFullName.%s', $account->full_account_type));
|
||||
|
12
composer.lock
generated
12
composer.lock
generated
@@ -11743,16 +11743,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "11.5.7",
|
||||
"version": "11.5.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d"
|
||||
"reference": "c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e1cb706f019e2547039ca2c839898cd5f557ee5d",
|
||||
"reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049",
|
||||
"reference": "c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11824,7 +11824,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.7"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11840,7 +11840,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-06T16:10:05+00:00"
|
||||
"time": "2025-02-18T06:26:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@@ -81,7 +81,7 @@ return [
|
||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-02-17',
|
||||
'version' => 'develop/2025-02-18',
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 25,
|
||||
|
||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@@ -5677,9 +5677,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.101",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.101.tgz",
|
||||
"integrity": "sha512-L0ISiQrP/56Acgu4/i/kfPwWSgrzYZUnQrC0+QPFuhqlLP1Ir7qzPPDVS9BcKIyWTRU8+o6CC8dKw38tSWhYIA==",
|
||||
"version": "1.5.102",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.102.tgz",
|
||||
"integrity": "sha512-eHhqaja8tE/FNpIiBrvBjFV/SSKpyWHLvxuR9dPTdo+3V9ppdLmFB7ZZQ98qNovcngPLYIz0oOBF9P0FfZef5Q==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -7778,9 +7778,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/launch-editor": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.9.1.tgz",
|
||||
"integrity": "sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w==",
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz",
|
||||
"integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"administrations_page_title": "Ustawienia finansowe",
|
||||
"administrations_index_menu": "Ustawienia finansowe",
|
||||
"temp_administrations_introduction": "Firefly III wkr\u00f3tce uzyska mo\u017cliwo\u015b\u0107 zarz\u0105dzania wieloma ustawieniami finansowymi. W tej chwili jest tylko jedno domy\u015blne ustawienie. Mo\u017cesz ustawi\u0107 jego tytu\u0142 i natywn\u0105 walut\u0119. To zast\u0119puje poprzednie ustawienia, w kt\u00f3rym mo\u017cna by\u0142o ustawi\u0107 \"domy\u015bln\u0105 walut\u0119\". Jest ona obecnie powi\u0105zana z wybranym ustawieniem finansowym i mo\u017ce by\u0107 zmienione w tej zak\u0142adce.",
|
||||
"administration_currency_form_help": "It may take a long time for the page to load if you change the native currency because transaction may need to be converted to your (new) native currency.",
|
||||
"administration_currency_form_help": "Wczytywanie strony mo\u017ce zaj\u0105\u0107 du\u017co czasu, je\u015bli zmienisz natywn\u0105 walut\u0119, poniewa\u017c transakcja mo\u017ce wymaga\u0107 przewalutowania na (now\u0105) natywn\u0105 walut\u0119.",
|
||||
"administrations_page_edit_sub_title_js": "Edytuj ustawienia finansowe \"{title}\"",
|
||||
"table": "Tabela",
|
||||
"welcome_back": "Co jest grane?",
|
||||
@@ -11,11 +11,11 @@
|
||||
"flash_warning": "Ostrze\u017cenie!",
|
||||
"flash_success": "Sukces!",
|
||||
"close": "Zamknij",
|
||||
"select_dest_account": "Please select or type a valid destination account name",
|
||||
"select_dest_account": "Wybierz lub wpisz prawid\u0142ow\u0105 nazw\u0119 konta docelowego",
|
||||
"select_source_account": "Wybierz lub wpisz prawid\u0142ow\u0105 nazw\u0119 konta \u017ar\u00f3d\u0142owego",
|
||||
"split_transaction_title": "Opis podzielonej transakcji",
|
||||
"errors_submission": "Co\u015b posz\u0142o nie tak w czasie zapisu. Prosz\u0119, sprawd\u017a b\u0142\u0119dy poni\u017cej.",
|
||||
"is_reconciled": "Is reconciled",
|
||||
"is_reconciled": "Jest uzgodniona",
|
||||
"split": "Podziel",
|
||||
"single_split": "Podzia\u0142",
|
||||
"not_enough_currencies": "Za ma\u0142o walut",
|
||||
@@ -42,10 +42,10 @@
|
||||
"submit": "Prze\u015blij",
|
||||
"amount": "Kwota",
|
||||
"date": "Data",
|
||||
"is_reconciled_fields_dropped": "Because this transaction is reconciled, you will not be able to update the accounts, nor the amount(s) unless you remove the reconciliation flag.",
|
||||
"is_reconciled_fields_dropped": "Poniewa\u017c ta transakcja jest uzgodniona, nie b\u0119dziesz w stanie zaktualizowa\u0107 kont, ani kwot(y), chyba \u017ce usuniesz flag\u0119 uzgodnienia.",
|
||||
"tags": "Tagi",
|
||||
"no_budget": "(brak bud\u017cetu)",
|
||||
"no_bill": "(no subscription)",
|
||||
"no_bill": "(brak subskrypcji)",
|
||||
"category": "Kategoria",
|
||||
"attachments": "Za\u0142\u0105czniki",
|
||||
"notes": "Notatki",
|
||||
@@ -61,7 +61,7 @@
|
||||
"destination_account_reconciliation": "Nie mo\u017cesz edytowa\u0107 konta docelowego transakcji uzgadniania.",
|
||||
"source_account_reconciliation": "Nie mo\u017cesz edytowa\u0107 konta \u017ar\u00f3d\u0142owego transakcji uzgadniania.",
|
||||
"budget": "Bud\u017cet",
|
||||
"bill": "Subscription",
|
||||
"bill": "Subskrypcja",
|
||||
"you_create_withdrawal": "Tworzysz wydatek.",
|
||||
"you_create_transfer": "Tworzysz przelew.",
|
||||
"you_create_deposit": "Tworzysz wp\u0142at\u0119.",
|
||||
|
@@ -30,7 +30,7 @@
|
||||
"apply_rules_checkbox": "\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430",
|
||||
"fire_webhooks_checkbox": "\u041f\u043e\u0436\u0435\u0436\u043d\u0456 \u0432\u0435\u0431\u0433\u0430\u043a\u0438",
|
||||
"no_budget_pointer": "\u0417\u0434\u0430\u0454\u0442\u044c\u0441\u044f, \u043d\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u043b\u0438 \u0436\u043e\u0434\u043d\u043e\u0433\u043e \u0431\u044e\u0434\u0436\u0435\u0442\u0443. \u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 <a href=\"budgets\">\u0431\u044e\u0434\u0436\u0435\u0442\u0456\u0432<\/a>. \u0411\u044e\u0434\u0436\u0435\u0442\u0438 \u043c\u043e\u0436\u0443\u0442\u044c \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0442\u0438 \u0432\u0430\u043c \u0441\u0442\u0435\u0436\u0438\u0442\u0438 \u0437\u0430 \u0432\u0438\u0442\u0440\u0430\u0442\u0430\u043c\u0438.",
|
||||
"no_bill_pointer": "You seem to have no subscription yet. You should create some on the <a href=\"subscriptions\">subscription<\/a>-page. Subscriptions can help you keep track of expenses.",
|
||||
"no_bill_pointer": "\u0421\u0445\u043e\u0436\u0435, \u0443 \u0432\u0430\u0441 \u0449\u0435 \u043d\u0435\u043c\u0430\u0454 \u043f\u0456\u0434\u043f\u0438\u0441\u043a\u0438. \u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0457\u0457 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 <a href=\"subscriptions\">\u043f\u0456\u0434\u043f\u0438\u0441\u043e\u043a<\/a>. \u041f\u0456\u0434\u043f\u0438\u0441\u043a\u0438 \u0434\u043e\u043f\u043e\u043c\u043e\u0436\u0443\u0442\u044c \u0432\u0430\u043c \u0432\u0456\u0434\u0441\u0442\u0435\u0436\u0443\u0432\u0430\u0442\u0438 \u0432\u0438\u0442\u0440\u0430\u0442\u0438.",
|
||||
"source_account": "\u0412\u0438\u0445\u0456\u0434\u043d\u0438\u0439 \u0440\u0430\u0445\u0443\u043d\u043e\u043a",
|
||||
"hidden_fields_preferences": "\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043e\u043f\u0446\u0456\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0456\u0457 \u0443 \u0432\u0430\u0448\u043e\u043c\u0443 <a href=\"preferences\">\u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f<\/a>.",
|
||||
"destination_account": "\u0420\u0430\u0445\u0443\u043d\u043e\u043a \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f",
|
||||
|
@@ -220,7 +220,6 @@
|
||||
|
||||
{# Moment JS #}
|
||||
<script src="v1/js/lib/moment.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
|
||||
<script src="v1/js/lib/moment-tz.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
|
||||
<script src="v1/js/lib/moment/{{ language|replace({'-':'_'}) }}.js?v={{ FF_VERSION }}" type="text/javascript"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
|
||||
|
Reference in New Issue
Block a user