Expand recurring transactions API

This commit is contained in:
James Cole
2018-06-29 19:27:07 +02:00
parent d0db1117f7
commit 2d7b7c2f3f
21 changed files with 670 additions and 162 deletions

View File

@@ -24,66 +24,66 @@ declare(strict_types=1);
return [
// new user:
'bank_name' => 'Bank name',
'bank_balance' => 'Balance',
'savings_balance' => 'Savings balance',
'credit_card_limit' => 'Credit card limit',
'automatch' => 'Match automatically',
'skip' => 'Skip',
'name' => 'Name',
'active' => 'Active',
'amount_min' => 'Minimum amount',
'amount_max' => 'Maximum amount',
'match' => 'Matches on',
'strict' => 'Strict mode',
'repeat_freq' => 'Repeats',
'journal_currency_id' => 'Currency',
'currency_id' => 'Currency',
'transaction_currency_id' => 'Currency',
'external_ip' => 'Your server\'s external IP',
'attachments' => 'Attachments',
'journal_amount' => 'Amount',
'journal_source_account_name' => 'Revenue account (source)',
'journal_source_account_id' => 'Asset account (source)',
'BIC' => 'BIC',
'verify_password' => 'Verify password security',
'source_account' => 'Source account',
'destination_account' => 'Destination account',
'journal_destination_account_id' => 'Asset account (destination)',
'asset_destination_account' => 'Asset account (destination)',
'asset_source_account' => 'Asset account (source)',
'journal_description' => 'Description',
'note' => 'Notes',
'split_journal' => 'Split this transaction',
'split_journal_explanation' => 'Split this transaction in multiple parts',
'currency' => 'Currency',
'account_id' => 'Asset account',
'budget_id' => 'Budget',
'openingBalance' => 'Opening balance',
'tagMode' => 'Tag mode',
'tag_position' => 'Tag location',
'virtualBalance' => 'Virtual balance',
'targetamount' => 'Target amount',
'accountRole' => 'Account role',
'openingBalanceDate' => 'Opening balance date',
'ccType' => 'Credit card payment plan',
'ccMonthlyPaymentDate' => 'Credit card monthly payment date',
'piggy_bank_id' => 'Piggy bank',
'returnHere' => 'Return here',
'returnHereExplanation' => 'After storing, return here to create another one.',
'returnHereUpdateExplanation' => 'After updating, return here.',
'description' => 'Description',
'expense_account' => 'Expense account',
'revenue_account' => 'Revenue account',
'decimal_places' => 'Decimal places',
'exchange_rate_instruction' => 'Foreign currencies',
'source_amount' => 'Amount (source)',
'destination_amount' => 'Amount (destination)',
'native_amount' => 'Native amount',
'new_email_address' => 'New email address',
'verification' => 'Verification',
'api_key' => 'API key',
'remember_me' => 'Remember me',
'bank_name' => 'Bank name',
'bank_balance' => 'Balance',
'savings_balance' => 'Savings balance',
'credit_card_limit' => 'Credit card limit',
'automatch' => 'Match automatically',
'skip' => 'Skip',
'name' => 'Name',
'active' => 'Active',
'amount_min' => 'Minimum amount',
'amount_max' => 'Maximum amount',
'match' => 'Matches on',
'strict' => 'Strict mode',
'repeat_freq' => 'Repeats',
'journal_currency_id' => 'Currency',
'currency_id' => 'Currency',
'transaction_currency_id' => 'Currency',
'external_ip' => 'Your server\'s external IP',
'attachments' => 'Attachments',
'journal_amount' => 'Amount',
'journal_source_name' => 'Revenue account (source)',
'journal_source_id' => 'Asset account (source)',
'BIC' => 'BIC',
'verify_password' => 'Verify password security',
'source_account' => 'Source account',
'destination_account' => 'Destination account',
'journal_destination_id' => 'Asset account (destination)',
'asset_destination_account' => 'Asset account (destination)',
'asset_source_account' => 'Asset account (source)',
'journal_description' => 'Description',
'note' => 'Notes',
'split_journal' => 'Split this transaction',
'split_journal_explanation' => 'Split this transaction in multiple parts',
'currency' => 'Currency',
'account_id' => 'Asset account',
'budget_id' => 'Budget',
'openingBalance' => 'Opening balance',
'tagMode' => 'Tag mode',
'tag_position' => 'Tag location',
'virtualBalance' => 'Virtual balance',
'targetamount' => 'Target amount',
'accountRole' => 'Account role',
'openingBalanceDate' => 'Opening balance date',
'ccType' => 'Credit card payment plan',
'ccMonthlyPaymentDate' => 'Credit card monthly payment date',
'piggy_bank_id' => 'Piggy bank',
'returnHere' => 'Return here',
'returnHereExplanation' => 'After storing, return here to create another one.',
'returnHereUpdateExplanation' => 'After updating, return here.',
'description' => 'Description',
'expense_account' => 'Expense account',
'revenue_account' => 'Revenue account',
'decimal_places' => 'Decimal places',
'exchange_rate_instruction' => 'Foreign currencies',
'source_amount' => 'Amount (source)',
'destination_amount' => 'Amount (destination)',
'native_amount' => 'Native amount',
'new_email_address' => 'New email address',
'verification' => 'Verification',
'api_key' => 'API key',
'remember_me' => 'Remember me',
'source_account_asset' => 'Source account (asset account)',
'destination_account_expense' => 'Destination account (expense account)',

View File

@@ -37,6 +37,8 @@ return [
'invalid_selection' => 'Your selection is invalid',
'belongs_user' => 'This value is invalid for this field.',
'at_least_one_transaction' => 'Need at least one transaction.',
'at_least_one_repetition' => 'Need at least one repetition.',
'require_repeat_until' => 'Require either a number of repetitions, or an end date (repeats_until). Not both.',
'require_currency_info' => 'The content of this field is invalid without currency information.',
'equal_description' => 'Transaction description should not equal global description.',
'file_invalid_mime' => 'File ":name" is of type ":mime" which is not accepted as a new upload.',
@@ -115,6 +117,8 @@ return [
'unique_piggy_bank_for_user' => 'The name of the piggy bank must be unique.',
'secure_password' => 'This is not a secure password. Please try again. For more information, visit http://bit.ly/FF3-password-security',
'valid_recurrence_rep_type' => 'Invalid repetition type for recurring transactions',
'valid_recurrence_rep_moment' => 'Invalid repetition moment for this type of repetition.',
'invalid_account_info' => 'Invalid account information',
'attributes' => [
'email' => 'email address',
'description' => 'description',

View File

@@ -89,16 +89,16 @@
{{ ExpandedForm.amountNoCurrency('amount', []) }}
{# source account if withdrawal, or if transfer: #}
{{ ExpandedForm.activeAssetAccountList('source_account_id', null, {label: trans('form.asset_source_account')}) }}
{{ ExpandedForm.activeAssetAccountList('source_id', null, {label: trans('form.asset_source_account')}) }}
{# source account name for deposits: #}
{{ ExpandedForm.text('source_account_name', null, {label: trans('form.revenue_account')}) }}
{{ ExpandedForm.text('source_name', null, {label: trans('form.revenue_account')}) }}
{# destination if deposit or transfer: #}
{{ ExpandedForm.activeAssetAccountList('destination_account_id', null, {label: trans('form.asset_destination_account')} ) }}
{{ ExpandedForm.activeAssetAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }}
{# destination account name for withdrawals #}
{{ ExpandedForm.text('destination_account_name', null, {label: trans('form.expense_account')}) }}
{{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }}
</div>
</div>
</div>

View File

@@ -88,16 +88,16 @@
{{ ExpandedForm.amountNoCurrency('amount', array.transactions[0].amount) }}
{# source account if withdrawal, or if transfer: #}
{{ ExpandedForm.assetAccountList('source_account_id', array.transactions[0].source_account_id, {label: trans('form.asset_source_account')}) }}
{{ ExpandedForm.assetAccountList('source_id', array.transactions[0].source_id, {label: trans('form.asset_source_account')}) }}
{# source account name for deposits: #}
{{ ExpandedForm.text('source_account_name', array.transactions[0].source_account_name, {label: trans('form.revenue_account')}) }}
{{ ExpandedForm.text('source_name', array.transactions[0].source_name, {label: trans('form.revenue_account')}) }}
{# destination if deposit or transfer: #}
{{ ExpandedForm.assetAccountList('destination_account_id', array.transactions[0].destination_account_id, {label: trans('form.asset_destination_account')} ) }}
{{ ExpandedForm.assetAccountList('destination_id', array.transactions[0].destination_id, {label: trans('form.asset_destination_account')} ) }}
{# destination account name for withdrawals #}
{{ ExpandedForm.text('destination_account_name', array.transactions[0].destination_account_name, {label: trans('form.expense_account')}) }}
{{ ExpandedForm.text('destination_name', array.transactions[0].destination_name, {label: trans('form.expense_account')}) }}
</div>
</div>
</div>

View File

@@ -75,9 +75,9 @@
{% if null != rtt['foreign_amount'] %}
({{ formatAmountBySymbol(rtt['foreign_amount'],rtt['foreign_currency_symbol'],rtt['foreign_currency_dp']) }}),
{% endif %}
<a href="{{ route('accounts.show', rtt['source_account_id']) }}">{{ rtt['source_account_name'] }}</a>
<a href="{{ route('accounts.show', rtt['source_id']) }}">{{ rtt['source_name'] }}</a>
&rarr;
<a href="{{ route('accounts.show', rtt['destination_account_id']) }}">{{ rtt['destination_account_name'] }}</a>
<a href="{{ route('accounts.show', rtt['destination_id']) }}">{{ rtt['destination_name'] }}</a>
</li>
{% endfor %}
</ol>

View File

@@ -101,11 +101,11 @@
<tbody>
{% for transaction in array.transactions %}
<tr>
<td data-value="{{ transaction.source_account_name }}">
<a href="{{ route('accounts.show', [transaction.source_account_id]) }}">{{ transaction.source_account_name }}</a>
<td data-value="{{ transaction.source_name }}">
<a href="{{ route('accounts.show', [transaction.source_id]) }}">{{ transaction.source_name }}</a>
</td>
<td data-value="{{ transaction.destination_account_name }}">
<a href="{{ route('accounts.show', [transaction.destination_account_id]) }}">{{ transaction.destination_account_name }}</a>
<td data-value="{{ transaction.destination_name }}">
<a href="{{ route('accounts.show', [transaction.destination_id]) }}">{{ transaction.destination_name }}</a>
</td>
<td>
{{ formatAmountBySymbol(transaction.amount,transaction.currency_symbol,transaction.currency_dp) }}