Merge pull request #3408 from sephrat/issue/3407

Fix #3407
This commit is contained in:
James Cole
2020-05-29 06:44:34 +02:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

3
.gitignore vendored
View File

@@ -5,6 +5,7 @@
/storage/*.key
/vendor
/.vagrant
/.vscode
Homestead.json
Homestead.yaml
npm-debug.log
@@ -13,4 +14,4 @@ yarn-error.log
public/google*.html
report.html
composer.phar
app.js.map
app.js.map

View File

@@ -131,6 +131,13 @@
<span class="text-info">
{{ formatAmountBySymbol(amount.amount, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
</span>
{% elseif first.transactiontype.type == 'Opening balance' %}
{# Opening balance stored amount is always negative: find out which way the money goes #}
{% if groupArray.transactions[0].source_type == 'Initial balance account' %}
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}
{% else %}
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}
{% endif %}
{% endif %}
{% endfor %}
</td>