mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Remove unused functions.
This commit is contained in:
parent
ed3a4e4663
commit
24715c72a2
@ -24,21 +24,27 @@ namespace FireflyIII\Http\Controllers\Transaction;
|
||||
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Events\UpdatedTransactionJournal;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\SplitJournalFormRequest;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalTaskerInterface;
|
||||
use FireflyIII\Transformers\TransactionTransformer;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Steam;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
use View;
|
||||
|
||||
/**
|
||||
@ -91,6 +97,7 @@ class SplitController extends Controller
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function edit(Request $request, TransactionJournal $journal)
|
||||
{
|
||||
@ -178,6 +185,7 @@ class SplitController extends Controller
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function arrayFromJournal(Request $request, TransactionJournal $journal): array
|
||||
{
|
||||
@ -219,43 +227,28 @@ class SplitController extends Controller
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function getTransactionDataFromJournal(TransactionJournal $journal): array
|
||||
{
|
||||
$transactions = $this->tasker->getTransactionsOverview($journal);
|
||||
$return = [];
|
||||
/** @var array $transaction */
|
||||
foreach ($transactions as $index => $transaction) {
|
||||
$set = [
|
||||
'description' => $transaction['description'],
|
||||
'source_account_id' => $transaction['source_account_id'],
|
||||
'source_account_name' => $transaction['source_account_name'],
|
||||
'destination_account_id' => $transaction['destination_account_id'],
|
||||
'destination_account_name' => $transaction['destination_account_name'],
|
||||
'amount' => round($transaction['destination_amount'], 12),
|
||||
'budget_id' => isset($transaction['budget_id']) ? intval($transaction['budget_id']) : 0,
|
||||
'category' => $transaction['category'],
|
||||
'transaction_currency_id' => $transaction['transaction_currency_id'],
|
||||
'transaction_currency_code' => $transaction['transaction_currency_code'],
|
||||
'transaction_currency_symbol' => $transaction['transaction_currency_symbol'],
|
||||
'foreign_amount' => round($transaction['foreign_destination_amount'], 12),
|
||||
'foreign_currency_id' => $transaction['foreign_currency_id'],
|
||||
'foreign_currency_code' => $transaction['foreign_currency_code'],
|
||||
'foreign_currency_symbol' => $transaction['foreign_currency_symbol'],
|
||||
];
|
||||
// set initial category and/or budget:
|
||||
if ($set['budget_id'] === 0) {
|
||||
$set['budget_id'] = $this->repository->getJournalBudgetId($journal);
|
||||
}
|
||||
if (strlen($set['category']) === 0) {
|
||||
$set['category'] = $this->repository->getJournalCategoryName($journal);
|
||||
}
|
||||
// use collector to collect transactions.
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
$collector->setUser(auth()->user());
|
||||
$collector->withOpposingAccount()->withCategoryInformation()->withBudgetInformation();
|
||||
// filter on specific journals.
|
||||
$collector->setJournals(new Collection([$journal]));
|
||||
$set = $collector->getJournals();
|
||||
$transactions = [];
|
||||
$transformer = new TransactionTransformer(new ParameterBag);
|
||||
|
||||
|
||||
$return[] = $set;
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($set as $transaction) {
|
||||
if ($transaction->transaction_amount > 0) {
|
||||
$transactions[] = $transformer->transform($transaction);
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
return $transactions;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -277,14 +270,14 @@ class SplitController extends Controller
|
||||
continue;
|
||||
}
|
||||
// take some info from first transaction, that should at least exist.
|
||||
$array[$index] = $row;
|
||||
$array[$index]['transaction_currency_id'] = $array[0]['transaction_currency_id'];
|
||||
$array[$index]['transaction_currency_code'] = $array[0]['transaction_currency_code'];
|
||||
$array[$index]['transaction_currency_symbol'] = $array[0]['transaction_currency_symbol'];
|
||||
$array[$index]['foreign_amount'] = round($array[0]['foreign_destination_amount'] ?? '0', 12);
|
||||
$array[$index]['foreign_currency_id'] = $array[0]['foreign_currency_id'];
|
||||
$array[$index]['foreign_currency_code'] = $array[0]['foreign_currency_code'];
|
||||
$array[$index]['foreign_currency_symbol'] = $array[0]['foreign_currency_symbol'];
|
||||
$array[$index] = $row;
|
||||
$array[$index]['currency_id'] = $array[0]['transaction_currency_id'];
|
||||
$array[$index]['currency_code'] = $array[0]['transaction_currency_code'];
|
||||
$array[$index]['currency_symbol'] = $array[0]['transaction_currency_symbol'];
|
||||
$array[$index]['foreign_amount'] = round($array[0]['foreign_destination_amount'] ?? '0', 12);
|
||||
$array[$index]['foreign_currency_id'] = $array[0]['foreign_currency_id'];
|
||||
$array[$index]['foreign_currency_code'] = $array[0]['foreign_currency_code'];
|
||||
$array[$index]['foreign_currency_symbol'] = $array[0]['foreign_currency_symbol'];
|
||||
}
|
||||
|
||||
return $array;
|
||||
|
@ -195,8 +195,6 @@ class TransactionController extends Controller
|
||||
$links = $linkTypeRepository->getLinks($journal);
|
||||
|
||||
// get transactions using the collector:
|
||||
// needs a lot of extra data to match the journal collector. Or just expand that one.
|
||||
// collect transactions using the journal collector
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
$collector->setUser(auth()->user());
|
||||
$collector->withOpposingAccount()->withCategoryInformation()->withBudgetInformation();
|
||||
|
@ -65,10 +65,10 @@ class SplitJournalFormRequest extends Request
|
||||
switch ($data['type']) {
|
||||
case 'withdrawal':
|
||||
$sourceId = $this->integer('journal_source_account_id');
|
||||
$destinationName = $transaction['destination_account_name'];
|
||||
$destinationName = $transaction['destination_name'];
|
||||
break;
|
||||
case 'deposit':
|
||||
$sourceName = $transaction['source_account_name'];
|
||||
$sourceName = $transaction['source_name'];
|
||||
$destinationId = $this->integer('journal_destination_account_id');
|
||||
break;
|
||||
case 'transfer':
|
||||
@ -90,12 +90,12 @@ class SplitJournalFormRequest extends Request
|
||||
'identifier' => $index,
|
||||
'currency_id' => $this->integer('journal_currency_id'),
|
||||
'currency_code' => null,
|
||||
'description' => $transaction['description'],
|
||||
'description' => $transaction['transaction_description'],
|
||||
'amount' => $transaction['amount'],
|
||||
'budget_id' => intval($transaction['budget_id'] ?? 0),
|
||||
'budget_name' => null,
|
||||
'category_id' => null,
|
||||
'category_name' => $transaction['category'],
|
||||
'category_name' => $transaction['category_name'],
|
||||
];
|
||||
$data['transactions'][] = $set;
|
||||
}
|
||||
@ -109,23 +109,23 @@ class SplitJournalFormRequest extends Request
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'what' => 'required|in:withdrawal,deposit,transfer',
|
||||
'journal_description' => 'required|between:1,255',
|
||||
'id' => 'numeric|belongsToUser:transaction_journals,id',
|
||||
'journal_source_account_id' => 'numeric|belongsToUser:accounts,id',
|
||||
'journal_source_account_name.*' => 'between:1,255',
|
||||
'journal_currency_id' => 'required|exists:transaction_currencies,id',
|
||||
'date' => 'required|date',
|
||||
'interest_date' => 'date|nullable',
|
||||
'book_date' => 'date|nullable',
|
||||
'process_date' => 'date|nullable',
|
||||
'transactions.*.description' => 'required|between:1,255',
|
||||
'transactions.*.destination_account_id' => 'numeric|belongsToUser:accounts,id',
|
||||
'transactions.*.destination_account_name' => 'between:1,255|nullable',
|
||||
'transactions.*.amount' => 'required|numeric',
|
||||
'transactions.*.budget_id' => 'belongsToUser:budgets,id',
|
||||
'transactions.*.category' => 'between:1,255|nullable',
|
||||
'transactions.*.piggy_bank_id' => 'between:1,255|nullable',
|
||||
'what' => 'required|in:withdrawal,deposit,transfer',
|
||||
'journal_description' => 'required|between:1,255',
|
||||
'id' => 'numeric|belongsToUser:transaction_journals,id',
|
||||
'journal_source_account_id' => 'numeric|belongsToUser:accounts,id',
|
||||
'journal_source_account_name.*' => 'between:1,255',
|
||||
'journal_currency_id' => 'required|exists:transaction_currencies,id',
|
||||
'date' => 'required|date',
|
||||
'interest_date' => 'date|nullable',
|
||||
'book_date' => 'date|nullable',
|
||||
'process_date' => 'date|nullable',
|
||||
'transactions.*.transaction_description' => 'required|between:1,255',
|
||||
'transactions.*.destination_account_id' => 'numeric|belongsToUser:accounts,id',
|
||||
'transactions.*.destination_name' => 'between:1,255|nullable',
|
||||
'transactions.*.amount' => 'required|numeric',
|
||||
'transactions.*.budget_id' => 'belongsToUser:budgets,id',
|
||||
'transactions.*.category_name' => 'between:1,255|nullable',
|
||||
'transactions.*.piggy_bank_id' => 'between:1,255|nullable',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -61,121 +61,6 @@ class JournalTasker implements JournalTaskerInterface
|
||||
return $events;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an overview of the transactions of a journal, tailored to the view
|
||||
* that shows a transaction (transaction/show/xx).
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTransactionsOverview(TransactionJournal $journal): array
|
||||
{
|
||||
$set = $journal
|
||||
->transactions()// "source"
|
||||
->leftJoin(
|
||||
'transactions as destination',
|
||||
function (JoinClause $join) {
|
||||
$join
|
||||
->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
|
||||
->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
|
||||
->where('transactions.identifier', '=', DB::raw('destination.identifier'))
|
||||
->whereNull('destination.deleted_at');
|
||||
}
|
||||
)
|
||||
->with(['budgets', 'categories'])
|
||||
->leftJoin('accounts as source_accounts', 'transactions.account_id', '=', 'source_accounts.id')
|
||||
->leftJoin('account_types as source_account_types', 'source_accounts.account_type_id', '=', 'source_account_types.id')
|
||||
->leftJoin('accounts as destination_accounts', 'destination.account_id', '=', 'destination_accounts.id')
|
||||
->leftJoin('account_types as destination_account_types', 'destination_accounts.account_type_id', '=', 'destination_account_types.id')
|
||||
->leftJoin('transaction_currencies as native_currencies', 'transactions.transaction_currency_id', '=', 'native_currencies.id')
|
||||
->leftJoin('transaction_currencies as foreign_currencies', 'transactions.foreign_currency_id', '=', 'foreign_currencies.id')
|
||||
->where('transactions.amount', '<', 0)
|
||||
->whereNull('transactions.deleted_at')
|
||||
->get(
|
||||
[
|
||||
'transactions.id',
|
||||
'transactions.account_id',
|
||||
'source_accounts.name as account_name',
|
||||
'source_accounts.encrypted as account_encrypted',
|
||||
'source_account_types.type as account_type',
|
||||
'transactions.amount',
|
||||
'transactions.foreign_amount',
|
||||
'transactions.description',
|
||||
'destination.id as destination_id',
|
||||
'destination.account_id as destination_account_id',
|
||||
'destination_accounts.name as destination_account_name',
|
||||
'destination_accounts.encrypted as destination_account_encrypted',
|
||||
'destination_account_types.type as destination_account_type',
|
||||
'native_currencies.id as transaction_currency_id',
|
||||
'native_currencies.decimal_places as transaction_currency_dp',
|
||||
'native_currencies.code as transaction_currency_code',
|
||||
'native_currencies.symbol as transaction_currency_symbol',
|
||||
|
||||
'foreign_currencies.id as foreign_currency_id',
|
||||
'foreign_currencies.decimal_places as foreign_currency_dp',
|
||||
'foreign_currencies.code as foreign_currency_code',
|
||||
'foreign_currencies.symbol as foreign_currency_symbol',
|
||||
]
|
||||
);
|
||||
|
||||
$transactions = [];
|
||||
$transactionType = $journal->transactionType->type;
|
||||
|
||||
/** @var Transaction $entry */
|
||||
foreach ($set as $entry) {
|
||||
$sourceBalance = $this->getBalance(intval($entry->id));
|
||||
$destinationBalance = $this->getBalance(intval($entry->destination_id));
|
||||
$budget = $entry->budgets->first();
|
||||
$category = $entry->categories->first();
|
||||
$transaction = [
|
||||
'journal_type' => $transactionType,
|
||||
'updated_at' => $journal->updated_at,
|
||||
'source_id' => $entry->id,
|
||||
'source' => $journal->transactions()->find($entry->id),
|
||||
'source_amount' => $entry->amount,
|
||||
'foreign_source_amount' => $entry->foreign_amount,
|
||||
'description' => $entry->description,
|
||||
'source_account_id' => $entry->account_id,
|
||||
'source_account_name' => Steam::decrypt(intval($entry->account_encrypted), $entry->account_name),
|
||||
'source_account_type' => $entry->account_type,
|
||||
'source_account_before' => $sourceBalance,
|
||||
'source_account_after' => bcadd($sourceBalance, $entry->amount),
|
||||
'destination_id' => $entry->destination_id,
|
||||
'destination_amount' => bcmul($entry->amount, '-1'),
|
||||
'foreign_destination_amount' => null === $entry->foreign_amount ? null : bcmul($entry->foreign_amount, '-1'),
|
||||
'destination_account_id' => $entry->destination_account_id,
|
||||
'destination_account_type' => $entry->destination_account_type,
|
||||
'destination_account_name' => Steam::decrypt(intval($entry->destination_account_encrypted), $entry->destination_account_name),
|
||||
'destination_account_before' => $destinationBalance,
|
||||
'destination_account_after' => bcadd($destinationBalance, bcmul($entry->amount, '-1')),
|
||||
'budget_id' => null === $budget ? 0 : $budget->id,
|
||||
'category' => null === $category ? '' : $category->name,
|
||||
'transaction_currency_id' => $entry->transaction_currency_id,
|
||||
'transaction_currency_code' => $entry->transaction_currency_code,
|
||||
'transaction_currency_symbol' => $entry->transaction_currency_symbol,
|
||||
'transaction_currency_dp' => $entry->transaction_currency_dp,
|
||||
'foreign_currency_id' => $entry->foreign_currency_id,
|
||||
'foreign_currency_code' => $entry->foreign_currency_code,
|
||||
'foreign_currency_symbol' => $entry->foreign_currency_symbol,
|
||||
'foreign_currency_dp' => $entry->foreign_currency_dp,
|
||||
];
|
||||
if (AccountType::CASH === $entry->destination_account_type) {
|
||||
$transaction['destination_account_name'] = '';
|
||||
}
|
||||
|
||||
if (AccountType::CASH === $entry->account_type) {
|
||||
$transaction['source_account_name'] = '';
|
||||
}
|
||||
|
||||
$transactions[] = $transaction;
|
||||
}
|
||||
|
||||
return $transactions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
@ -183,63 +68,4 @@ class JournalTasker implements JournalTaskerInterface
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the balance of an account before the given transaction has hit. This is tricky, because
|
||||
* the balance does not depend on the transaction itself but the journal it's part of. And of course
|
||||
* the order of transactions within the journal. So the query is pretty complex:.
|
||||
*
|
||||
* @param int $transactionId
|
||||
*
|
||||
* @deprecated
|
||||
* @deprecated
|
||||
* @return string
|
||||
*/
|
||||
private function getBalance(int $transactionId): string
|
||||
{
|
||||
// find the transaction first:
|
||||
$transaction = Transaction::find($transactionId);
|
||||
$date = $transaction->transactionJournal->date->format('Y-m-d');
|
||||
$order = intval($transaction->transactionJournal->order);
|
||||
$journalId = intval($transaction->transaction_journal_id);
|
||||
$identifier = intval($transaction->identifier);
|
||||
|
||||
// also add the virtual balance to the balance:
|
||||
$virtualBalance = strval($transaction->account->virtual_balance);
|
||||
|
||||
// go!
|
||||
$sum = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->where('account_id', $transaction->account_id)
|
||||
->whereNull('transactions.deleted_at')
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->where('transactions.id', '!=', $transactionId)
|
||||
->where(
|
||||
function (Builder $q1) use ($date, $order, $journalId, $identifier) {
|
||||
$q1->where('transaction_journals.date', '<', $date); // date
|
||||
$q1->orWhere(
|
||||
function (Builder $q2) use ($date, $order) { // function 1
|
||||
$q2->where('transaction_journals.date', $date);
|
||||
$q2->where('transaction_journals.order', '>', $order);
|
||||
}
|
||||
);
|
||||
$q1->orWhere(
|
||||
function (Builder $q3) use ($date, $order, $journalId) { // function 2
|
||||
$q3->where('transaction_journals.date', $date);
|
||||
$q3->where('transaction_journals.order', $order);
|
||||
$q3->where('transaction_journals.id', '<', $journalId);
|
||||
}
|
||||
);
|
||||
$q1->orWhere(
|
||||
function (Builder $q4) use ($date, $order, $journalId, $identifier) { // function 3
|
||||
$q4->where('transaction_journals.date', $date);
|
||||
$q4->where('transaction_journals.order', $order);
|
||||
$q4->where('transaction_journals.id', $journalId);
|
||||
$q4->where('transactions.identifier', '>', $identifier);
|
||||
}
|
||||
);
|
||||
}
|
||||
)->sum('transactions.amount');
|
||||
|
||||
return bcadd(strval($sum), $virtualBalance);
|
||||
}
|
||||
}
|
||||
|
@ -39,18 +39,6 @@ interface JournalTaskerInterface
|
||||
*/
|
||||
public function getPiggyBankEvents(TransactionJournal $journal): Collection;
|
||||
|
||||
/**
|
||||
* Get an overview of the transactions of a journal, tailored to the view
|
||||
* that shows a transaction (transaction/show/xx).
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTransactionsOverview(TransactionJournal $journal): array;
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
|
@ -180,6 +180,7 @@ class TransactionTransformer extends TransformerAbstract
|
||||
'updated_at' => $transaction->updated_at->toAtomString(),
|
||||
'created_at' => $transaction->created_at->toAtomString(),
|
||||
'description' => $transaction->description,
|
||||
'transaction_description' => $transaction->transaction_description,
|
||||
'date' => $transaction->date->format('Y-m-d'),
|
||||
'type' => $transaction->transaction_type_type,
|
||||
'identifier' => $transaction->identifier,
|
||||
|
3
public/js/ff/transactions/split/edit.js
vendored
3
public/js/ff/transactions/split/edit.js
vendored
@ -114,11 +114,12 @@ function cloneDivRow() {
|
||||
source.find('.count').text('#' + count);
|
||||
|
||||
source.find('input[name$="][amount]"]').val("").on('input', calculateSum);
|
||||
source.find('input[name$="][foreign_amount]"]').val("").on('input', calculateSum);
|
||||
if (destAccounts.length > 0) {
|
||||
source.find('input[name$="destination_account_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||
}
|
||||
|
||||
if (destAccounts.length > 0) {
|
||||
if (srcAccounts.length > 0) {
|
||||
source.find('input[name$="source_account_name]"]').typeahead({source: srcAccounts, autoSelect: false});
|
||||
}
|
||||
if (categories.length > 0) {
|
||||
|
@ -6,7 +6,6 @@
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.split.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="id" value="{{ journal.id }}"/>
|
||||
<input type="hidden" name="what" value="{{ preFilled.what }}"/>
|
||||
@ -74,13 +73,8 @@
|
||||
<h3 class="box-title">{{ 'optional_field_meta_data'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# NO BUDGET #}
|
||||
{# NO CATEGORY #}
|
||||
|
||||
{# ALWAYS TAGS #}
|
||||
{{ ExpandedForm.text('tags', preFilled.tags) }}
|
||||
|
||||
{# NO PIGGY BANK #}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -225,7 +219,8 @@
|
||||
|
||||
{# description #}
|
||||
<div class="col-lg-3 col-md-5 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][description]" value="{{ transaction.description }}"
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][description]"
|
||||
value="{{ transaction.transaction_description }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
|
||||
@ -233,7 +228,7 @@
|
||||
{% 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_account_name]"
|
||||
value="{{ transaction.destination_account_name }}" class="form-control"/>
|
||||
value="{{ transaction.destination_name }}" class="form-control"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -241,7 +236,7 @@
|
||||
{% 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_account_name]"
|
||||
value="{{ transaction.source_account_name }}" class="form-control"/>
|
||||
value="{{ transaction.source_name }}" class="form-control"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -252,7 +247,7 @@
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||
{% endif %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ transaction.transaction_currency_symbol }}</div>
|
||||
<div class="input-group-addon">{{ transaction.currency_symbol }}</div>
|
||||
<input type="number" name="transactions[{{ loop.index0 }}][amount]" value="{{ transaction.amount }}"
|
||||
class="form-control" autocomplete="off" step="any">
|
||||
</div>
|
||||
@ -290,7 +285,8 @@
|
||||
|
||||
{# category #}
|
||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][category]" value="{{ transaction.category }}"
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][category]"
|
||||
value="{{ transaction.category_name}}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user