mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix for #1364
This commit is contained in:
parent
f16b2257c6
commit
01c10e320c
@ -189,7 +189,8 @@ class SplitController extends Controller
|
|||||||
$destinationAccounts = $this->repository->getJournalDestinationAccounts($journal);
|
$destinationAccounts = $this->repository->getJournalDestinationAccounts($journal);
|
||||||
$array = [
|
$array = [
|
||||||
'journal_description' => $request->old('journal_description', $journal->description),
|
'journal_description' => $request->old('journal_description', $journal->description),
|
||||||
'journal_amount' => $this->repository->getJournalTotal($journal),
|
'journal_amount' => '0',
|
||||||
|
'journal_foreign_amount' => '0',
|
||||||
'sourceAccounts' => $sourceAccounts,
|
'sourceAccounts' => $sourceAccounts,
|
||||||
'journal_source_account_id' => $request->old('journal_source_account_id', $sourceAccounts->first()->id),
|
'journal_source_account_id' => $request->old('journal_source_account_id', $sourceAccounts->first()->id),
|
||||||
'journal_source_account_name' => $request->old('journal_source_account_name', $sourceAccounts->first()->name),
|
'journal_source_account_name' => $request->old('journal_source_account_name', $sourceAccounts->first()->name),
|
||||||
@ -213,9 +214,12 @@ class SplitController extends Controller
|
|||||||
'transactions' => $this->getTransactionDataFromJournal($journal),
|
'transactions' => $this->getTransactionDataFromJournal($journal),
|
||||||
];
|
];
|
||||||
// update transactions array with old request data.
|
// update transactions array with old request data.
|
||||||
|
|
||||||
$array['transactions'] = $this->updateWithPrevious($array['transactions'], $request->old());
|
$array['transactions'] = $this->updateWithPrevious($array['transactions'], $request->old());
|
||||||
|
|
||||||
|
// update journal amount and foreign amount:
|
||||||
|
$array['journal_amount'] = array_sum(array_column($array['transactions'], 'amount'));
|
||||||
|
$array['journal_foreign_amount'] = array_sum(array_column($array['transactions'], 'foreign_amount'));
|
||||||
|
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
63
public/js/ff/transactions/split/edit.js
vendored
63
public/js/ff/transactions/split/edit.js
vendored
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/** global: originalSum, accounting, what, Modernizr, currencySymbol */
|
/** global: originalSum,originalForeignSum, accounting, what, Modernizr, currencySymbol, foreignCurrencySymbol */
|
||||||
|
|
||||||
var destAccounts = {};
|
var destAccounts = {};
|
||||||
var srcAccounts = {};
|
var srcAccounts = {};
|
||||||
@ -69,7 +69,8 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('input[name$="][amount]"]').on('input', calculateSum);
|
$('input[name$="][amount]"]').on('change', calculateBothSums);
|
||||||
|
$('input[name$="][foreign_amount]"]').on('change', calculateBothSums);
|
||||||
|
|
||||||
if (!Modernizr.inputtypes.date) {
|
if (!Modernizr.inputtypes.date) {
|
||||||
$('input[type="date"]').datepicker(
|
$('input[type="date"]').datepicker(
|
||||||
@ -80,6 +81,12 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function calculateBothSums() {
|
||||||
|
console.log("Now in calculateBothSums()");
|
||||||
|
calculateSum();
|
||||||
|
calculateForeignSum();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New and cool
|
* New and cool
|
||||||
* @param e
|
* @param e
|
||||||
@ -113,8 +120,8 @@ function cloneDivRow() {
|
|||||||
source.removeClass('initial-row');
|
source.removeClass('initial-row');
|
||||||
source.find('.count').text('#' + count);
|
source.find('.count').text('#' + count);
|
||||||
|
|
||||||
source.find('input[name$="][amount]"]').val("").on('input', calculateSum);
|
source.find('input[name$="][amount]"]').val("").on('change', calculateBothSums);
|
||||||
source.find('input[name$="][foreign_amount]"]').val("").on('input', calculateSum);
|
source.find('input[name$="][foreign_amount]"]').val("").on('change', calculateBothSums);
|
||||||
if (destAccounts.length > 0) {
|
if (destAccounts.length > 0) {
|
||||||
source.find('input[name$="destination_account_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
source.find('input[name$="destination_account_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||||
}
|
}
|
||||||
@ -134,7 +141,7 @@ function cloneDivRow() {
|
|||||||
// remove original click things, add them again:
|
// remove original click things, add them again:
|
||||||
$('.remove-current-split').unbind('click').click(removeDivRow);
|
$('.remove-current-split').unbind('click').click(removeDivRow);
|
||||||
|
|
||||||
calculateSum();
|
calculateBothSums();
|
||||||
resetDivSplits();
|
resetDivSplits();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -166,16 +173,10 @@ function resetDivSplits() {
|
|||||||
$.each($('.remove-current-split'), function (i, v) {
|
$.each($('.remove-current-split'), function (i, v) {
|
||||||
var button = $(v);
|
var button = $(v);
|
||||||
button.attr('data-split', i);
|
button.attr('data-split', i);
|
||||||
button.find('i').attr('data-split', i);
|
button.find('span').text(' #' + (i + 1));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// loop each indicator (#) and update it:
|
|
||||||
$.each($('td.count'), function (i, v) {
|
|
||||||
var cell = $(v);
|
|
||||||
var index = i + 1;
|
|
||||||
cell.text('#' + index);
|
|
||||||
});
|
|
||||||
|
|
||||||
// loop each possible field.
|
// loop each possible field.
|
||||||
|
|
||||||
@ -234,6 +235,7 @@ function resetDivSplits() {
|
|||||||
|
|
||||||
function calculateSum() {
|
function calculateSum() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
console.log("Now in calculateSum()");
|
||||||
var left = originalSum * -1;
|
var left = originalSum * -1;
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
var set = $('input[name$="][amount]"]');
|
var set = $('input[name$="][amount]"]');
|
||||||
@ -245,14 +247,43 @@ function calculateSum() {
|
|||||||
sum = Math.round(sum * 100) / 100;
|
sum = Math.round(sum * 100) / 100;
|
||||||
left = Math.round(left * 100) / 100;
|
left = Math.round(left * 100) / 100;
|
||||||
|
|
||||||
|
console.log("Sum is " + sum + ", left is " + left);
|
||||||
|
|
||||||
$('.amount-warning').remove();
|
$('.amount-warning').remove();
|
||||||
if (sum !== originalSum) {
|
if (sum !== originalSum) {
|
||||||
var holder = $('#journal_amount_holder');
|
console.log("Is different from original sum " + originalSum);
|
||||||
var par = holder.find('p.form-control-static');
|
var paragraph = $('#journal_amount_holder').find('p.form-control-static');
|
||||||
$('<span>').text(' (' + accounting.formatMoney(sum, currencySymbol) + ')').addClass('text-danger amount-warning').appendTo(par);
|
|
||||||
|
$('<span>').text(' (' + accounting.formatMoney(sum, currencySymbol) + ')').addClass('text-danger amount-warning').appendTo(paragraph);
|
||||||
|
|
||||||
// also add what's left to divide (or vice versa)
|
// also add what's left to divide (or vice versa)
|
||||||
$('<span>').text(' (' + accounting.formatMoney(left, currencySymbol) + ')').addClass('text-danger amount-warning').appendTo(par);
|
$('<span>').text(' (' + accounting.formatMoney(left, currencySymbol) + ')').addClass('text-danger amount-warning').appendTo(paragraph);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function calculateForeignSum() {
|
||||||
|
// "use strict";
|
||||||
|
var left = originalForeignSum * -1;
|
||||||
|
var sum = 0;
|
||||||
|
var set = $('input[name$="][foreign_amount]"]');
|
||||||
|
for (var i = 0; i < set.length; i++) {
|
||||||
|
var current = $(set[i]);
|
||||||
|
sum += (current.val() === "" ? 0 : parseFloat(current.val()));
|
||||||
|
left += (current.val() === "" ? 0 : parseFloat(current.val()));
|
||||||
|
}
|
||||||
|
sum = Math.round(sum * 100) / 100;
|
||||||
|
left = Math.round(left * 100) / 100;
|
||||||
|
|
||||||
|
|
||||||
|
$('.amount-warning-foreign').remove();
|
||||||
|
if (sum !== originalForeignSum) {
|
||||||
|
var paragraph = $('#journal_foreign_amount_holder').find('p.form-control-static');
|
||||||
|
$('<span>').text(' (' + accounting.formatMoney(sum, foreignCurrencySymbol) + ')').addClass('text-danger amount-warning-foreign').appendTo(paragraph);
|
||||||
|
|
||||||
|
// also add what's left to divide (or vice versa)
|
||||||
|
$('<span>').text(' (' + accounting.formatMoney(left, foreignCurrencySymbol) + ')').addClass('text-danger amount-warning-foreign').appendTo(paragraph);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -94,6 +94,7 @@ return [
|
|||||||
'convert_Transfer' => 'Convert transfer',
|
'convert_Transfer' => 'Convert transfer',
|
||||||
|
|
||||||
'amount' => 'Amount',
|
'amount' => 'Amount',
|
||||||
|
'foreign_amount' => 'Foreign amount',
|
||||||
'date' => 'Date',
|
'date' => 'Date',
|
||||||
'interest_date' => 'Interest date',
|
'interest_date' => 'Interest date',
|
||||||
'book_date' => 'Book date',
|
'book_date' => 'Book date',
|
||||||
|
@ -50,18 +50,29 @@
|
|||||||
{{ ExpandedForm.assetAccountList('journal_destination_account_id', preFilled.journal_destination_account_id) }}
|
{{ ExpandedForm.assetAccountList('journal_destination_account_id', preFilled.journal_destination_account_id) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# TOTAL AMOUNT IS STATIC TEXT #}
|
{# show amount and some helper text when making splits: #}
|
||||||
{% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
|
{# amount #}
|
||||||
{{ ExpandedForm.staticText('journal_amount', formatAmountByAccount(accountArray[preFilled.journal_source_account_id], preFilled.journal_amount, true) ) }}
|
<div id="journal_amount_holder" class="form-group">
|
||||||
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
|
<label for="ffInput_journal_amount" class="col-sm-4 control-label">{{ trans('form.amount') }}</label>
|
||||||
{% endif %}
|
<div class="col-sm-8">
|
||||||
|
<p id="ffInput_journal_amount" class="form-control-static">
|
||||||
{% if preFilled.what == 'deposit' %}
|
{{ formatAmountBySymbol(preFilled.journal_amount, preFilled.transactions[0].currency_symbol, preFilled.transactions[0].currency_dp) }}
|
||||||
{{ ExpandedForm.staticText('journal_amount', formatAmountByAccount(accountArray[preFilled.journal_destination_account_id], preFilled.journal_amount, true) ) }}
|
</p>
|
||||||
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{# foreign amount, if not zero. #}
|
||||||
|
{% if preFilled.journal_foreign_amount != 0 %}
|
||||||
|
<div id="journal_foreign_amount_holder" class="form-group">
|
||||||
|
<label for="ffInput_foreign_journal_amount" class="col-sm-4 control-label">{{ trans('form.foreign_amount') }}</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<p id="ffInput_foreign_journal_amount" class="form-control-static">
|
||||||
|
{{ formatAmountBySymbol(preFilled.journal_foreign_amount, preFilled.transactions[0].foreign_currency_symbol, preFilled.transactions[0].foreign_currency_dp) }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
|
||||||
{# DATE #}
|
{# DATE #}
|
||||||
{{ ExpandedForm.date('date', journal.date) }}
|
{{ ExpandedForm.date('date', journal.date) }}
|
||||||
</div>
|
</div>
|
||||||
@ -207,101 +218,83 @@
|
|||||||
|
|
||||||
|
|
||||||
{% for index, transaction in preFilled.transactions %}
|
{% for index, transaction in preFilled.transactions %}
|
||||||
<div class="row {% if loop.index0 % 2 == 1 %}bg-gray-light{% endif %} split_row" data-split="{{ loop.index0 }}">
|
<div class="row {% if loop.index0 % 2 == 1 %}bg-gray-light{% endif %} split_row" data-split="{{ loop.index0 }}">
|
||||||
{# button #}
|
{# button #}
|
||||||
<div class="col-lg-1 col-md-1 col-sm-6 col-xs-6">
|
<div class="col-lg-1 col-md-1 col-sm-6 col-xs-6">
|
||||||
<a href="#" class="btn btn-xs btn-danger remove-current-split" data-split="{{ loop.index0 }}">
|
<a href="#" class="btn btn-xs btn-danger remove-current-split" data-split="{{ loop.index0 }}">
|
||||||
<i class="fa fa-trash" data-split="{{ loop.index0 }}"></i> #{{ loop.index }}</a>
|
<i class="fa fa-trash" data-split="{{ loop.index0 }}"></i><span> #{{ loop.index }}</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# description #}
|
{# description #}
|
||||||
<div class="col-lg-3 col-md-5 col-sm-12 col-xs-12">
|
<div class="col-lg-3 col-md-5 col-sm-12 col-xs-12">
|
||||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][transaction_description]"
|
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][transaction_description]"
|
||||||
value="{{ transaction.transaction_description }}"
|
value="{{ transaction.transaction_description }}"
|
||||||
class="form-control"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{# destination for withdrawals: #}
|
|
||||||
{% if preFilled.what == 'withdrawal' %}
|
|
||||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
|
||||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][destination_name]"
|
|
||||||
value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}"
|
|
||||||
class="form-control"/>
|
class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# source for deposits #}
|
{# destination for withdrawals: #}
|
||||||
{% if preFilled.what == 'deposit' %}
|
{% if preFilled.what == 'withdrawal' %}
|
||||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][source_name]"
|
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][destination_name]"
|
||||||
value="{{ transaction.source_name }}" class="form-control"/>
|
value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}"
|
||||||
</div>
|
class="form-control"/>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# amount#}
|
|
||||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
|
||||||
{{ transaction.currency_symbol }} <input class="split_amount_input" type="number" name="transactions[{{ loop.index0 }}][amount]" value="{{ transaction.amount }}"
|
|
||||||
autocomplete="off" step="any">
|
|
||||||
{% if transaction.foreign_amount != null %}
|
|
||||||
{{ transaction.foreign_currency_symbol }} <input class="split_amount_input" type="number" name="transactions[{{ loop.index0 }}][foreign_amount]"
|
|
||||||
value="{{ transaction.foreign_amount }}" autocomplete="off" step="any">
|
|
||||||
<input type="hidden" name="transactions[{{ loop.index0 }}][foreign_currency_id]" value="{{ transaction.foreign_currency_id }}">
|
|
||||||
{% endif %}
|
|
||||||
<input type="hidden" name="transactions[{{ loop.index0 }}][transaction_currency_id]"
|
|
||||||
value="{{ transaction.transaction_currency_id }}">
|
|
||||||
</div>
|
|
||||||
{#
|
|
||||||
{% if transaction.foreign_amount != null %}
|
|
||||||
<div class="col-lg-1 col-md-5 col-sm-12 col-xs-12" style="border:1px red solid;">
|
|
||||||
{% else %}
|
|
||||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12" style="border:1px blue solid;">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if transaction.foreign_amount != null %}
|
|
||||||
<div class="col-lg-1 col-md-7 col-sm-12 col-xs-12" style="border:1px green solid;">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-addon">{{ transaction.foreign_currency_symbol }}</div>
|
|
||||||
<input type="number" name="transactions[{{ loop.index0 }}][foreign_amount]"
|
|
||||||
value="{{ transaction.foreign_amount }}"
|
|
||||||
class="form-control" autocomplete="off" step="any">
|
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden"
|
{% endif %}
|
||||||
name="transactions[{{ loop.index0 }}][foreign_currency_id]"
|
|
||||||
value="{{ transaction.foreign_currency_id }}">
|
|
||||||
|
|
||||||
|
{# source for deposits #}
|
||||||
|
{% if preFilled.what == 'deposit' %}
|
||||||
|
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||||
|
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][source_name]"
|
||||||
|
value="{{ transaction.source_name }}" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# amount#}
|
||||||
|
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||||
|
{{ transaction.currency_symbol }} <input class="split_amount_input" type="number"
|
||||||
|
name="transactions[{{ loop.index0 }}][amount]"
|
||||||
|
value="{{ transaction.amount }}"
|
||||||
|
autocomplete="off" step="any">
|
||||||
|
{% if transaction.foreign_amount != null %}
|
||||||
|
{{ transaction.foreign_currency_symbol }} <input class="split_amount_input" type="number"
|
||||||
|
name="transactions[{{ loop.index0 }}][foreign_amount]"
|
||||||
|
value="{{ transaction.foreign_amount }}" autocomplete="off"
|
||||||
|
step="any">
|
||||||
|
<input type="hidden" name="transactions[{{ loop.index0 }}][foreign_currency_id]"
|
||||||
|
value="{{ transaction.foreign_currency_id }}">
|
||||||
|
{% endif %}
|
||||||
|
<input type="hidden" name="transactions[{{ loop.index0 }}][transaction_currency_id]"
|
||||||
|
value="{{ transaction.transaction_currency_id }}">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{# budget #}
|
||||||
#}
|
{% if preFilled.what == 'withdrawal' %}
|
||||||
{# budget #}
|
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
||||||
{% if preFilled.what == 'withdrawal' %}
|
<select class="form-control" name="transactions[{{ loop.index0 }}][budget_id]">
|
||||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
{% for key, budget in budgets %}
|
||||||
<select class="form-control" name="transactions[{{ loop.index0 }}][budget_id]">
|
<option label="{{ budget }}" value="{{ key }}"
|
||||||
{% for key, budget in budgets %}
|
{% if transaction.budget_id == key %} selected="selected"{% endif %}>{{ budget }}</option>
|
||||||
<option label="{{ budget }}" value="{{ key }}"
|
{% endfor %}
|
||||||
{% if transaction.budget_id == key %} selected="selected"{% endif %}>{{ budget }}</option>
|
</select>
|
||||||
{% endfor %}
|
</div>
|
||||||
</select>
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# category #}
|
{# category #}
|
||||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
||||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][category_name]"
|
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][category_name]"
|
||||||
value="{{ transaction.category_name }}"
|
value="{{ transaction.category_name }}"
|
||||||
class="form-control"/>
|
class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
<p>
|
||||||
|
<br/>
|
||||||
|
<a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
|
||||||
<br/>
|
|
||||||
<a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||||
{# panel for options #}
|
{# panel for options #}
|
||||||
@ -329,14 +322,10 @@
|
|||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script type="text/javascript" src="{{ route('javascript.currencies') }}?ext=.js&v={{ FF_VERSION }}"></script>
|
<script type="text/javascript" src="{{ route('javascript.currencies') }}?ext=.js&v={{ FF_VERSION }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var currencySymbol = 'x';
|
var currencySymbol = "{{ preFilled.transactions[0].currency_symbol }}";
|
||||||
{% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
|
var foreignCurrencySymbol = "{{ preFilled.transactions[0].foreign_currency_symbol }}";
|
||||||
currencySymbol = currencyInfo[{{ accountArray[preFilled.journal_source_account_id].currency_id }}].symbol;
|
|
||||||
{% endif %}
|
|
||||||
{% if preFilled.what == 'deposit' %}
|
|
||||||
currencySymbol = currencyInfo[{{ accountArray[preFilled.journal_destination_account_id].currency_id }}].symbol;
|
|
||||||
{% endif %}
|
|
||||||
var originalSum = {{ preFilled.journal_amount }};
|
var originalSum = {{ preFilled.journal_amount }};
|
||||||
|
var originalForeignSum = {{ preFilled.journal_foreign_amount }};
|
||||||
var what = "{{ preFilled.what }}";
|
var what = "{{ preFilled.what }}";
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js?v={{ FF_VERSION }}"></script>
|
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js?v={{ FF_VERSION }}"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user