diff --git a/resources/assets/v2/src/pages/transactions/show.js b/resources/assets/v2/src/pages/transactions/show.js index ad5a3f55ab..84522924a5 100644 --- a/resources/assets/v2/src/pages/transactions/show.js +++ b/resources/assets/v2/src/pages/transactions/show.js @@ -87,11 +87,16 @@ let show = function () { if (this.entries.hasOwnProperty(i)) { const currencyCode = this.entries[i].currency_code; const foreignCurrencyCode = this.entries[i].foreign_currency_code; + const primaryCurrencyCode = this.entries[i].primary_currency_code; if (undefined === this.amounts[currencyCode]) { this.amounts[currencyCode] = 0; this.amounts[currencyCode] += parseFloat(this.entries[i].amount); } + if (undefined === this.amounts[primaryCurrencyCode]) { + this.amounts[primaryCurrencyCode] = 0; + this.amounts[primaryCurrencyCode] += parseFloat(this.entries[i].pc_amount); + } if (null !== foreignCurrencyCode && '' !== foreignCurrencyCode && undefined === this.amounts[foreignCurrencyCode]) { this.amounts[foreignCurrencyCode] = 0; this.amounts[foreignCurrencyCode] += parseFloat(this.entries[i].foreign_amount); diff --git a/resources/views/v2/transactions/show.blade.php b/resources/views/v2/transactions/show.blade.php index 80f948b353..ebaa9e87f4 100644 --- a/resources/views/v2/transactions/show.blade.php +++ b/resources/views/v2/transactions/show.blade.php @@ -17,23 +17,23 @@ -