mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
More code for the new CSV import
This commit is contained in:
44
resources/lang/en_US/csv.php
Normal file
44
resources/lang/en_US/csv.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* csv.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
return [
|
||||
'csv_column__ignore' => '(ignore this column)',
|
||||
'csv_column_account-iban' => 'Asset account (IBAN)',
|
||||
'csv_column_account-id' => 'Asset account ID (matching Firefly)',
|
||||
'csv_column_account-name' => 'Asset account (name)',
|
||||
'csv_column_amount' => 'Amount',
|
||||
'csv_column_amount-comma-separated' => 'Amount (comma as decimal separator)',
|
||||
'csv_column_bill-id' => 'Bill ID (matching Firefly)',
|
||||
'csv_column_bill-name' => 'Bill name',
|
||||
'csv_column_budget-id' => 'Budget ID (matching Firefly)',
|
||||
'csv_column_budget-name' => 'Budget name',
|
||||
'csv_column_category-id' => 'Category ID (matching Firefly)',
|
||||
'csv_column_category-name' => 'Category name',
|
||||
'csv_column_currency-code' => 'Currency code (ISO 4217)',
|
||||
'csv_column_currency-id' => 'Currency ID (matching Firefly)',
|
||||
'csv_column_currency-name' => 'Currency name (matching Firefly)',
|
||||
'csv_column_currency-symbol' => 'Currency symbol (matching Firefly)',
|
||||
'csv_column_date-rent' => 'Rent calculation date',
|
||||
'csv_column_date-transaction' => 'Date',
|
||||
'csv_column_description' => 'Description',
|
||||
'csv_column_opposing-iban' => 'Opposing account (IBAN)',
|
||||
'csv_column_opposing-id' => 'Opposing account ID (matching Firefly)',
|
||||
'csv_column_opposing-name' => 'Opposing account (name)',
|
||||
'csv_column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator',
|
||||
'csv_column_ing-debet-credit' => 'ING specific debet/credit indicator',
|
||||
'csv_column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID',
|
||||
'csv_column_sepa-ct-op' => 'SEPA Credit Transfer opposing account',
|
||||
'csv_column_sepa-db' => 'SEPA Direct Debet',
|
||||
'csv_column_tags-comma' => 'Tags (comma separated)',
|
||||
'csv_column_tags-space' => 'Tags (space separated)',
|
||||
'csv_column_account-number' => 'Asset account (account number)',
|
||||
'csv_column_opposing-number' => 'Opposing account (account number)',
|
||||
];
|
88
resources/views/import/csv/map.twig
Normal file
88
resources/views/import/csv/map.twig
Normal file
@@ -0,0 +1,88 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'csv_column_roles_title'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>{{ 'csv_column_roles_text'|_ }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('import.postSettings', job.key) }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'csv_column_roles_table'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:20%;">{{ 'csv_column_name'|_ }}</th>
|
||||
<th style="width:40%;">{{ 'csv_column_example'|_ }}</th>
|
||||
<th style="width:30%;">{{ 'csv_column_role'|_ }}</th>
|
||||
<th style="width:10%;">{{ 'csv_do_map_value'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for i in 0..data.columnCount %}
|
||||
<tr>
|
||||
<td>Column #{{ loop.index }}</td>
|
||||
<td>
|
||||
{% if data.columns[i]|length == 0 %}
|
||||
<em>No example data available</em>
|
||||
{% else %}
|
||||
{% for example in data.columns[i] %}
|
||||
<code>{{ example }}</code><br />
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
{{ Form.select(('role['~index~']'), data.available_roles,data.set_roles[index],{class: 'form-control'}) }}
|
||||
</td>
|
||||
<td>
|
||||
{# Form.checkbox(('map['~index~']'),1,map[index]) #}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<a href="{{ route('import.index') }}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> {{ 'csv_go_back'|_ }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right">
|
||||
{{ 'csv_continue'|_ }} <i class="fa fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user