Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Small edit and show updates
James Cole0a45a2485b5a
diff --git a/resources/assets/v2/pages/transactions/shared/parse-downloaded-splits.js b/resources/assets/v2/pages/transactions/shared/parse-downloaded-splits.jsindex 1684dd2a2b..ea633d8305 100644--- a/resources/assets/v2/pages/transactions/shared/parse-downloaded-splits.js+++ b/resources/assets/v2/pages/transactions/shared/parse-downloaded-splits.js@@ -32,9 +32,13 @@ export function parseDownloadedSplits(downloads) {// meta datacurrent.bill_id = download.bill_id;+ current.bill_name = download.bill_name;current.budget_id = download.budget_id;+ current.budget_name = download.budget_name;current.category_name = download.category_name;+ current.category_id = download.category_id;current.piggy_bank_id = download.piggy_bank_id;+ current.piggy_bank_name = download.piggy_bank_name;// meta datescurrent.book_date = download.book_date;diff --git a/resources/assets/v2/pages/transactions/show.js b/resources/assets/v2/pages/transactions/show.jsindex 1f4bfee41b..009dc38ed0 100644--- a/resources/assets/v2/pages/transactions/show.js+++ b/resources/assets/v2/pages/transactions/show.js@@ -44,9 +44,10 @@ let show = function () {transactionType: '',transactionTypeTranslated: '',title: '',- totalAmount: 0,date: new Date,},+ dateFields: ["book_date", "due_date", "interest_date", "invoice_date", "payment_date", "process_date"],+ metaFields: ['external_id','internal_reference','sepa_batch_id','sepa_ct_id','sepa_ct_op','sepa_db','sepa_country','sepa_cc','sepa_ep','sepa_ci','external_url'],// parse amounts per currencyamounts: {},@@ -72,7 +73,6 @@ let show = function () {this.groupProperties.transactionType = data.attributes.transactions[0].type;this.groupProperties.transactionTypeTranslated = i18next.t('firefly.' + data.attributes.transactions[0].type);this.groupProperties.title = data.attributes.title ?? data.attributes.transactions[0].description;- this.groupProperties.totalAmount = 0;this.entries = parseDownloadedSplits(data.attributes.transactions);// remove waiting thing.this.notifications.wait.show = false;@@ -90,8 +90,6 @@ let show = function () {this.amounts[foreignCurrencyCode] = 0;this.amounts[foreignCurrencyCode] += parseFloat(this.entries[i].foreign_amount);}-- this.groupProperties.totalAmount = this.groupProperties.totalAmount + parseFloat(this.entries[i].amount);if(0 === parseInt(i)) {this.groupProperties.date = this.entries[i].date;}diff --git a/resources/views/v2/transactions/show.blade.php b/resources/views/v2/transactions/show.blade.phpindex 78adb55d40..6c3f8f7531 100644--- a/resources/views/v2/transactions/show.blade.php+++ b/resources/views/v2/transactions/show.blade.php@@ -90,7 +90,9 @@</th><td><template x-for="entry in entries">- <a :href="'./accounts/show/' + entry.source_account.id" :title="entry.source_account.name" x-text="entry.source_account.name"></a>+ <a :href="'./accounts/show/' + entry.source_account.id"+ :title="entry.source_account.name"+ x-text="entry.source_account.name"></a></template></td></tr>@@ -101,7 +103,9 @@</th><td><template x-for="entry in entries">- <a :href="'./accounts/show/' + entry.destination_account.id" :title="entry.destination_account.name" x-text="entry.destination_account.name"></a>+ <a :href="'./accounts/show/' + entry.destination_account.id"+ :title="entry.destination_account.name"+ x-text="entry.destination_account.name"></a></template></td></tr>@@ -117,89 +121,161 @@</div></div><div class="row">- <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-xs-12">- <div class="card mb-3">- <div class="card-header">- <h3 class="card-title">Description (X from X)</h3>- </div>- <div class="card-body p-0">- <table class="table table-x table-hover">- <tbody>- <tr>- <td colspan="2">- center- From A to B (summary)- </td>- </tr>- <tr>- <th>category icon</th>- <td>category</td>- </tr>- <tr>- <th>budget icon</th>- <td>budget</td>- </tr>- <tr>- <th>subscription icon</th>- <td>subscription</td>- </tr>- <tr>- <th>dates (x6) icon</th>- <td>subscription</td>- </tr>- <tr>- <th>meta fields</th>- <td>meta</td>- </tr>- <tr>- <th>recurring things</th>- <td>meta</td>- </tr>- <tr>- <th>tags</th>- <td>meta</td>- </tr>- <tr>- <td colspan="2">notes</td>- </tr>- </tbody>- </table>- </div>- </div>- <div class="card mb-3">- <div class="card-header">- <h3 class="card-title">Transaction links</h3>- </div>- <div class="card-body p-0">- </div>- </div>- <div class="card mb-3">- <div class="card-header">- <h3 class="card-title">Piggy bank events.</h3>- </div>- <div class="card-body p-0">+ <template x-for="(entry, index) in entries">+ <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-xs-12">+ <div class="card mb-3">+ <div class="card-header">+ <h3 class="card-title">+ <span x-text="entry.description"></span>+ <template x-if="entries.length > 1">+ <span class="badge bg-secondary">+ <span x-text="index + 1"></span> / <span x-text="entries.length"></span>+ </span>+ </template>+ </h3>+ </div>+ <div class="card-body p-0">+ <table class="table table-x table-hover">+ <tbody>+ <tr>+ <td colspan="2" class="text-center">+ <a :href="'./accounts/show/' + entry.source_account.id"+ :title="entry.source_account.name"+ x-text="entry.source_account.name"></a>+ →+ <template x-if="'Withdrawal' === groupProperties.transactionType">+ <span class="text-danger"+ x-text="formatMoney(entry.amount*-1, entry.currency_code)"></span>+ </template>++ <template x-if="'Deposit' === groupProperties.transactionType">+ <span class="text-success"+ x-text="formatMoney(entry.amount, entry.currency_code)"></span>+ </template>++ <template x-if="'Transfer' === groupProperties.transactionType">+ <span class="text-info"+ x-text="formatMoney(entry.amount, entry.currency_code)"></span>+ </template>+ <template+ x-if="null !== entry.foreign_currency_code && 'Withdrawal' === groupProperties.transactionType">+ <span class="text-muted"+ x-text="formatMoney(entry.foreign_amount*-1, entry.foreign_currency_code)"></span>+ </template>+ <template+ x-if="null !== entry.foreign_currency_code && 'Withdrawal' !== groupProperties.transactionType">+ <span class="text-muted"+ x-text="formatMoney(entry.foreign_amount, entry.foreign_currency_code)"></span>+ </template>++ <template+ x-if="'Transfer' !== groupProperties.transactionType && 'Deposit' !== groupProperties.transactionType && 'Withdrawal' !== groupProperties.transactionType">+ <span>TODO PARSE MISSING AMOUNT</span>+ </template>+ →+ <a :href="'./accounts/show/' + entry.destination_account.id"+ :title="entry.destination_account.name"+ x-text="entry.destination_account.name"></a>+ </td>+ </tr>+ <template x-if="null !== entry.category_name">+ <tr>+ <th style="width:10%;">+ <em title="{{ __('firefly.category') }}"+ class="fa-solid fa-bookmark"></em>+ </th>+ <td><a :href="'./categories/show/' + entry.category_id"+ :title="entry.category_name" x-text="entry.category_name"></a></td>+ </tr>+ </template>+ <template x-if="null !== entry.budget_name">+ <tr>+ <th><em title="{{ __('firefly.budget') }}"+ class="fa-solid fa-chart-pie"></em></th>+ <td>+ <a :href="'./budgets/show/' + entry.budget_id"+ :title="entry.budget_name" x-text="entry.budget_name"></a></td>+ </tr>+ </template>+ <template x-if="null !== entry.bill_name">+ <tr>+ <td><em title="{{ __('firefly.subscription') }}"+ class="fa-solid fa-calendar"></em></td>+ <td>+ <a :href="'./bills/show/' + entry.bill_id" :title="entry.bill_name"+ x-text="entry.bill_name"></a></td>+ </tr>+ </template>+ <template x-for="date in dateFields">+ <template x-if="null !== entry[date]">+ <tr>+ <th><span x-text="date"></span></th>+ <td><span x-text="entry[date]"></span></td>+ </tr>+ </template>+ </template>+ <template x-for="meta in metaFields">+ <template x-if="null !== entry[meta] and '' !== entry[meta]">+ <tr>+ <th><span x-text="meta"></span></th>+ <td><span x-text="entry[meta]"></span></td>+ </tr>+ </template>+ </template>+ <tr>+ <th>recurring things</th>+ <td>meta</td>+ </tr>+ <template x-if="entry.tags.length > 0">+ <tr>+ <th><em title="{{ __('firefly.tags') }}" class="fa-solid fa-tag"></em></th>+ <td>+ <template x-for="tag in entry.tags">+ <a class="badge text-bg-info" :href="'./tags/show/' + tag"+ :title="tag" x-text="tag"></a>+ </template>+ </td>+ </tr>+ </template>+ <template x-if="'' !== entry.notes && null !== entry.notes">+ <tr>+ <td colspan="2" x-text="entry.notes"></td>+ </tr>+ </template>+ </tbody>+ </table>+ </div></div>- </div>- <div class="card mb-3">- <div class="card-header">- <h3 class="card-title">Attachments</h3>+ <div class="card mb-3">+ <div class="card-header">+ <h3 class="card-title">Transaction links</h3>+ </div>+ <div class="card-body p-0">+ </div></div>- <div class="card-body p-0">+ <div class="card mb-3">+ <div class="card-header">+ <h3 class="card-title">Piggy bank events.</h3>+ </div>+ <div class="card-body p-0">+ </div></div>- </div>- <div class="card mb-3">- <div class="card-header">- <h3 class="card-title">Audit log entries</h3>+ <div class="card mb-3">+ <div class="card-header">+ <h3 class="card-title">Attachments</h3>+ </div>+ <div class="card-body p-0">+ </div></div>- <div class="card-body p-0">+ <div class="card mb-3">+ <div class="card-header">+ <h3 class="card-title">Audit log entries</h3>+ </div>+ <div class="card-body p-0">+ </div></div></div>- </div>- </div>- <div class="row mt-3">- <div class="col">- <h3>{{ __('firefly.audit_log_entries') }}</h3>- </div>+ </template></div></div></div>