Compare commits

...

102 Commits

Author SHA1 Message Date
James Cole
919a35aed3 Merge branch 'release/3.5.6.1' 2015-12-28 16:53:45 +01:00
James Cole
9c929ecd1b New release. 2015-12-28 16:53:30 +01:00
James Cole
f79c9f7cf1 Cleanup. 2015-12-28 16:52:28 +01:00
James Cole
8e75c345d9 Found a bug that requires a new release of FF3 to fix. 2015-12-28 16:52:21 +01:00
James Cole
44886d9aad Merge branch 'release/3.5.6' into develop 2015-12-28 08:07:44 +01:00
James Cole
c2d444347d Merge branch 'release/3.5.6' 2015-12-28 08:07:43 +01:00
James Cole
5cb497596d New release. 2015-12-28 08:07:26 +01:00
James Cole
1857469d2f Removed unused parameters 2015-12-28 08:00:42 +01:00
James Cole
ea71b4843d Formatting fix in chart. 2015-12-28 07:58:40 +01:00
James Cole
97727e2e3d Some code cleanup courtesy of phpstorm. 2015-12-28 07:55:09 +01:00
James Cole
f81e7da8bb Code cleanup. 2015-12-28 07:49:27 +01:00
James Cole
8e827bf83b Removed parameter. 2015-12-28 07:43:57 +01:00
James Cole
9e1fa284ca Update php doc. 2015-12-28 07:43:05 +01:00
James Cole
3bf800be6e null check. 2015-12-28 07:41:44 +01:00
James Cole
635b9f9dba instance check. 2015-12-28 07:39:48 +01:00
James Cole
52a0d7cf7b Clean up code. 2015-12-28 07:38:02 +01:00
James Cole
a34516932b Rename include advised by scrutinizer. 2015-12-28 07:35:09 +01:00
James Cole
929a2a30a2 Fix TODO. 2015-12-28 07:31:48 +01:00
James Cole
ffa88eeb08 Made deleted piggy banks for piggy bank events visible. 2015-12-28 07:27:16 +01:00
James Cole
51b45b4ed4 Code cleanup. 2015-12-28 07:12:47 +01:00
James Cole
f263844793 Fix a bug where you cannot edit transactions. Will warrant a new release of FF. 2015-12-28 07:12:12 +01:00
James Cole
18c46df9aa Fix negative amounts and chart names. 2015-12-27 21:26:44 +01:00
James Cole
15846e157b From 200+ queries back to ~17. 2015-12-27 21:17:04 +01:00
James Cole
bc59f2db0d Optimised queries. 2015-12-27 20:07:49 +01:00
James Cole
cd2be8c1a4 Activate caching. 2015-12-27 19:51:20 +01:00
James Cole
f958115c50 Update composer file. 2015-12-27 17:57:32 +01:00
James Cole
e7d677bfb6 Add rounding, so the number will be a float. 2015-12-27 17:34:31 +01:00
James Cole
3e80ffc52b Huge change to bills and paid/unpaid/cc boxes. 2015-12-27 17:29:41 +01:00
James Cole
d0c7a5c076 Optimised query. 2015-12-27 09:44:12 +01:00
James Cole
f3f4e6b354 Stops date from skipping ahead slowly. 2015-12-27 09:40:28 +01:00
James Cole
5a45b25614 Merge branch 'hotfix/chart-fix' 2015-12-27 09:35:41 +01:00
James Cole
0b5ee1edfc Merge branch 'hotfix/chart-fix' into develop 2015-12-27 09:35:41 +01:00
James Cole
da3dc599f9 Fix chart call. 2015-12-27 09:35:24 +01:00
James Cole
f013b435ab Merge branch 'release/3.5.5' 2015-12-27 08:58:36 +01:00
James Cole
5f6975a113 Merge branch 'release/3.5.5' into develop 2015-12-27 08:58:36 +01:00
James Cole
c5dee29e4b New version. 2015-12-27 08:58:25 +01:00
James Cole
633ee02f13 Remove old Google references 2015-12-27 08:57:51 +01:00
James Cole
6b750c909a Fix forgotten call in bill repository. 2015-12-27 08:39:41 +01:00
James Cole
5f8b6640a9 A lot less queries thanks to efficient query. 2015-12-27 08:39:29 +01:00
James Cole
dd42d8437c Removed code for unused chart. 2015-12-27 08:12:46 +01:00
James Cole
67a178591d Some query optimisations. 2015-12-27 07:59:00 +01:00
James Cole
f5e5659c1f Code cleanup. 2015-12-26 09:40:24 +01:00
James Cole
8b0f0fb615 Optimise queries. 2015-12-26 09:39:35 +01:00
James Cole
209116e766 Query optimisations. 2015-12-26 09:21:45 +01:00
James Cole
79392ab656 Add caching to various queries and lists. 2015-12-26 08:44:34 +01:00
James Cole
3ca1207231 #135 2015-12-26 08:24:41 +01:00
James Cole
cec1b147f2 #135 2015-12-26 08:23:52 +01:00
James Cole
46cfcfa3e7 Update admin template. 2015-12-26 08:22:48 +01:00
James Cole
b833e8dfa2 #135 2015-12-26 08:16:30 +01:00
James Cole
77b843efd8 #135 2015-12-26 08:15:22 +01:00
James Cole
db72ad7c60 Issue #135 2015-12-26 08:12:51 +01:00
James Cole
eadc630fcb #135 2015-12-26 08:12:44 +01:00
James Cole
170c1793cc #135 2015-12-26 08:06:34 +01:00
James Cole
9f7c6c2d0c Extra cache. 2015-12-25 17:11:55 +01:00
James Cole
72d054c55c Add support for virtual balance currency, even though it cannot be stored yet. 2015-12-25 17:10:04 +01:00
James Cole
524edfe7c2 Better formatting (will take currency into account). 2015-12-25 16:40:27 +01:00
James Cole
c25c5623d2 Fixed the currency dropdown when multiple fields present on single page. 2015-12-25 16:38:53 +01:00
James Cole
4f38b77ef6 Better caching. 2015-12-25 09:34:37 +01:00
James Cole
5862803434 This saves some queries. 2015-12-25 09:34:23 +01:00
James Cole
5b3beded39 I can't believe I left this here all this time. 2015-12-25 07:58:19 +01:00
James Cole
c61fb7a598 Marked some unused stuff as deprecated. 2015-12-25 07:52:56 +01:00
James Cole
33d9148029 Make sure charts are cached. 2015-12-25 07:43:34 +01:00
James Cole
63969f5a33 Same routine but for money spent on accounts. 2015-12-25 07:42:00 +01:00
James Cole
edde18aeef Remove old chart. 2015-12-25 07:32:56 +01:00
James Cole
657116d361 Display new chart. 2015-12-25 07:32:03 +01:00
James Cole
e16269daa8 Collect data for new chart. 2015-12-25 07:31:54 +01:00
James Cole
c07591ff5c New method, earnedForAccounts 2015-12-25 07:31:43 +01:00
James Cole
75a478ad54 New chart, earned in period. 2015-12-25 07:31:29 +01:00
James Cole
8dae8b1a7f More code. Forgot to push. 2015-12-24 16:59:38 +01:00
James Cole
15fd8cf486 Completed the renaming of some methods. 2015-12-24 10:27:45 +01:00
James Cole
55333156ac Better cache control for some charts. 2015-12-24 10:14:01 +01:00
James Cole
8cdcba3231 Original fix in place. #133 2015-12-24 09:50:28 +01:00
James Cole
8bab9e84e2 Should not have edited that code. #133 2015-12-24 09:50:16 +01:00
James Cole
2faae83912 Include empty budgets. #133 2015-12-24 09:47:44 +01:00
James Cole
5a61a11a61 Attempt to fix bug #133 2015-12-24 09:45:21 +01:00
James Cole
a6d71988f2 Replaced some language calls. 2015-12-24 08:35:08 +01:00
James Cole
7069e242ae Removed useless entry. 2015-12-24 08:20:59 +01:00
James Cole
56ee830558 Moved locale information from the language to the translation files. 2015-12-24 08:20:47 +01:00
James Cole
6dd12729e6 Small disclaimer in readme. 2015-12-24 08:20:19 +01:00
James Cole
14a48303cb Cleanup. 2015-12-23 11:32:50 +01:00
James Cole
72cf6c9c0f Removed old route. 2015-12-23 11:32:41 +01:00
James Cole
144ee6b8ca Updated read me. 2015-12-23 10:38:42 +01:00
James Cole
8967d86da6 Updated language files. 2015-12-23 09:34:23 +01:00
James Cole
18c6edbb5d Update language files. 2015-12-23 09:09:51 +01:00
James Cole
53de3c4717 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix a bug where the frontpage would not honor transaction order.
  Fix a bug where the report page would mess up the session dates.
2015-12-22 20:46:52 +01:00
James Cole
ad577e4e81 Expand language files. 2015-12-22 20:46:16 +01:00
James Cole
44811a3e7c Fix a bug where the frontpage would not honor transaction order. 2015-12-21 11:30:58 +01:00
James Cole
1ab3f05b3a Fix a bug where the report page would mess up the session dates. 2015-12-21 10:25:57 +01:00
James Cole
5e76488ae7 Better localisation in charts. 2015-12-20 08:40:58 +01:00
James Cole
32771fe7e1 Add Português do Brasil 2015-12-20 08:20:50 +01:00
James Cole
9b40cc6881 Fix locale setting for Carbon. 2015-12-20 08:19:26 +01:00
James Cole
2e35260bbb Add some translations. 2015-12-20 07:34:10 +01:00
James Cole
a067704277 Move stuff around. 2015-12-20 07:34:01 +01:00
James Cole
de281818ac Add language 2015-12-19 21:16:09 +01:00
James Cole
c49bfad38d Move languages. 2015-12-19 20:54:59 +01:00
James Cole
c1ba591b26 Rename languages. 2015-12-19 20:54:27 +01:00
James Cole
719af38a61 Cleanup. 2015-12-18 18:42:56 +01:00
James Cole
ac61dfae6b File reformatting. 2015-12-18 16:38:50 +01:00
James Cole
813fb679a7 File reformatting. 2015-12-18 16:37:45 +01:00
James Cole
e7562781f7 File reformatting. 2015-12-18 16:37:27 +01:00
James Cole
56d36b7f53 Remove Google references. 2015-12-18 16:37:02 +01:00
James Cole
08a53156bd Merge branch 'release/3.5.4' into develop 2015-12-18 08:13:28 +01:00
150 changed files with 4350 additions and 2697 deletions

View File

@@ -2,6 +2,7 @@ APP_ENV=production
APP_DEBUG=false
APP_KEY=SomeRandomStringOf32CharsExactly
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=homestead
@@ -12,13 +13,17 @@ CACHE_DRIVER=file
SESSION_DRIVER=file
DEFAULT_CURRENCY=EUR
DEFAULT_LANGUAGE=en_US
EMAIL_SMTP=
EMAIL_DRIVER=smtp
EMAIL_USERNAME=
EMAIL_PASSWORD=
ANALYTICS_ID=
EMAIL_PRETEND=false
SHOW_INCOMPLETE_TRANSLATIONS=false
ANALYTICS_ID=
RUNCLEANUP=true
SITE_OWNER=mail@example.com

View File

@@ -19,7 +19,6 @@ their current cashflow. There are tons of ways to save and earn money.
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
To get to know Firefly, and to see if it fits you, check out these resources:
- The screenshots below on this very page.
@@ -88,7 +87,13 @@ This site always runs the latest version of Firefly III. If you want to use it,
You should always run Firefly III on a site with TLS enabled (https://). Please note that although some parts of the
database are encrypted (transaction descriptions, names, etc.) some parts are _not_ (amounts, dates, etc). If you need
more security, you must enable transparent database encryption or a comparable technology.
more security, you must enable transparent database encryption or a comparable technology. Please remember that this
is open source software under active development, and it is in no way guaranteed to be safe or secure.
## Translations
Firefly III is currently available in Dutch and English. Support for other languages is being worked on. I can use
your help. Checkout [Crowdin](https://crowdin.com/project/firefly-iii) for more information.
## Credits

View File

@@ -1,25 +0,0 @@
<?php namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class JournalDeleted
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalDeleted extends Event
{
use SerializesModels;
/**
* Create a new event instance.
*
*/
public function __construct()
{
//
}
}

View File

@@ -14,15 +14,6 @@ use Illuminate\Support\Collection;
interface AccountChartGenerator
{
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function all(Collection $accounts, Carbon $start, Carbon $end);
/**
* @param Collection $accounts
* @param Carbon $start

View File

@@ -3,10 +3,8 @@
namespace FireflyIII\Generator\Chart\Account;
use Carbon\Carbon;
use Config;
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
use Preferences;
use Steam;
/**
@@ -17,21 +15,6 @@ use Steam;
class ChartJsAccountChartGenerator implements AccountChartGenerator
{
/**
* @codeCoverageIgnore
*
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function all(Collection $accounts, Carbon $start, Carbon $end)
{
return $this->frontpage($accounts, $start, $end);
}
/**
* @param Collection $accounts
* @param Carbon $start
@@ -42,10 +25,10 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end)
{
$data = [
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.spent'),
'data' => []]]];
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.spent'),
'data' => []]]];
bcscale(2);
$start->subDay();
@@ -105,21 +88,21 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
public function frontpage(Collection $accounts, Carbon $start, Carbon $end)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$data = [
$format = trans('config.month_and_day');
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
$current = clone $start;
$current = clone $start;
while ($current <= $end) {
$data['labels'][] = $current->formatLocalized($format);
$current->addDay();
}
foreach ($accounts as $account) {
$set = [
$set = [
'label' => $account->name,
'fillColor' => 'rgba(220,220,220,0.2)',
'strokeColor' => 'rgba(220,220,220,1)',
@@ -129,9 +112,15 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
'pointHighlightStroke' => 'rgba(220,220,220,1)',
'data' => [],
];
$current = clone $start;
$current = clone $start;
$range = Steam::balanceInRange($account, $start, clone $end);
$previous = array_values($range)[0];
while ($current <= $end) {
$set['data'][] = Steam::balance($account, $current);
$format = $current->format('Y-m-d');
$balance = isset($range[$format]) ? $range[$format] : $previous;
$set['data'][] = $balance;
$previous = $balance;
$current->addDay();
}
$data['datasets'][] = $set;
@@ -151,10 +140,9 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
public function single(Account $account, Carbon $start, Carbon $end)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$format = trans('config.month_and_day');
$data = [
$data = [
'count' => 1,
'labels' => [],
'datasets' => [
@@ -164,12 +152,17 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
]
],
];
$current = clone $start;
$range = Steam::balanceInRange($account, $start, $end);
$current = clone $start;
$previous = array_values($range)[0];
while ($end >= $current) {
$theDate = $current->format('Y-m-d');
$balance = isset($range[$theDate]) ? $range[$theDate] : $previous;
$data['labels'][] = $current->formatLocalized($format);
$data['datasets'][0]['data'][] = Steam::balance($account, $current);
$data['datasets'][0]['data'][] = $balance;
$previous = $balance;
$current->addDay();
}

View File

@@ -14,12 +14,12 @@ interface BillChartGenerator
{
/**
* @param Collection $paid
* @param Collection $unpaid
* @param string $paid
* @param string $unpaid
*
* @return array
*/
public function frontpage(Collection $paid, Collection $unpaid);
public function frontpage($paid, $unpaid);
/**
* @param Bill $bill

View File

@@ -2,11 +2,9 @@
namespace FireflyIII\Generator\Chart\Bill;
use Config;
use FireflyIII\Models\Bill;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
use Preferences;
/**
* Class ChartJsBillChartGenerator
@@ -17,42 +15,23 @@ class ChartJsBillChartGenerator implements BillChartGenerator
{
/**
* @param Collection $paid
* @param Collection $unpaid
* @param string $paid
* @param string $unpaid
*
* @return array
*/
public function frontpage(Collection $paid, Collection $unpaid)
public function frontpage($paid, $unpaid)
{
$paidDescriptions = [];
$paidAmount = 0;
$unpaidDescriptions = [];
$unpaidAmount = 0;
bcscale(2);
/** @var TransactionJournal $entry */
foreach ($paid as $entry) { // loop paid and create single entry:
$paidDescriptions[] = $entry->description;
$paidAmount = bcadd($paidAmount, $entry->amount_positive);
}
/** @var Bill $entry */
foreach ($unpaid as $entry) { // loop unpaid:
$description = $entry[0]->name . ' (' . $entry[1]->format('jS M Y') . ')';
$amount = bcdiv(bcadd($entry[0]->amount_max, $entry[0]->amount_min), 2);
$unpaidDescriptions[] = $description;
$unpaidAmount = bcadd($unpaidAmount, $amount);
unset($amount, $description);
}
$data = [
[
'value' => $unpaidAmount,
'value' => round($unpaid, 2),
'color' => 'rgba(53, 124, 165,0.7)',
'highlight' => 'rgba(53, 124, 165,0.9)',
'label' => trans('firefly.unpaid'),
],
[
'value' => $paidAmount,
'value' => round($paid * -1, 2), // paid is negative, must be positive.
'color' => 'rgba(0, 141, 76, 0.7)',
'highlight' => 'rgba(0, 141, 76, 0.9)',
'label' => trans('firefly.paid'),
@@ -71,8 +50,7 @@ class ChartJsBillChartGenerator implements BillChartGenerator
public function single(Bill $bill, Collection $entries)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = trans('config.month');
$data = [
'count' => 3,
@@ -87,11 +65,15 @@ class ChartJsBillChartGenerator implements BillChartGenerator
$minAmount = [];
$maxAmount = [];
$actualAmount = [];
/** @var TransactionJournal $entry */
foreach ($entries as $entry) {
$data['labels'][] = $entry->date->formatLocalized($format);
$minAmount[] = round($bill->amount_min, 2);
$maxAmount[] = round($bill->amount_max, 2);
$actualAmount[] = round(($entry->amount * -1), 2);
/*
* journalAmount has been collected in BillRepository::getJournals
*/
$actualAmount[] = round(($entry->journalAmount * -1), 2);
}
$data['datasets'][] = [

View File

@@ -18,13 +18,6 @@ interface BudgetChartGenerator
*/
public function budget(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries);
/**
* @param Collection $entries
*
@@ -39,6 +32,13 @@ interface BudgetChartGenerator
*/
public function frontpage(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries);
/**
* @param Collection $budgets
* @param Collection $entries

View File

@@ -24,7 +24,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
public function budget(Collection $entries, $dateFormat = 'month')
{
// language:
$language = Preferences::get('language', 'en')->data;
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
$format = Config::get('firefly.' . $dateFormat . '.' . $language);
$data = [
@@ -33,7 +33,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
[
'label' => 'Amount',
'data' => [],
]
],
],
];
@@ -83,8 +83,8 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) {
$data['labels'][] = $entry[0];
$left[] = round($entry[1], 2);
$spent[] = round($entry[2], 2);
$overspent[] = round($entry[3], 2);
$spent[] = round($entry[2] * -1, 2); // spent is coming in negative, must be positive
$overspent[] = round($entry[3] * -1, 2); // same
}
}
@@ -115,8 +115,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
public function year(Collection $budgets, Collection $entries)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = trans('config.month');
$data = [
'labels' => [],

View File

@@ -20,11 +20,12 @@ interface CategoryChartGenerator
public function all(Collection $entries);
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries);
public function earnedInPeriod(Collection $categories, Collection $entries);
/**
* @param Collection $entries
@@ -33,6 +34,13 @@ interface CategoryChartGenerator
*/
public function frontpage(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries);
/**
* @param Collection $entries
*
@@ -40,20 +48,11 @@ interface CategoryChartGenerator
*/
public function period(Collection $entries);
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInYear(Collection $categories, Collection $entries);
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInYear(Collection $categories, Collection $entries);
public function spentInPeriod(Collection $categories, Collection $entries);
}

View File

@@ -2,9 +2,7 @@
namespace FireflyIII\Generator\Chart\Category;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
@@ -51,6 +49,39 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
return $data;
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInPeriod(Collection $categories, Collection $entries)
{
// language:
$format = trans('config.month');
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
/**
* @param Collection $entries
*
@@ -78,87 +109,6 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
return $data;
}
/**
* @codeCoverageIgnore
*
* @param Collection $entries
*
* @return array
*/
public function period(Collection $entries)
{
return $this->all($entries);
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInYear(Collection $categories, Collection $entries)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInYear(Collection $categories, Collection $entries)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
/**
* @param Collection $entries
*
@@ -195,4 +145,50 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
return $data;
}
/**
* @codeCoverageIgnore
*
* @param Collection $entries
*
* @return array
*/
public function period(Collection $entries)
{
return $this->all($entries);
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInPeriod(Collection $categories, Collection $entries)
{
// language:
$format = trans('config.month');
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
}

View File

@@ -3,9 +3,7 @@
namespace FireflyIII\Generator\Chart\PiggyBank;
use Carbon\Carbon;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
@@ -25,8 +23,7 @@ class ChartJsPiggyBankChartGenerator implements PiggyBankChartGenerator
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$format = trans('config.month_and_day');
$data = [
'count' => 1,

View File

@@ -2,9 +2,7 @@
namespace FireflyIII\Generator\Chart\Report;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
* Class ChartJsReportChartGenerator
@@ -14,41 +12,6 @@ use Preferences;
class ChartJsReportChartGenerator implements ReportChartGenerator
{
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries)
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized($format);
$data['datasets'][0]['data'][] = round($entry[1], 2);
$data['datasets'][1]['data'][] = round($entry[2], 2);
}
return $data;
}
/**
* Same as above but other translations.
*
@@ -82,6 +45,71 @@ class ChartJsReportChartGenerator implements ReportChartGenerator
return $data;
}
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function multiYearInOutSummarized($income, $expense, $count)
{
$data = [
'count' => 2,
'labels' => [trans('firefly.sum_of_years'), trans('firefly.average_of_years')],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
],
];
$data['datasets'][0]['data'][] = round($income, 2);
$data['datasets'][1]['data'][] = round($expense, 2);
$data['datasets'][0]['data'][] = round(($income / $count), 2);
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries)
{
// language:
$format = trans('config.month');
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized($format);
$data['datasets'][0]['data'][] = round($entry[1], 2);
$data['datasets'][1]['data'][] = round($entry[2], 2);
}
return $data;
}
/**
* @param string $income
* @param string $expense
@@ -107,40 +135,9 @@ class ChartJsReportChartGenerator implements ReportChartGenerator
],
];
$data['datasets'][0]['data'][] = round($income, 2);
$data['datasets'][1]['data'][] = round( $expense, 2);
$data['datasets'][1]['data'][] = round($expense, 2);
$data['datasets'][0]['data'][] = round(($income / $count), 2);
$data['datasets'][1]['data'][] = round(( $expense / $count), 2);
return $data;
}
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function multiYearInOutSummarized($income, $expense, $count)
{
$data = [
'count' => 2,
'labels' => [trans('firefly.sum_of_years'), trans('firefly.average_of_years')],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
],
];
$data['datasets'][0]['data'][] = round($income, 2);
$data['datasets'][1]['data'][] = round( $expense, 2);
$data['datasets'][0]['data'][] = round(($income / $count), 2);
$data['datasets'][1]['data'][] = round(( $expense / $count), 2);
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
return $data;
}

View File

@@ -12,13 +12,6 @@ use Illuminate\Support\Collection;
interface ReportChartGenerator
{
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries);
/**
* @param Collection $entries
*
@@ -33,7 +26,14 @@ interface ReportChartGenerator
*
* @return array
*/
public function yearInOutSummarized($income, $expense, $count);
public function multiYearInOutSummarized($income, $expense, $count);
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries);
/**
* @param string $income
@@ -42,6 +42,6 @@ interface ReportChartGenerator
*
* @return array
*/
public function multiYearInOutSummarized($income, $expense, $count);
public function yearInOutSummarized($income, $expense, $count);
}

View File

@@ -67,7 +67,9 @@ class AttachmentHelper implements AttachmentHelperInterface
}
}
} else {
$this->processFile($files, $model);
if (!is_null($files)) {
$this->processFile($files, $model);
}
}
return true;

View File

@@ -17,7 +17,8 @@ class Date extends BasicConverter implements ConverterInterface
{
/**
* @return Carbon
* @return static
* @throws FireflyException
*/
public function convert()
{

View File

@@ -63,7 +63,7 @@ class ReportHelper implements ReportHelperInterface
$repository = app('FireflyIII\Repositories\Category\CategoryRepositoryInterface');
$set = $repository->getCategories();
foreach ($set as $category) {
$spent = $repository->balanceInPeriodForList($category, $start, $end, $accounts);
$spent = $repository->balanceInPeriod($category, $start, $end, $accounts);
$category->spent = $spent;
$object->addCategory($category);
}
@@ -222,7 +222,7 @@ class ReportHelper implements ReportHelperInterface
// no repetition(s) for this budget:
if ($repetitions->count() == 0) {
$spent = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
$spent = $repository->balanceInPeriod($budget, $start, $end, $accounts);
$budgetLine = new BudgetLine;
$budgetLine->setBudget($budget);
$budgetLine->setOverspent($spent);
@@ -237,7 +237,7 @@ class ReportHelper implements ReportHelperInterface
$budgetLine = new BudgetLine;
$budgetLine->setBudget($budget);
$budgetLine->setRepetition($repetition);
$expenses = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
$expenses = $repository->balanceInPeriod($budget, $start, $end, $accounts);
// 200 en -100 is 100, vergeleken met 0 === 1
// 200 en -200 is 0, vergeleken met 0 === 0

View File

@@ -134,7 +134,7 @@ class ReportQuery implements ReportQueryInterface
$query->orWhere(
function (Builder $q) use ($ids) {
$q->where('transaction_types.type', TransactionType::TRANSFER);
$q->whereNotIn('ac_from.id',$ids);
$q->whereNotIn('ac_from.id', $ids);
$q->whereIn('ac_to.id', $ids);
}
);
@@ -147,7 +147,11 @@ class ReportQuery implements ReportQueryInterface
// get everything
$data = $query->get(
['transaction_journals.*', 'transaction_types.type', 'ac_from.name as name', 'ac_from.id as account_id', 'ac_from.encrypted as account_encrypted']
['transaction_journals.*',
'transaction_types.type', 'ac_from.name as name',
't_from.amount as from_amount',
't_to.amount as to_amount',
'ac_from.id as account_id', 'ac_from.encrypted as account_encrypted']
);
$data->each(
@@ -157,15 +161,6 @@ class ReportQuery implements ReportQueryInterface
}
}
);
$data = $data->filter(
function (TransactionJournal $journal) {
if ($journal->amount != 0) {
return $journal;
}
return null;
}
);
return $data;
}
@@ -220,7 +215,10 @@ class ReportQuery implements ReportQueryInterface
$query->orderBy('transaction_journals.date');
$data = $query->get( // get everything
['transaction_journals.*', 'transaction_types.type', 'ac_to.name as name', 'ac_to.id as account_id', 'ac_to.encrypted as account_encrypted']
['transaction_journals.*', 'transaction_types.type',
't_from.amount as from_amount',
't_to.amount as to_amount',
'ac_to.name as name', 'ac_to.id as account_id', 'ac_to.encrypted as account_encrypted']
);
$data->each(

View File

@@ -22,8 +22,8 @@ interface ReportQueryInterface
* and "ordinary" withdrawals. The query used is almost equal to ReportQueryInterface::journalsByRevenueAccount but it does
* not group and returns different fields.
*
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Collection

View File

@@ -38,6 +38,8 @@ class AccountController extends Controller
*/
public function create($what = 'asset')
{
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
$subTitle = trans('firefly.make_new_' . $what . '_account');
@@ -54,7 +56,8 @@ class AccountController extends Controller
}
/**
* @param Account $account
* @param AccountRepositoryInterface $repository
* @param Account $account
*
* @return \Illuminate\View\View
*/
@@ -211,13 +214,14 @@ class AccountController extends Controller
'name' => $request->input('name'),
'accountType' => $request->input('what'),
'virtualBalance' => round($request->input('virtualBalance'), 2),
'virtualBalanceCurrency' => intval($request->input('amount_currency_id_virtualBalance')),
'active' => true,
'user' => Auth::user()->id,
'iban' => $request->input('iban'),
'accountRole' => $request->input('accountRole'),
'openingBalance' => round($request->input('openingBalance'), 2),
'openingBalanceDate' => new Carbon((string)$request->input('openingBalanceDate')),
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
'openingBalanceCurrency' => intval($request->input('amount_currency_id_openingBalance')),
];

View File

@@ -90,7 +90,8 @@ class AttachmentController extends Controller
}
/**
* @param Attachment $attachment
* @param Attachment $attachment
* @param AttachmentHelperInterface $helper
*/
public function download(Attachment $attachment, AttachmentHelperInterface $helper)
{

View File

@@ -214,18 +214,25 @@ class AuthController extends Controller
/**
* @return array
*/
protected function getBlockedDomains() {
$set = Config::get('mail.blocked_domains');
protected function getBlockedDomains()
{
$set = Config::get('mail.blocked_domains');
$domains = [];
foreach($set as $entry) {
foreach ($set as $entry) {
$domain = trim($entry);
if(strlen($domain) > 0) {
if (strlen($domain) > 0) {
$domains[] = $domain;
}
}
return $domains;
}
/**
* @param $email
*
* @return bool
*/
protected function isBlockedDomain($email)
{
$parts = explode('@', $email);
@@ -234,6 +241,7 @@ class AuthController extends Controller
if (isset($parts[1]) && in_array($parts[1], $blocked)) {
return true;
}
return false;
}

View File

@@ -1,13 +1,12 @@
<?php namespace FireflyIII\Http\Controllers\Auth;
use FireflyIII\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use FireflyIII\User;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Password;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class PasswordController
*
@@ -50,6 +49,7 @@ class PasswordController extends Controller
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function postEmail(Request $request)
@@ -61,9 +61,11 @@ class PasswordController extends Controller
if (!is_null($user) && intval($user->blocked) === 1) {
$response = 'passwords.blocked';
} else {
$response = Password::sendResetLink($request->only('email'), function (Message $message) {
$response = Password::sendResetLink(
$request->only('email'), function (Message $message) {
$message->subject($this->getEmailSubject());
});
}
);
}
switch ($response) {
@@ -75,6 +77,8 @@ class PasswordController extends Controller
return redirect()->back()->withErrors(['email' => trans($response)]);
}
abort(404);
return '';
}
}

View File

@@ -132,7 +132,9 @@ class BudgetController extends Controller
}
/**
* @param BudgetRepositoryInterface $repository
* @param BudgetRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Illuminate\View\View
*/
@@ -159,7 +161,7 @@ class BudgetController extends Controller
// loop the budgets:
/** @var Budget $budget */
foreach ($budgets as $budget) {
$budget->spent = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
$budget->spent = $repository->balanceInPeriod($budget, $start, $end, $accounts);
$budget->currentRep = $repository->getCurrentRepetition($budget, $start, $end);
if ($budget->currentRep) {
$budgeted = bcadd($budgeted, $budget->currentRep->amount);

View File

@@ -146,6 +146,8 @@ class CategoryController extends Controller
* @param CategoryRepositoryInterface $repository
* @param Category $category
*
* @param $date
*
* @return \Illuminate\View\View
*/
public function showWithDate(CategoryRepositoryInterface $repository, Category $category, $date)

View File

@@ -34,61 +34,15 @@ class AccountController extends Controller
}
/**
* Shows the balances for all the user's accounts.
*
* @param AccountRepositoryInterface $repository
*
* @param $year
* @param $month
* @param bool $shared
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function all(AccountRepositoryInterface $repository, $year, $month, $shared = false)
{
$start = new Carbon($year . '-' . $month . '-01');
$end = clone $start;
$end->endOfMonth();
// chart properties for cache:
$cache = new CacheProperties();
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('all');
$cache->addProperty('accounts');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
}
/** @var Collection $accounts */
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
if ($shared === false) {
/** @var Account $account */
foreach ($accounts as $index => $account) {
if ($account->getMeta('accountRole') == 'sharedAsset') {
$accounts->forget($index);
}
}
}
// make chart:
$data = $this->generator->all($accounts, $start, $end);
$cache->store($data);
return Response::json($data);
}
/**
* Shows the balances for a given set of dates and accounts.
*
* TODO fix parameters.
* @param $report_type
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @param AccountRepositoryInterface $repository
*
* @param $url
*
* @return \Symfony\Component\HttpFoundation\Response
* @return \Illuminate\Http\JsonResponse
*/
public function report($report_type, Carbon $start, Carbon $end, Collection $accounts)
{
@@ -105,7 +59,7 @@ class AccountController extends Controller
}
// make chart:
$data = $this->generator->all($accounts, $start, $end);
$data = $this->generator->frontpage($accounts, $start, $end);
$cache->store($data);
return Response::json($data);

View File

@@ -33,7 +33,7 @@ class BillController extends Controller
}
/**
* Shows all bills and whether or not theyve been paid this month (pie chart).
* Shows all bills and whether or not they've been paid this month (pie chart).
*
* @param BillRepositoryInterface $repository
*
@@ -41,28 +41,24 @@ class BillController extends Controller
*/
public function frontpage(BillRepositoryInterface $repository)
{
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$cache = new CacheProperties(); // chart properties for cache:
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('bills');
$cache->addProperty('frontpage');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$paid = $repository->getBillsPaidInRange($start, $end); // will be a negative amount.
$unpaid = $repository->getBillsUnpaidInRange($start, $end); // will be a positive amount.
$creditCardDue = $repository->getCreditCardBill($start, $end);
if ($creditCardDue < 0) {
// expenses are negative (bill not yet paid),
$creditCardDue = bcmul($creditCardDue, '-1');
$unpaid = bcadd($unpaid, $creditCardDue);
} else {
// if more than zero, the bill has been paid: (transfer = positive).
// amount must be negative to be added to $paid:
$paid = bcadd($paid, $creditCardDue);
}
$set = $repository->getBillsForChart($start, $end);
// optionally expand this set with credit card data
$set = $repository->getCreditCardInfoForChart($set, $start, $end);
$paid = $set->get('paid');
$unpaid = $set->get('unpaid');
// build chart:
$data = $this->generator->frontpage($paid, $unpaid);
$cache->store($data);
return Response::json($data);
}

View File

@@ -43,6 +43,8 @@ class BudgetController extends Controller
* @param Carbon $end
* @param Collection $accounts
* @param Collection $budgets
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(BudgetRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $budgets)
{
@@ -86,7 +88,7 @@ class BudgetController extends Controller
$budgeted = 0;
} else {
$name = $budget->name;
$sum = $repository->balanceInPeriodForList($budget, $currentStart, $currentEnd, $accounts);
$sum = $repository->balanceInPeriod($budget, $currentStart, $currentEnd, $accounts);
$budgeted = $repository->getBudgetLimitRepetitions($budget, $currentStart, $currentEnd)->sum('amount');
}
@@ -110,8 +112,9 @@ class BudgetController extends Controller
}
/**
* @param BudgetRepositoryInterface $repository
* @param Budget $budget
* @param BudgetRepositoryInterface $repository
* @param AccountRepositoryInterface $accountRepository
* @param Budget $budget
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@@ -144,7 +147,7 @@ class BudgetController extends Controller
$end->subDay();
$chartDate = clone $end;
$chartDate->startOfMonth();
$spent = $repository->balanceInPeriodForList($budget, $first, $end, $accounts) * -1;
$spent = $repository->balanceInPeriod($budget, $first, $end, $accounts) * -1;
$entries->push([$chartDate, $spent]);
$first = Navigation::addPeriod($first, $range, 0);
}
@@ -205,17 +208,16 @@ class BudgetController extends Controller
/**
* Shows a budget list with spent/left/overspent.
*
* @param BudgetRepositoryInterface $repository
* @param BudgetRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function frontpage(BudgetRepositoryInterface $repository, AccountRepositoryInterface $accountRepository)
{
$budgets = $repository->getBudgets();
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$allEntries = new Collection;
$accounts = $accountRepository->getAccounts(['Default account', 'Asset account', 'Cash account']);
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
// chart properties for cache:
$cache = new CacheProperties();
@@ -227,52 +229,57 @@ class BudgetController extends Controller
return Response::json($cache->get()); // @codeCoverageIgnore
}
$budgets = $repository->getBudgetsAndLimitsInRange($start, $end);
$allEntries = new Collection;
$accounts = $accountRepository->getAccounts(['Default account', 'Asset account', 'Cash account']);
bcscale(2);
/** @var Budget $budget */
foreach ($budgets as $budget) {
$repetitions = $repository->getBudgetLimitRepetitions($budget, $start, $end);
if ($repetitions->count() == 0) {
$expenses = $repository->balanceInPeriodForList($budget, $start, $end, $accounts) * -1;
$allEntries->push([$budget->name, 0, 0, $expenses, 0, 0]);
continue;
// we already have amount, startdate and enddate.
// if this "is" a limit repetition (as opposed to a budget without one entirely)
// depends on whether startdate and enddate are null.
$name = $budget->name;
if (is_null($budget->startdate) && is_null($budget->enddate)) {
$currentStart = clone $start;
$currentEnd = clone $end;
$expenses = $repository->balanceInPeriod($budget, $currentStart, $currentEnd, $accounts);
$amount = 0;
$left = 0;
$spent = $expenses;
$overspent = 0;
} else {
$currentStart = clone $budget->startdate;
$currentEnd = clone $budget->enddate;
$expenses = $repository->balanceInPeriod($budget, $currentStart, $currentEnd, $accounts);
$amount = $budget->amount;
// smaller than 1 means spent MORE than budget allows.
$left = bccomp(bcadd($budget->amount, $expenses), '0') < 1 ? 0 : bcadd($budget->amount, $expenses);
$spent = bccomp(bcadd($budget->amount, $expenses), '0') < 1 ? ($amount * -1) : $expenses;
$overspent = bccomp(bcadd($budget->amount, $expenses), '0') < 1 ? bcadd($budget->amount, $expenses) : 0;
}
/** @var LimitRepetition $repetition */
foreach ($repetitions as $repetition) {
$expenses = $repository->balanceInPeriodForList($budget, $repetition->startdate, $repetition->enddate, $accounts) * -1;
// $left can be less than zero.
// $overspent can be more than zero ( = overspending)
$left = max(bcsub($repetition->amount, $expenses), 0); // limited at zero.
$overspent = max(bcsub($expenses, $repetition->amount), 0); // limited at zero.
$name = $budget->name;
// $spent is maxed to the repetition amount:
$spent = $expenses > $repetition->amount ? $repetition->amount : $expenses;
$allEntries->push([$name, $left, $spent, $overspent, $repetition->amount, $expenses]);
}
$allEntries->push([$name, $left, $spent, $overspent, $amount, $expenses]);
}
$noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end) * -1;
$noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end);
$allEntries->push([trans('firefly.noBudget'), 0, 0, $noBudgetExpenses, 0, 0]);
$data = $this->generator->frontpage($allEntries);
$cache->store($data);
return Response::json($data);
}
/**
* Show a yearly overview for a budget.
*
* @param BudgetRepositoryInterface $repository
* @param $year
* @param bool $shared
* @param $report_type
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Symfony\Component\HttpFoundation\Response
* @return \Illuminate\Http\JsonResponse
*/
public function year(BudgetRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
{
@@ -283,16 +290,17 @@ class BudgetController extends Controller
$cache = new CacheProperties();
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($accounts);
$cache->addProperty('budget');
$cache->addProperty('year');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
}
// filter empty budgets:
// filter empty budgets:
foreach ($allBudgets as $budget) {
$spent = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
$spent = $repository->balanceInPeriod($budget, $start, $end, $accounts);
if ($spent != 0) {
$budgets->push($budget);
}
@@ -308,14 +316,14 @@ class BudgetController extends Controller
// each budget, fill the row:
foreach ($budgets as $budget) {
$spent = $repository->balanceInPeriodForList($budget, $start, $month, $accounts);
$spent = $repository->balanceInPeriod($budget, $start, $month, $accounts);
$row[] = $spent * -1;
}
$entries->push($row);
$start->endOfMonth()->addDay();
}
$data = $this->generator->year($allBudgets, $entries);
$data = $this->generator->year($budgets, $entries);
$cache->store($data);
return Response::json($data);

View File

@@ -135,6 +135,8 @@ class CategoryController extends Controller
* @param Carbon $end
* @param Collection $accounts
* @param Collection $categories
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $categories)
{
@@ -248,6 +250,8 @@ class CategoryController extends Controller
* @param CategoryRepositoryInterface $repository
* @param Category $category
*
* @param $date
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function specificPeriod(CategoryRepositoryInterface $repository, Category $category, $date)
@@ -288,7 +292,8 @@ class CategoryController extends Controller
}
/**
* This chart will only show expenses.
* Returns a chart of what has been earned in this period in each category
* grouped by month.
*
* @param CategoryRepositoryInterface $repository
* @param $report_type
@@ -298,40 +303,83 @@ class CategoryController extends Controller
*
* @return \Illuminate\Http\JsonResponse
*/
public function spentInYear(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function earnedInPeriod(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
{
$cache = new CacheProperties; // chart properties for cache:
$original = clone $start;
$cache = new CacheProperties; // chart properties for cache:
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($accounts);
$cache->addProperty('category');
$cache->addProperty('spent-in-year');
$cache->addProperty('earned-in-period');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
}
$categories = new Collection;
$sets = new Collection;
$entries = new Collection;
$allCategories = $repository->getCategories();
$entries = new Collection;
$categories = $allCategories->filter(
function (Category $category) use ($repository, $start, $end, $accounts) {
$spent = $repository->balanceInPeriodForList($category, $start, $end, $accounts);
if ($spent < 0) {
return $category;
}
return null;
// run a very special query each month:
$start = clone $original;
while ($start < $end) {
$currentEnd = clone $start;
$currentStart = clone $start;
$currentStart->startOfMonth();
$currentEnd->endOfMonth();
// get a list of categories, and what the user has earned for that category
// (if the user has earned anything)
$set = $repository->earnedForAccounts($accounts, $currentStart, $currentEnd);
$categories = $categories->merge($set);
// save the set combined with the data that is in it:
// for example:
// december 2015, salary:1000, bonus:200
$sets->push([$currentStart, $set]);
$start->addMonth();
}
// filter categories into a single bunch. Useful later on.
// $categories contains all the categories the user has earned money
// in in this period.
$categories = $categories->unique('id');
$categories = $categories->sortBy(
function (Category $category) {
return $category->name;
}
);
// start looping the time again, this time processing the
// data for each month.
$start = clone $original;
while ($start < $end) {
$month = clone $start; // month is the current end of the period
$month->endOfMonth();
$row = [clone $start]; // make a row:
$currentEnd = clone $start;
$currentStart = clone $start;
$currentStart->startOfMonth();
$currentEnd->endOfMonth();
foreach ($categories as $category) { // each budget, fill the row
$spent = $repository->balanceInPeriodForList($category, $start, $month, $accounts);
if ($spent < 0) {
$row[] = $spent * -1;
// in $sets we have saved all the sets of data for each month
// so now we need to retrieve the corrent one.
// match is on date of course.
$currentSet = $sets->first(
function ($key, $value) use ($currentStart) {
// set for this date.
return ($value[0] == $currentStart);
}
);
// create a row used later on.
$row = [clone $currentStart];
// loop all categories:
/** @var Category $category */
foreach ($categories as $category) {
// if entry is not null, we've earned money in this period for this category.
$entry = $currentSet[1]->first(
function ($key, $value) use ($category) {
return $value->id == $category->id;
}
);
// save amount
if (!is_null($entry)) {
$row[] = $entry->earned;
} else {
$row[] = 0;
}
@@ -339,14 +387,17 @@ class CategoryController extends Controller
$entries->push($row);
$start->addMonth();
}
$data = $this->generator->spentInYear($categories, $entries);
$data = $this->generator->earnedInPeriod($categories, $entries);
$cache->store($data);
return Response::json($data);
return $data;
}
/**
* This chart will only show income.
* Returns a chart of what has been spent in this period in each category
* grouped by month.
*
* @param CategoryRepositoryInterface $repository
* @param $report_type
@@ -356,49 +407,79 @@ class CategoryController extends Controller
*
* @return \Illuminate\Http\JsonResponse
*/
public function earnedInYear(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function spentInPeriod(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
{
$cache = new CacheProperties; // chart properties for cache:
$original = clone $start;
$cache = new CacheProperties; // chart properties for cache:
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($accounts);
$cache->addProperty('category');
$cache->addProperty('earned-in-year');
$cache->addProperty('spent-in-period');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
}
$categories = new Collection;
$sets = new Collection;
$entries = new Collection;
$allCategories = $repository->getCategories();
$allEntries = new Collection;
$categories = $allCategories->filter(
function (Category $category) use ($repository, $start, $end, $accounts) {
$spent = $repository->balanceInPeriodForList($category, $start, $end, $accounts);
if ($spent > 0) {
return $category;
}
return null;
// run a very special query each month:
$start = clone $original;
while ($start < $end) {
$currentEnd = clone $start;
$currentStart = clone $start;
$currentStart->startOfMonth();
$currentEnd->endOfMonth();
$set = $repository->spentForAccounts($accounts, $currentStart, $currentEnd);
$categories = $categories->merge($set);
$sets->push([$currentStart, $set]);
$start->addMonth();
}
$categories = $categories->unique('id');
$categories = $categories->sortBy(
function (Category $category) {
return $category->name;
}
);
$start = clone $original;
while ($start < $end) {
$month = clone $start; // month is the current end of the period
$month->endOfMonth();
$row = [clone $start]; // make a row:
$currentEnd = clone $start;
$currentStart = clone $start;
$currentStart->startOfMonth();
$currentEnd->endOfMonth();
$currentSet = $sets->first(
function ($key, $value) use ($currentStart) {
// set for this date.
return ($value[0] == $currentStart);
}
);
$row = [clone $currentStart];
foreach ($categories as $category) { // each budget, fill the row
$spent = $repository->balanceInPeriodForList($category, $start, $month, $accounts);
if ($spent > 0) {
$row[] = $spent;
/** @var Category $category */
foreach ($categories as $category) {
/** @var Category $entry */
$entry = $currentSet[1]->first(
function ($key, $value) use ($category) {
return $value->id == $category->id;
}
);
if (!is_null($entry)) {
$row[] = $entry->spent;
} else {
$row[] = 0;
}
}
$allEntries->push($row);
$entries->push($row);
$start->addMonth();
}
$data = $this->generator->earnedInYear($categories, $allEntries);
$data = $this->generator->spentInPeriod($categories, $entries);
$cache->store($data);
return Response::json($data);
return $data;
}
}

View File

@@ -1,7 +1,6 @@
<?php namespace FireflyIII\Http\Controllers;
use Auth;
use Config;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
@@ -34,14 +33,15 @@ abstract class Controller extends BaseController
View::share('hideTags', false);
if (Auth::check()) {
$pref = Preferences::get('language', 'en');
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'));
$lang = $pref->data;
$this->monthFormat = Config::get('firefly.month.' . $lang);
$this->monthAndDayFormat = Config::get('firefly.monthAndDay.' . $lang);
$this->monthFormat = trans('config.month');
$this->monthAndDayFormat = trans('config.month_and_day');
View::share('monthFormat', $this->monthFormat);
View::share('monthAndDayFormat', $this->monthAndDayFormat);
View::share('language', $lang);
View::share('localeconv', localeconv());
}
}
}

View File

@@ -146,6 +146,8 @@ class CsvController extends Controller
*
* STEP ONE
*
* @param AccountRepositoryInterface $repository
*
* @return \Illuminate\View\View
*/
public function index(AccountRepositoryInterface $repository)

View File

@@ -147,7 +147,7 @@ class CurrencyController extends Controller
public function index(CurrencyRepositoryInterface $repository)
{
$currencies = $repository->get();
$defaultCurrency = $repository->getCurrencyByPreference(Preferences::get('currencyPreference', env('DEFAULT_CURRENCY','EUR')));
$defaultCurrency = $repository->getCurrencyByPreference(Preferences::get('currencyPreference', env('DEFAULT_CURRENCY', 'EUR')));
if (!Auth::user()->hasRole('owner')) {

View File

@@ -1,15 +1,12 @@
<?php namespace FireflyIII\Http\Controllers;
use Artisan;
use Auth;
use Carbon\Carbon;
use Config;
use FireflyIII\Models\Tag;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Input;
use Log;
use Preferences;
use Route;
use Session;
use Steam;
@@ -120,33 +117,4 @@ class HomeController extends Controller
);
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Http\RedirectResponse|string
*/
public function routes()
{
if (!Auth::user()->hasRole('owner')) {
Session::flash('warning', 'This page is broken.');
return redirect(route('index'));
}
Log::debug('Make log.');
// get all routes:
$routeCollection = Route::getRoutes();
/** @var \Illuminate\Routing\Route $value */
foreach ($routeCollection as $value) {
$name = $value->getName();
$methods = $value->getMethods();
$isPost = in_array('POST', $methods);
$index = str_replace('.', '-', $name);
if (strlen($name) > 0 && !$isPost) {
echo "'" . $index . "' => '" . $name . "',<br />";
}
}
return '&nbsp;';
}
}

View File

@@ -3,19 +3,15 @@
use Amount;
use Carbon\Carbon;
use FireflyIII\Helpers\Report\ReportQueryInterface;
use FireflyIII\Models\Account;
use FireflyIII\Models\Bill;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
use Preferences;
use Response;
use Session;
use Steam;
/**
* Class JsonController
@@ -66,115 +62,58 @@ class JsonController extends Controller
/**
* @param BillRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function boxBillsPaid(BillRepositoryInterface $repository, AccountRepositoryInterface $accountRepository)
public function boxBillsPaid(BillRepositoryInterface $repository)
{
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$amount = 0;
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
bcscale(2);
// works for json too!
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('box-bills-paid');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
/*
* Since both this method and the chart use the exact same data, we can suffice
* with calling the one method in the bill repository that will get this amount.
*/
$amount = $repository->getBillsPaidInRange($start, $end); // will be a negative amount.
$creditCardDue = $repository->getCreditCardBill($start, $end);
if ($creditCardDue >= 0) {
$amount = bcadd($amount, $creditCardDue);
}
$bills = $repository->getActiveBills(); // these two functions are the same as the chart
$amount = $amount * -1;
/** @var Bill $bill */
foreach ($bills as $bill) {
$amount = bcadd($amount, $repository->billPaymentsInRange($bill, $start, $end));
}
unset($bill, $bills);
$amount = $amount * -1; // make the amount positive again.
$creditCards = $accountRepository->getCreditCards(); // Find credit card accounts and possibly unpaid credit card bills.
/** @var Account $creditCard */
foreach ($creditCards as $creditCard) {
$balance = Steam::balance($creditCard, $end, true); // if the balance is not zero, the monthly payment is still underway.
if ($balance == 0) {
// find a transfer TO the credit card which should account for
// anything paid. If not, the CC is not yet used.
$amount = bcadd($amount, $accountRepository->getTransfersInRange($creditCard, $start, $end)->sum('amount'));
}
}
$data = ['box' => 'bills-paid', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
$cache->store($data);
return Response::json($data);
}
/**
* @param BillRepositoryInterface $repository
* @param AccountRepositoryInterface $accountRepository
* @param BillRepositoryInterface $repository
*
* @return \Symfony\Component\HttpFoundation\Response
* @return \Illuminate\Http\JsonResponse
*/
public function boxBillsUnpaid(BillRepositoryInterface $repository, AccountRepositoryInterface $accountRepository)
public function boxBillsUnpaid(BillRepositoryInterface $repository)
{
$amount = 0;
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
bcscale(2);
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$amount = $repository->getBillsUnpaidInRange($start, $end); // will be a positive amount.
$creditCardDue = $repository->getCreditCardBill($start, $end);
// works for json too!
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('box-bills-unpaid');
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore
}
$bills = $repository->getActiveBills();
$unpaid = new Collection; // bills
/** @var Bill $bill */
foreach ($bills as $bill) {
$ranges = $repository->getRanges($bill, $start, $end);
foreach ($ranges as $range) {
$journals = $repository->getJournalsInRange($bill, $range['start'], $range['end']);
if ($journals->count() == 0) {
$unpaid->push([$bill, $range['start']]);
}
}
}
unset($bill, $bills, $range, $ranges);
$creditCards = $accountRepository->getCreditCards();
foreach ($creditCards as $creditCard) {
$balance = Steam::balance($creditCard, $end, true);
$date = new Carbon($creditCard->getMeta('ccMonthlyPaymentDate'));
if ($balance < 0) {
// unpaid! create a fake bill that matches the amount.
$description = $creditCard->name;
$fakeAmount = $balance * -1;
$fakeBill = $repository->createFakeBill($description, $date, $fakeAmount);
$unpaid->push([$fakeBill, $date]);
}
}
/** @var Bill $entry */
foreach ($unpaid as $entry) {
$current = bcdiv(bcadd($entry[0]->amount_max, $entry[0]->amount_min), 2);
$amount = bcadd($amount, $current);
if ($creditCardDue < 0) {
// expenses are negative (bill not yet paid),
$creditCardDue = bcmul($creditCardDue, '-1');
$amount = bcadd($amount, $creditCardDue);
}
$data = ['box' => 'bills-unpaid', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
$cache->store($data);
return Response::json($data);
}
/**
* @param ReportQueryInterface $reportQuery
* @param ReportQueryInterface $reportQuery
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@@ -192,7 +131,7 @@ class JsonController extends Controller
return Response::json($cache->get()); // @codeCoverageIgnore
}
$accounts = $accountRepository->getAccounts(['Default account', 'Asset account', 'Cash account']);
$amount = $reportQuery->incomeInPeriod($start, $end, $accounts)->sum('amount');
$amount = $reportQuery->incomeInPeriod($start, $end, $accounts)->sum('to_amount');
$data = ['box' => 'in', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
$cache->store($data);
@@ -201,7 +140,9 @@ class JsonController extends Controller
}
/**
* @param ReportQueryInterface $reportQuery
* @param ReportQueryInterface $reportQuery
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@@ -221,8 +162,7 @@ class JsonController extends Controller
return Response::json($cache->get()); // @codeCoverageIgnore
}
$amount = $reportQuery->expenseInPeriod($start, $end, $accounts)->sum('amount');
$amount = $amount * -1;
$amount = $reportQuery->expenseInPeriod($start, $end, $accounts)->sum('to_amount');
$data = ['box' => 'out', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
$cache->store($data);
@@ -244,7 +184,6 @@ class JsonController extends Controller
foreach ($list as $entry) {
$return[] = $entry->name;
}
sort($return);
return Response::json($return);
}

View File

@@ -49,7 +49,6 @@ class NewUserController extends Controller
*/
public function submit(NewUserFormRequest $request, AccountRepositoryInterface $repository)
{
// create normal asset account:
$assetAccount = [
'name' => $request->get('bank_name'),
@@ -61,7 +60,7 @@ class NewUserController extends Controller
'accountRole' => 'defaultAsset',
'openingBalance' => round($request->input('bank_balance'), 2),
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
'openingBalanceCurrency' => intval($request->input('amount_currency_id_bank_balance')),
];
$repository->store($assetAccount);
@@ -78,7 +77,7 @@ class NewUserController extends Controller
'accountRole' => 'savingAsset',
'openingBalance' => round($request->input('savings_balance'), 2),
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
'openingBalanceCurrency' => intval($request->input('amount_currency_id_savings_balance')),
];
$repository->store($savingsAccount);
}
@@ -96,7 +95,7 @@ class NewUserController extends Controller
'accountRole' => 'ccAsset',
'openingBalance' => null,
'openingBalanceDate' => null,
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
'openingBalanceCurrency' => intval($request->input('amount_currency_id_credit_card_limit')),
];
$creditCard = $repository->store($creditAccount);

View File

@@ -37,10 +37,12 @@ class PreferencesController extends Controller
$viewRange = $viewRangePref->data;
$frontPageAccounts = Preferences::get('frontPageAccounts', []);
$budgetMax = Preferences::get('budgetMaximum', 1000);
$language = Preferences::get('language', 'en')->data;
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
$budgetMaximum = $budgetMax->data;
return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange'));
$showIncomplete = env('SHOW_INCOMPLETE_TRANSLATIONS', 'false') == 'true';
return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange', 'showIncomplete'));
}
/**
@@ -70,7 +72,7 @@ class PreferencesController extends Controller
// language:
$lang = Input::get('language');
if (in_array($lang, array_keys(Config::get('firefly.lang')))) {
if (in_array($lang, array_keys(Config::get('firefly.languages')))) {
Preferences::set('language', $lang);
}

View File

@@ -42,21 +42,34 @@ class ReportController extends Controller
*/
public function index(AccountRepositoryInterface $repository)
{
$start = Session::get('first');
$months = $this->helper->listOfMonths($start);
$start = Session::get('first');
$months = $this->helper->listOfMonths($start);
$startOfMonth = clone Session::get('start');
$endOfMonth = clone Session::get('start');
$startOfYear = clone Session::get('start');
$endOfYear = clone Session::get('start');
$startOfMonth->startOfMonth();
$endOfMonth->endOfMonth();
$startOfYear->startOfYear();
$endOfYear->endOfYear();
// does the user have shared accounts?
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
// get id's for quick links:
$accountIds = [];
/** @var Account $account */
foreach($accounts as $account) {
foreach ($accounts as $account) {
$accountIds [] = $account->id;
}
$accountList = join(',',$accountIds);
$accountList = join(',', $accountIds);
return view('reports.index', compact('months', 'accounts', 'start','accountList'));
return view(
'reports.index', compact(
'months', 'accounts', 'start', 'accountList',
'startOfMonth', 'endOfMonth', 'startOfYear', 'endOfYear'
)
);
}
/**
@@ -144,6 +157,14 @@ class ReportController extends Controller
);
}
/**
* @param $report_type
* @param $start
* @param $end
* @param $accounts
*
* @return View
*/
public function defaultMultiYear($report_type, $start, $end, $accounts)
{
@@ -194,7 +215,7 @@ class ReportController extends Controller
'firefly.report_default',
[
'start' => $start->formatLocalized($this->monthFormat),
'end' => $end->formatLocalized($this->monthFormat)
'end' => $end->formatLocalized($this->monthFormat),
]
)
);
@@ -202,7 +223,6 @@ class ReportController extends Controller
// more than one year date difference means year report.
if ($start->diffInMonths($end) > 12) {
// return view('error')->with('message', 'No report yet for this time period.');
return $this->defaultMultiYear($report_type, $start, $end, $accounts);
}
// more than two months date difference means year report.
@@ -211,7 +231,6 @@ class ReportController extends Controller
}
return $this->defaultMonth($report_type, $start, $end, $accounts);
break;
}

View File

@@ -10,11 +10,13 @@ use FireflyIII\Events\JournalSaved;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Requests\JournalFormRequest;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Support\Collection;
use Input;
use Preferences;
use Response;
@@ -48,7 +50,7 @@ class TransactionController extends Controller
*/
public function create(AccountRepositoryInterface $repository, $what = TransactionType::DEPOSIT)
{
$what = strtolower($what);
$what = strtolower($what);
$maxFileSize = Steam::phpBytes(ini_get('upload_max_filesize'));
$maxPostSize = Steam::phpBytes(ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize);
@@ -264,6 +266,15 @@ class TransactionController extends Controller
*/
public function show(JournalRepositoryInterface $repository, TransactionJournal $journal)
{
/** @var Collection $set */
$events = $journal->piggyBankEvents()->get();
$events->each(
function (PiggyBankEvent $event) {
$event->piggyBank = $event->piggyBank()->withTrashed()->first();
}
);
bcscale(2);
$journal->transactions->each(
function (Transaction $t) use ($journal, $repository) {
@@ -274,13 +285,15 @@ class TransactionController extends Controller
$what = strtolower($journal->getTransactionType());
$subTitle = trans('firefly.' . $journal->getTransactionType()) . ' "' . e($journal->description) . '"';
return view('transactions.show', compact('journal', 'subTitle', 'what'));
return view('transactions.show', compact('journal','events', 'subTitle', 'what'));
}
/**
* @param JournalFormRequest $request
* @param JournalRepositoryInterface $repository
*
* @param AttachmentHelperInterface $att
*
* @return \Illuminate\Http\RedirectResponse
*/
public function store(JournalFormRequest $request, JournalRepositoryInterface $repository, AttachmentHelperInterface $att)

View File

@@ -1,13 +1,14 @@
<?php namespace FireflyIII\Http\Middleware;
use App;
use Auth;
use Carbon\Carbon;
use Closure;
use Config;
use FireflyIII\User;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;
use Preferences;
use Auth;
/**
* Class Authenticate
*
@@ -45,6 +46,7 @@ class Authenticate
*/
public function handle(Request $request, Closure $next)
{
if ($this->auth->guest()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
@@ -53,18 +55,21 @@ class Authenticate
}
}
if (intval($this->auth->user()->blocked) == 1) {
if ($this->auth->user() instanceof User && intval($this->auth->user()->blocked) == 1) {
Auth::logout();
return redirect()->route('index');
}
// if logged in, set user language:
$pref = Preferences::get('language', 'en');
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'));
App::setLocale($pref->data);
Carbon::setLocale($pref->data);
Carbon::setLocale(substr($pref->data, 0, 2));
$locale = explode(',', trans('config.locale'));
$locale = array_map('trim', $locale);
setlocale(LC_TIME, Config::get('firefly.locales.' . $pref->data));
setlocale(LC_MONETARY, Config::get('firefly.locales.' . $pref->data));
setlocale(LC_TIME, $locale);
setlocale(LC_MONETARY, $locale);
return $next($request);
}

View File

@@ -41,18 +41,19 @@ class AccountFormRequest extends Request
}
return [
'id' => $idRule,
'name' => $nameRule,
'openingBalance' => 'numeric',
'iban' => 'iban',
'virtualBalance' => 'numeric',
'openingBalanceDate' => 'date',
'accountRole' => 'in:' . $accountRoles,
'active' => 'boolean',
'ccType' => 'in:' . $ccPaymentTypes,
'ccMonthlyPaymentDate' => 'date',
'balance_currency_id' => 'exists:transaction_currencies,id',
'what' => 'in:' . $types
'id' => $idRule,
'name' => $nameRule,
'openingBalance' => 'numeric',
'iban' => 'iban',
'virtualBalance' => 'numeric',
'openingBalanceDate' => 'date',
'accountRole' => 'in:' . $accountRoles,
'active' => 'boolean',
'ccType' => 'in:' . $ccPaymentTypes,
'ccMonthlyPaymentDate' => 'date',
'amount_currency_id_openingBalance' => 'exists:transaction_currencies,id',
'amount_currency_id_virtualBalance' => 'exists:transaction_currencies,id',
'what' => 'in:' . $types
];
}
}

View File

@@ -29,17 +29,18 @@ class BillFormRequest extends Request
public function getBillData()
{
return [
'name' => $this->get('name'),
'match' => $this->get('match'),
'amount_min' => round($this->get('amount_min'), 2),
'amount_currency_id' => round($this->get('amount_currency_id'), 2),
'amount_max' => round($this->get('amount_max'), 2),
'date' => new Carbon($this->get('date')),
'user' => Auth::user()->id,
'repeat_freq' => $this->get('repeat_freq'),
'skip' => intval($this->get('skip')),
'automatch' => intval($this->get('automatch')) === 1,
'active' => intval($this->get('active')) === 1,
'name' => $this->get('name'),
'match' => $this->get('match'),
'amount_min' => round($this->get('amount_min'), 2),
'amount_currency_id_amount_min' => intval($this->get('amount_currency_id_amount_min')),
'amount_currency_id_amount_max' => intval($this->get('amount_currency_id_amount_max')),
'amount_max' => round($this->get('amount_max'), 2),
'date' => new Carbon($this->get('date')),
'user' => Auth::user()->id,
'repeat_freq' => $this->get('repeat_freq'),
'skip' => intval($this->get('skip')),
'automatch' => intval($this->get('automatch')) === 1,
'active' => intval($this->get('active')) === 1,
];
}
@@ -56,16 +57,17 @@ class BillFormRequest extends Request
}
$rules = [
'name' => $nameRule,
'match' => $matchRule,
'amount_min' => 'required|numeric|min:0.01',
'amount_max' => 'required|numeric|min:0.01',
'amount_currency_id' => 'required|exists:transaction_currencies,id',
'date' => 'required|date',
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
'skip' => 'required|between:0,31',
'automatch' => 'in:1',
'active' => 'in:1',
'name' => $nameRule,
'match' => $matchRule,
'amount_min' => 'required|numeric|min:0.01',
'amount_max' => 'required|numeric|min:0.01',
'amount_currency_id_amount_min' => 'required|exists:transaction_currencies,id',
'amount_currency_id_amount_max' => 'required|exists:transaction_currencies,id',
'date' => 'required|date',
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
'skip' => 'required|between:0,31',
'automatch' => 'in:1',
'active' => 'in:1',
];
return $rules;

View File

@@ -31,20 +31,20 @@ class JournalFormRequest extends Request
public function getJournalData()
{
return [
'what' => $this->get('what'),
'description' => $this->get('description'),
'account_id' => intval($this->get('account_id')),
'account_from_id' => intval($this->get('account_from_id')),
'account_to_id' => intval($this->get('account_to_id')),
'expense_account' => $this->get('expense_account'),
'revenue_account' => $this->get('revenue_account'),
'amount' => round($this->get('amount'), 2),
'user' => Auth::user()->id,
'amount_currency_id' => intval($this->get('amount_currency_id')),
'date' => new Carbon($this->get('date')),
'budget_id' => intval($this->get('budget_id')),
'category' => $this->get('category'),
'tags' => explode(',', $this->get('tags')),
'what' => $this->get('what'),
'description' => $this->get('description'),
'account_id' => intval($this->get('account_id')),
'account_from_id' => intval($this->get('account_from_id')),
'account_to_id' => intval($this->get('account_to_id')),
'expense_account' => $this->get('expense_account'),
'revenue_account' => $this->get('revenue_account'),
'amount' => round($this->get('amount'), 2),
'user' => Auth::user()->id,
'amount_currency_id_amount' => intval($this->get('amount_currency_id_amount')),
'date' => new Carbon($this->get('date')),
'budget_id' => intval($this->get('budget_id')),
'category' => $this->get('category'),
'tags' => explode(',', $this->get('tags')),
];
}
@@ -57,11 +57,11 @@ class JournalFormRequest extends Request
{
$what = Input::get('what');
$rules = [
'description' => 'required|min:1,max:255',
'what' => 'required|in:withdrawal,deposit,transfer',
'amount' => 'numeric|required|min:0.01',
'date' => 'required|date',
'amount_currency_id' => 'required|exists:transaction_currencies,id',
'description' => 'required|min:1,max:255',
'what' => 'required|in:withdrawal,deposit,transfer',
'amount' => 'numeric|required|min:0.01',
'date' => 'required|date',
'amount_currency_id_amount' => 'required|exists:transaction_currencies,id',
];

View File

@@ -27,11 +27,13 @@ class NewUserFormRequest extends Request
public function rules()
{
return [
'bank_name' => 'required|between:1,200',
'bank_balance' => 'required|numeric',
'savings_balance' => 'numeric',
'credit_card_limit' => 'numeric',
'balance_currency_id' => 'exists:transaction_currencies,id',
'bank_name' => 'required|between:1,200',
'bank_balance' => 'required|numeric',
'savings_balance' => 'numeric',
'credit_card_limit' => 'numeric',
'amount_currency_id_bank_balance' => 'exists:transaction_currencies,id',
'amount_currency_id_savings_balance' => 'exists:transaction_currencies,id',
'amount_currency_id_credit_card_limit' => 'exists:transaction_currencies,id',
];
}
}

View File

@@ -36,13 +36,13 @@ class PiggyBankFormRequest extends Request
$rules = [
'name' => $nameRule,
'account_id' => 'required|belongsToUser:accounts',
'targetamount' => 'required|min:0.01',
'amount_currency_id' => 'exists:transaction_currencies,id',
'startdate' => 'date',
'targetdate' => $targetDateRule,
'order' => 'integer|min:1',
'name' => $nameRule,
'account_id' => 'required|belongsToUser:accounts',
'targetamount' => 'required|min:0.01',
'amount_currency_id_targetamount' => 'exists:transaction_currencies,id',
'startdate' => 'date',
'targetdate' => $targetDateRule,
'order' => 'integer|min:1',
];

View File

@@ -1,6 +1,6 @@
<?php
use Carbon\Carbon;
use DaveJamesMiller\Breadcrumbs\Generator;
use DaveJamesMiller\Breadcrumbs\Generator as BreadCrumbGenerator;
use FireflyIII\Models\Account;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Budget;
@@ -16,7 +16,7 @@ use FireflyIII\Models\TransactionJournal;
*/
Breadcrumbs::register(
'home',
function (Generator $breadcrumbs) {
function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
}
@@ -24,7 +24,7 @@ Breadcrumbs::register(
Breadcrumbs::register(
'index',
function (Generator $breadcrumbs) {
function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
}
@@ -33,21 +33,21 @@ Breadcrumbs::register(
// accounts
Breadcrumbs::register(
'accounts.index', function (Generator $breadcrumbs, $what) {
'accounts.index', function (BreadCrumbGenerator $breadcrumbs, $what) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what]));
}
);
Breadcrumbs::register(
'accounts.create', function (Generator $breadcrumbs, $what) {
'accounts.create', function (BreadCrumbGenerator $breadcrumbs, $what) {
$breadcrumbs->parent('accounts.index', $what);
$breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what]));
}
);
Breadcrumbs::register(
'accounts.show', function (Generator $breadcrumbs, Account $account) {
'accounts.show', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
@@ -57,7 +57,7 @@ Breadcrumbs::register(
}
);
Breadcrumbs::register(
'accounts.delete', function (Generator $breadcrumbs, Account $account) {
'accounts.delete', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
$breadcrumbs->parent('accounts.show', $account);
$breadcrumbs->push(trans('firefly.delete_account', ['name' => e($account->name)]), route('accounts.delete', [$account->id]));
}
@@ -65,7 +65,7 @@ Breadcrumbs::register(
Breadcrumbs::register(
'accounts.edit', function (Generator $breadcrumbs, Account $account) {
'accounts.edit', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
$breadcrumbs->parent('accounts.show', $account);
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
@@ -75,40 +75,40 @@ Breadcrumbs::register(
// budgets.
Breadcrumbs::register(
'budgets.index', function (Generator $breadcrumbs) {
'budgets.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.budgets'), route('budgets.index'));
}
);
Breadcrumbs::register(
'budgets.create', function (Generator $breadcrumbs) {
'budgets.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('budgets.index');
$breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create'));
}
);
Breadcrumbs::register(
'budgets.edit', function (Generator $breadcrumbs, Budget $budget) {
'budgets.edit', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.show', $budget);
$breadcrumbs->push(trans('firefly.edit_budget', ['name' => e($budget->name)]), route('budgets.edit', [$budget->id]));
}
);
Breadcrumbs::register(
'budgets.delete', function (Generator $breadcrumbs, Budget $budget) {
'budgets.delete', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.show', $budget);
$breadcrumbs->push(trans('firefly.delete_budget', ['name' => e($budget->name)]), route('budgets.delete', [$budget->id]));
}
);
Breadcrumbs::register(
'budgets.noBudget', function (Generator $breadcrumbs, $subTitle) {
'budgets.noBudget', function (BreadCrumbGenerator $breadcrumbs, $subTitle) {
$breadcrumbs->parent('budgets.index');
$breadcrumbs->push($subTitle, route('budgets.noBudget'));
}
);
Breadcrumbs::register(
'budgets.show', function (Generator $breadcrumbs, Budget $budget, LimitRepetition $repetition = null) {
'budgets.show', function (BreadCrumbGenerator $breadcrumbs, Budget $budget, LimitRepetition $repetition = null) {
$breadcrumbs->parent('budgets.index');
$breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
if (!is_null($repetition) && !is_null($repetition->id)) {
@@ -121,33 +121,33 @@ Breadcrumbs::register(
// categories
Breadcrumbs::register(
'categories.index', function (Generator $breadcrumbs) {
'categories.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.categories'), route('categories.index'));
}
);
Breadcrumbs::register(
'categories.create', function (Generator $breadcrumbs) {
'categories.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('categories.index');
$breadcrumbs->push(trans('firefly.new_category'), route('categories.create'));
}
);
Breadcrumbs::register(
'categories.edit', function (Generator $breadcrumbs, Category $category) {
'categories.edit', function (BreadCrumbGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.show', $category);
$breadcrumbs->push(trans('firefly.edit_category', ['name' => e($category->name)]), route('categories.edit', [$category->id]));
}
);
Breadcrumbs::register(
'categories.delete', function (Generator $breadcrumbs, Category $category) {
'categories.delete', function (BreadCrumbGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.show', $category);
$breadcrumbs->push(trans('firefly.delete_category', ['name' => e($category->name)]), route('categories.delete', [$category->id]));
}
);
Breadcrumbs::register(
'categories.show', function (Generator $breadcrumbs, Category $category) {
'categories.show', function (BreadCrumbGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.index');
$breadcrumbs->push(e($category->name), route('categories.show', [$category->id]));
@@ -155,7 +155,7 @@ Breadcrumbs::register(
);
Breadcrumbs::register(
'categories.show.date', function (Generator $breadcrumbs, Category $category, Carbon $date) {
'categories.show.date', function (BreadCrumbGenerator $breadcrumbs, Category $category, Carbon $date) {
// get current period preference.
$range = Preferences::get('viewRange', '1M')->data;
@@ -168,7 +168,7 @@ Breadcrumbs::register(
);
Breadcrumbs::register(
'categories.noCategory', function (Generator $breadcrumbs, $subTitle) {
'categories.noCategory', function (BreadCrumbGenerator $breadcrumbs, $subTitle) {
$breadcrumbs->parent('categories.index');
$breadcrumbs->push($subTitle, route('categories.noCategory'));
}
@@ -176,35 +176,35 @@ Breadcrumbs::register(
// CSV:
Breadcrumbs::register(
'csv.index', function (Generator $breadcrumbs) {
'csv.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.csv_index_title'), route('csv.index'));
}
);
Breadcrumbs::register(
'csv.column-roles', function (Generator $breadcrumbs) {
'csv.column-roles', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('csv.index');
$breadcrumbs->push(trans('firefly.csv_define_column_roles'), route('csv.column-roles'));
}
);
Breadcrumbs::register(
'csv.map', function (Generator $breadcrumbs) {
'csv.map', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('csv.index');
$breadcrumbs->push(trans('firefly.csv_map_values'), route('csv.map'));
}
);
Breadcrumbs::register(
'csv.download-config-page', function (Generator $breadcrumbs) {
'csv.download-config-page', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('csv.index');
$breadcrumbs->push(trans('firefly.csv_download_config'), route('csv.download-config-page'));
}
);
Breadcrumbs::register(
'csv.process', function (Generator $breadcrumbs) {
'csv.process', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('csv.index');
$breadcrumbs->push(trans('firefly.csv_process_title'), route('csv.process'));
}
@@ -213,27 +213,27 @@ Breadcrumbs::register(
// currencies.
Breadcrumbs::register(
'currency.index', function (Generator $breadcrumbs) {
'currency.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.currencies'), route('currency.index'));
}
);
Breadcrumbs::register(
'currency.create', function (Generator $breadcrumbs) {
'currency.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('currency.index');
$breadcrumbs->push(trans('firefly.create_currency'), route('currency.create'));
}
);
Breadcrumbs::register(
'currency.edit', function (Generator $breadcrumbs, TransactionCurrency $currency) {
'currency.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
$breadcrumbs->parent('currency.index');
$breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currency.edit', [$currency->id]));
}
);
Breadcrumbs::register(
'currency.delete', function (Generator $breadcrumbs, TransactionCurrency $currency) {
'currency.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
$breadcrumbs->parent('currency.index');
$breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currency.delete', [$currency->id]));
}
@@ -242,33 +242,33 @@ Breadcrumbs::register(
// piggy banks
Breadcrumbs::register(
'piggy-banks.index', function (Generator $breadcrumbs) {
'piggy-banks.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index'));
}
);
Breadcrumbs::register(
'piggy-banks.create', function (Generator $breadcrumbs) {
'piggy-banks.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('piggy-banks.index');
$breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create'));
}
);
Breadcrumbs::register(
'piggy-banks.edit', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
'piggy-banks.edit', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
$breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.edit', [$piggyBank->id]));
}
);
Breadcrumbs::register(
'piggy-banks.delete', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
'piggy-banks.delete', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
$breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => e($piggyBank->name)]), route('piggy-banks.delete', [$piggyBank->id]));
}
);
Breadcrumbs::register(
'piggy-banks.show', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
'piggy-banks.show', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.index');
$breadcrumbs->push(e($piggyBank->name), route('piggy-banks.show', [$piggyBank->id]));
@@ -277,7 +277,7 @@ Breadcrumbs::register(
// preferences
Breadcrumbs::register(
'preferences', function (Generator $breadcrumbs) {
'preferences', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences'));
@@ -286,21 +286,21 @@ Breadcrumbs::register(
// profile
Breadcrumbs::register(
'profile', function (Generator $breadcrumbs) {
'profile', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.profile'), route('profile'));
}
);
Breadcrumbs::register(
'profile.change-password', function (Generator $breadcrumbs) {
'profile.change-password', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('profile');
$breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password'));
}
);
Breadcrumbs::register(
'profile.delete-account', function (Generator $breadcrumbs) {
'profile.delete-account', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('profile');
$breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account'));
@@ -309,33 +309,33 @@ Breadcrumbs::register(
// bills
Breadcrumbs::register(
'bills.index', function (Generator $breadcrumbs) {
'bills.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index'));
}
);
Breadcrumbs::register(
'bills.create', function (Generator $breadcrumbs) {
'bills.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('bills.index');
$breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create'));
}
);
Breadcrumbs::register(
'bills.edit', function (Generator $breadcrumbs, Bill $bill) {
'bills.edit', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.show', $bill);
$breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => e($bill->name)]), route('bills.edit', [$bill->id]));
}
);
Breadcrumbs::register(
'bills.delete', function (Generator $breadcrumbs, Bill $bill) {
'bills.delete', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.show', $bill);
$breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => e($bill->name)]), route('bills.delete', [$bill->id]));
}
);
Breadcrumbs::register(
'bills.show', function (Generator $breadcrumbs, Bill $bill) {
'bills.show', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.index');
$breadcrumbs->push(e($bill->name), route('bills.show', [$bill->id]));
@@ -344,18 +344,17 @@ Breadcrumbs::register(
// reports
Breadcrumbs::register(
'reports.index', function (Generator $breadcrumbs) {
'reports.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index'));
}
);
Breadcrumbs::register(
'reports.report', function (Generator $breadcrumbs, Carbon $start, Carbon $end, $reportType, $accountIds) {
'reports.report', function (BreadCrumbGenerator $breadcrumbs, Carbon $start, Carbon $end, $reportType, $accountIds) {
$breadcrumbs->parent('reports.index');
$pref = Preferences::get('language', 'en')->data;
$monthFormat = Config::get('firefly.monthAndDay.' . $pref);
$monthFormat = trans('config.month_and_day');
$title = trans('firefly.report_default', ['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]);
$breadcrumbs->push($title, route('reports.report', ['url' => 'abcde']));
@@ -364,7 +363,7 @@ Breadcrumbs::register(
// search
Breadcrumbs::register(
'search', function (Generator $breadcrumbs, $query) {
'search', function (BreadCrumbGenerator $breadcrumbs, $query) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search'));
}
@@ -372,33 +371,33 @@ Breadcrumbs::register(
// transactions
Breadcrumbs::register(
'transactions.index', function (Generator $breadcrumbs, $what) {
'transactions.index', function (BreadCrumbGenerator $breadcrumbs, $what) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
}
);
Breadcrumbs::register(
'transactions.create', function (Generator $breadcrumbs, $what) {
'transactions.create', function (BreadCrumbGenerator $breadcrumbs, $what) {
$breadcrumbs->parent('transactions.index', $what);
$breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('transactions.create', [$what]));
}
);
Breadcrumbs::register(
'transactions.edit', function (Generator $breadcrumbs, TransactionJournal $journal) {
'transactions.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
$breadcrumbs->parent('transactions.show', $journal);
$breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.edit', [$journal->id]));
}
);
Breadcrumbs::register(
'transactions.delete', function (Generator $breadcrumbs, TransactionJournal $journal) {
'transactions.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
$breadcrumbs->parent('transactions.show', $journal);
$breadcrumbs->push(trans('breadcrumbs.delete_journal', ['description' => e($journal->description)]), route('transactions.delete', [$journal->id]));
}
);
Breadcrumbs::register(
'transactions.show', function (Generator $breadcrumbs, TransactionJournal $journal) {
'transactions.show', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
$breadcrumbs->parent('transactions.index', strtolower($journal->getTransactionType()));
$breadcrumbs->push($journal->description, route('transactions.show', [$journal->id]));
@@ -408,28 +407,28 @@ Breadcrumbs::register(
// tags
Breadcrumbs::register(
'tags.index', function (Generator $breadcrumbs) {
'tags.index', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index'));
}
);
Breadcrumbs::register(
'tags.create', function (Generator $breadcrumbs) {
'tags.create', function (BreadCrumbGenerator $breadcrumbs) {
$breadcrumbs->parent('tags.index');
$breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create'));
}
);
Breadcrumbs::register(
'tags.edit', function (Generator $breadcrumbs, Tag $tag) {
'tags.edit', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.show', $tag);
$breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => e($tag->tag)]), route('tags.edit', [$tag->id]));
}
);
Breadcrumbs::register(
'tags.delete', function (Generator $breadcrumbs, Tag $tag) {
'tags.delete', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.show', $tag);
$breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]), route('tags.delete', [$tag->id]));
}
@@ -437,7 +436,7 @@ Breadcrumbs::register(
Breadcrumbs::register(
'tags.show', function (Generator $breadcrumbs, Tag $tag) {
'tags.show', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.index');
$breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id]));
}

View File

@@ -30,7 +30,7 @@ Route::bind(
throw new NotFoundHttpException;
}
);
// account list! Yay!
// accounts
Route::bind(
'accountList',
function ($value) {
@@ -268,7 +268,7 @@ Route::get('/cron/sendgrid', ['uses' => 'CronController@sendgrid']);
Route::controllers(
[
'auth' => 'Auth\AuthController',
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]
);
@@ -284,7 +284,6 @@ Route::group(
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']);
Route::get('/flush', ['uses' => 'HomeController@flush', 'as' => 'flush']);
Route::get('/routes', ['uses' => 'HomeController@routes']);
/**
* Account Controller
*/
@@ -390,9 +389,6 @@ Route::group(
// accounts:
Route::get('/chart/account/frontpage', ['uses' => 'Chart\AccountController@frontpage']);
Route::get('/chart/account/expense', ['uses' => 'Chart\AccountController@expenseAccounts']);
Route::get('/chart/account/month/{year}/{month}/{shared?}', ['uses' => 'Chart\AccountController@all'])->where(
['year' => '[0-9]{4}', 'month' => '[0-9]{1,2}', 'shared' => 'shared']
);
Route::get('/chart/account/report/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\AccountController@report']);
Route::get('/chart/account/{account}', ['uses' => 'Chart\AccountController@single']);
@@ -415,8 +411,8 @@ Route::group(
Route::get('/chart/category/frontpage', ['uses' => 'Chart\CategoryController@frontpage']);
// these three charts are for reports:
Route::get('/chart/category/spent-in-year/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@spentInYear']);
Route::get('/chart/category/earned-in-year/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@earnedInYear']);
Route::get('/chart/category/earned-in-period/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@earnedInPeriod']);
Route::get('/chart/category/spent-in-period/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@spentInPeriod']);
Route::get(
'/chart/category/multi-year/{report_type}/{start_date}/{end_date}/{accountList}/{categoryList}', ['uses' => 'Chart\CategoryController@multiYear']
);
@@ -429,12 +425,8 @@ Route::group(
Route::get('/chart/piggyBank/{piggyBank}', ['uses' => 'Chart\PiggyBankController@history']);
// reports:
Route::get('/chart/report/in-out/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOut'])->where(
['year' => '[0-9]{4}', 'shared' => 'shared']
);
Route::get('/chart/report/in-out-sum/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized'])->where(
['year' => '[0-9]{4}', 'shared' => 'shared']
);
Route::get('/chart/report/in-out/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOut']);
Route::get('/chart/report/in-out-sum/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized']);
/**
@@ -500,12 +492,7 @@ Route::group(
* Report Controller
*/
Route::get('/reports', ['uses' => 'ReportController@index', 'as' => 'reports.index']);
// Route::post('/reports/select', ['uses' => 'ReportController@select', 'as' => 'reports.select']);
Route::get('/reports/report/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@report', 'as' => 'reports.report']);
// Route::get('/reports/{year}/{shared?}', ['uses' => 'ReportController@year', 'as' => 'reports.year'])->where(['year' => '[0-9]{4}', 'shared' => 'shared']);
// Route::get('/reports/{year}/{month}/{shared?}', ['uses' => 'ReportController@month', 'as' => 'reports.month'])->where(['year' => '[0-9]{4}', 'month' => '[0-9]{1,2}', 'shared' => 'shared']);
// pop ups for budget report:
/**
* Search Controller

View File

@@ -39,8 +39,9 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereSkip($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereNameEncrypted($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereMatchEncrypted($value)
* @property \Carbon\Carbon $nextExpectedMatch
* @property \Carbon\Carbon $lastFoundMatch
* @property \Carbon\Carbon $nextExpectedMatch
* @property \Carbon\Carbon $lastFoundMatch
* @property-read string $expectedAmount
*/
class Bill extends Model
{

View File

@@ -78,7 +78,7 @@ class Budget extends Model
*/
public function getDates()
{
return ['created_at', 'updated_at', 'deleted_at'];
return ['created_at', 'updated_at', 'deleted_at', 'startdate', 'enddate'];
}
/**

View File

@@ -25,7 +25,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereEncrypted($value)
* @property-read float $spent
* @property \Carbon\Carbon $lastActivity
* @property \Carbon\Carbon $lastActivity
*/
class Category extends Model
{

View File

@@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\Model;
* @property integer $transaction_journal_id
* @property \Carbon\Carbon $date
* @property float $amount
* @property-read \FireflyIII\Models\PiggyBank $piggyBank
* @property \FireflyIII\Models\PiggyBank $piggyBank
* @property-read \FireflyIII\Models\TransactionJournal $transactionJournal
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\PiggyBankEvent whereId($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\PiggyBankEvent whereCreatedAt($value)

View File

@@ -68,6 +68,7 @@ use Watson\Validating\ValidatingTrait;
* @property-read int $account_id
* @property string $name
* @property-read string $symbol
* @property-read string $type
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments
* @property-read mixed $amount_positive
*/
@@ -503,6 +504,10 @@ class TransactionJournal extends Model
*/
public function isWithdrawal()
{
if (!is_null($this->type)) {
return $this->type == TransactionType::WITHDRAWAL;
}
return $this->transactionType->isWithdrawal();
}
@@ -511,6 +516,10 @@ class TransactionJournal extends Model
*/
public function isDeposit()
{
if (!is_null($this->type)) {
return $this->type == TransactionType::DEPOSIT;
}
return $this->transactionType->isDeposit();
}
@@ -519,6 +528,10 @@ class TransactionJournal extends Model
*/
public function isTransfer()
{
if (!is_null($this->type)) {
return $this->type == TransactionType::TRANSFER;
}
return $this->transactionType->isTransfer();
}
@@ -527,6 +540,10 @@ class TransactionJournal extends Model
*/
public function isOpeningBalance()
{
if (!is_null($this->type)) {
return $this->type == TransactionType::OPENING_BALANCE;
}
return $this->transactionType->isOpeningBalance();
}
}

View File

@@ -23,9 +23,9 @@ class TransactionType extends Model
{
use SoftDeletes;
const WITHDRAWAL = 'Withdrawal';
const DEPOSIT = 'Deposit';
const TRANSFER = 'Transfer';
const WITHDRAWAL = 'Withdrawal';
const DEPOSIT = 'Deposit';
const TRANSFER = 'Transfer';
const OPENING_BALANCE = 'Opening balance';
/**
@@ -36,22 +36,6 @@ class TransactionType extends Model
return ['created_at', 'updated_at', 'deleted_at'];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactionJournals()
{
return $this->hasMany('FireflyIII\Models\TransactionJournal');
}
/**
* @return bool
*/
public function isWithdrawal()
{
return $this->type === TransactionType::WITHDRAWAL;
}
/**
* @return bool
*/
@@ -60,6 +44,14 @@ class TransactionType extends Model
return $this->type === TransactionType::DEPOSIT;
}
/**
* @return bool
*/
public function isOpeningBalance()
{
return $this->type === TransactionType::OPENING_BALANCE;
}
/**
* @return bool
*/
@@ -71,8 +63,16 @@ class TransactionType extends Model
/**
* @return bool
*/
public function isOpeningBalance()
public function isWithdrawal()
{
return $this->type === TransactionType::OPENING_BALANCE;
return $this->type === TransactionType::WITHDRAWAL;
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactionJournals()
{
return $this->hasMany('FireflyIII\Models\TransactionJournal');
}
}

View File

@@ -16,7 +16,6 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Support\CacheProperties;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Query\Builder;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Log;
@@ -41,7 +40,16 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function countAccounts(array $types)
{
return Auth::user()->accounts()->accountTypeIn($types)->count();
$cache = new CacheProperties;
$cache->addProperty('user-count-accounts');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$count = Auth::user()->accounts()->accountTypeIn($types)->count();
$cache->store($count);
return $count;
}
/**
@@ -69,6 +77,14 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getAccounts(array $types)
{
$cache = new CacheProperties();
$cache->addProperty('get-accounts');
$cache->addProperty($types);
if ($cache->has()) {
return $cache->get();
}
/** @var Collection $result */
$result = Auth::user()->accounts()->with(
['accountmeta' => function (HasMany $query) {
@@ -82,25 +98,50 @@ class AccountRepository implements AccountRepositoryInterface
}
);
$cache->store($result);
return $result;
}
/**
* This method returns the users credit cards, along with some basic information about the
* balance they have on their CC. To be used in the JSON boxes on the front page that say
* how many bills there are still left to pay. The balance will be saved in field "balance".
*
* To get the balance, the field "date" is necessary.
*
* @param Carbon $date
*
* @return Collection
*/
public function getCreditCards()
public function getCreditCards(Carbon $date)
{
return Auth::user()->accounts()
$cache = new CacheProperties();
$cache->addProperty('user-credit-cards');
if ($cache->has()) {
return $cache->get();
}
$set = Auth::user()->accounts()
->hasMetaValue('accountRole', 'ccAsset')
->hasMetaValue('ccType', 'monthlyFull')
->leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->whereNull('transactions.deleted_at')
->where('transaction_journals.date', '<=', $date->format('Y-m-d'))
->groupBy('accounts.id')
->get(
[
'accounts.*',
'ccType.data as ccType',
'accountRole.data as accountRole'
'accountRole.data as accountRole',
DB::Raw('SUM(`transactions`.`amount`) AS `balance`')
]
);
$cache->store($set);
return $set;
}
/**
@@ -111,8 +152,18 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getFirstTransaction(TransactionJournal $journal, Account $account)
{
$cache = new CacheProperties();
$cache->addProperty('first-transaction');
$cache->addProperty($journal->id);
$cache->addProperty($account->id);
return $journal->transactions()->where('account_id', $account->id)->first();
if ($cache->has()) {
return $cache->get();
}
$transaction = $journal->transactions()->where('account_id', $account->id)->first();
$cache->store($transaction);
return $transaction;
}
/**
@@ -123,8 +174,7 @@ class AccountRepository implements AccountRepositoryInterface
public function getFrontpageAccounts(Preference $preference)
{
$cache = new CacheProperties();
$cache->addProperty($preference->data);
$cache->addProperty('frontPageaccounts');
$cache->addProperty('user-frontpage-accounts');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
@@ -158,6 +208,7 @@ class AccountRepository implements AccountRepositoryInterface
$cache->addProperty($account->id);
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('frontpage-transactions');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
@@ -172,6 +223,7 @@ class AccountRepository implements AccountRepositoryInterface
->before($end)
->after($start)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->take(10)
->get(['transaction_journals.*', 'transaction_currencies.symbol', 'transaction_types.type']);
@@ -227,7 +279,7 @@ class AccountRepository implements AccountRepositoryInterface
$cache = new CacheProperties;
$cache->addProperty($ids);
$cache->addProperty('piggyAccounts');
$cache->addProperty('user-piggy-bank-accounts');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
@@ -309,44 +361,6 @@ class AccountRepository implements AccountRepositoryInterface
return $accounts;
}
/**
* Get all transfers TO this account in this range.
*
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getTransfersInRange(Account $account, Carbon $start, Carbon $end)
{
$set = TransactionJournal::whereIn(
'id', function (Builder $q) use ($account, $start, $end) {
$q->select('transaction_journals.id')
->from('transactions')
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.user_id', Auth::user()->id)
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->where('transaction_types.type', TransactionType::TRANSFER);
}
)->get();
$filtered = $set->filter(
function (TransactionJournal $journal) use ($account) {
if ($journal->destination_account->id == $account->id) {
return $journal;
}
return null;
}
);
return $filtered;
}
/**
* @param Account $account
* @param Carbon $date
@@ -373,12 +387,23 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function openingBalanceTransaction(Account $account)
{
return TransactionJournal
$cache = new CacheProperties;
$cache->addProperty($account->id);
$cache->addProperty('opening-balance-journal');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$journal = TransactionJournal
::orderBy('transaction_journals.date', 'ASC')
->accountIs($account)
->transactionTypes([TransactionType::OPENING_BALANCE])
->orderBy('created_at', 'ASC')
->first(['transaction_journals.*']);
$cache->store($journal);
return $journal;
}
/**
@@ -645,6 +670,8 @@ class AccountRepository implements AccountRepositoryInterface
}
/**
* @deprecated
*
* @param $accountId
*
* @return Account

View File

@@ -27,6 +27,8 @@ interface AccountRepositoryInterface
/**
* @param $accountId
*
* @deprecated
*
* @return Account
*/
public function find($accountId);
@@ -55,9 +57,17 @@ interface AccountRepositoryInterface
public function getFirstTransaction(TransactionJournal $journal, Account $account);
/**
* This method returns the users credit cards, along with some basic information about the
* balance they have on their CC. To be used in the JSON boxes on the front page that say
* how many bills there are still left to pay. The balance will be saved in field "balance".
*
* To get the balance, the field "date" is necessary.
*
* @param Carbon $date
*
* @return Collection
*/
public function getCreditCards();
public function getCreditCards(Carbon $date);
/**
* Get the accounts of a user that have piggy banks connected to them.
@@ -66,18 +76,6 @@ interface AccountRepositoryInterface
*/
public function getPiggyBankAccounts();
/**
* Get all transfers TO this account in this range.
*
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getTransfersInRange(Account $account, Carbon $start, Carbon $end);
/**
* @param Preference $preference
*

View File

@@ -9,10 +9,14 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
use Log;
use Navigation;
use Steam;
/**
* Class BillRepository
@@ -21,52 +25,6 @@ use Steam;
*/
class BillRepository implements BillRepositoryInterface
{
/**
* Returns the sum of all payments connected to this bill between the dates.
*
* @param Bill $bill
* @param Carbon $start
* @param Carbon $end
*
* @return integer
*/
public function billPaymentsInRange(Bill $bill, Carbon $start, Carbon $end)
{
$amount = 0;
$journals = $bill->transactionjournals()->before($end)->after($start)->get();
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
$amount += $journal->amount;
}
return $amount;
}
/**
* Create a fake bill to help the chart controller.
*
* @param string $description
* @param Carbon $date
* @param float $amount
*
* @return Bill
*/
public function createFakeBill($description, Carbon $date, $amount)
{
$bill = new Bill;
$bill->name = $description;
$bill->match = $description;
$bill->amount_min = $amount;
$bill->amount_max = $amount;
$bill->date = $date;
$bill->repeat_freq = 'monthly';
$bill->skip = 0;
$bill->automatch = false;
$bill->active = false;
return $bill;
}
/**
* @param Bill $bill
@@ -78,16 +36,6 @@ class BillRepository implements BillRepositoryInterface
return $bill->delete();
}
/**
* @return Collection
*/
public function getActiveBills()
{
/** @var Collection $set */
$set = Auth::user()->bills()->orderBy('name', 'ASC')->where('active', 1)->get()->sortBy('name');
return $set;
}
/**
* @return Collection
@@ -128,7 +76,7 @@ class BillRepository implements BillRepositoryInterface
$set = $set->filter(
function (Bill $bill) use ($ids) {
// get transaction journals from or to any of the mentioned accounts.
// if zero, return null.
// when zero, return null.
$journals = $bill->transactionjournals()->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->whereIn('transactions.account_id', $ids)->count();
@@ -150,22 +98,43 @@ class BillRepository implements BillRepositoryInterface
}
/**
* This method also returns the amount of the journal in "journalAmount"
* for easy access.
*
* @param Bill $bill
*
* @return Collection
*/
public function getJournals(Bill $bill)
{
return $bill->transactionjournals()->withRelevantData()
$cache = new CacheProperties;
$cache->addProperty($bill->id);
$cache->addProperty('journals-for-bill');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$set = $bill->transactionjournals()
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('amount', '<', 0);
}
)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(['transaction_journals.*']);
->get(['transaction_journals.*', 'transactions.amount as journalAmount']);
$cache->store($set);
return $set;
}
/**
* Get all journals that were recorded on this bill between these dates.
*
* @deprecated
*
* @param Bill $bill
* @param Carbon $start
* @param Carbon $end
@@ -446,82 +415,166 @@ class BillRepository implements BillRepositoryInterface
}
/**
* Gets a collection of paid bills and a collection of unpaid bills to be used
* in the pie chart on the front page.
* Get the total amount of money paid for the users active bills in the date range given.
* This amount will be negative (they're expenses).
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
* @return string
*/
public function getBillsForChart(Carbon $start, Carbon $end)
public function getBillsPaidInRange(Carbon $start, Carbon $end)
{
$paid = new Collection;
$unpaid = new Collection;
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('bills-paid-in-range');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$amount = '0';
$bills = $this->getActiveBills();
$bills = $this->getActiveBills();
/** @var Bill $bill */
foreach ($bills as $bill) {
$ranges = $this->getRanges($bill, $start, $end);
foreach ($ranges as $range) {
// paid a bill in this range?
$journals = $this->getJournalsInRange($bill, $range['start'], $range['end']);
if ($journals->count() == 0) {
$unpaid->push([$bill, $range['start']]);
} else {
$paid = $paid->merge($journals);
}
$paid = $bill->transactionjournals()
->before($range['end'])
->after($range['start'])
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '<', 0);
}
)
->first([DB::Raw('SUM(`transactions`.`amount`) as `sum_amount`')]);
$amount = bcadd($amount, $paid->sum_amount);
}
}
$set = new Collection;
$set->put('paid', $paid);
$set->put('unpaid', $unpaid);
$cache->store($amount);
return $set;
return $amount;
}
/**
* Takes the paid/unpaid bills collection set up before and expands it using
* credit cards the user might have.
*
* @param Collection $set
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getCreditCardInfoForChart(Collection $set, Carbon $start, Carbon $end)
public function getActiveBills()
{
$accounts = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$creditCards = $accounts->getCreditCards();
$paid = $set->get('paid');
$unpaid = $set->get('unpaid');
foreach ($creditCards as $creditCard) {
$balance = Steam::balance($creditCard, $end, true);
$date = new Carbon($creditCard->getMeta('ccMonthlyPaymentDate'));
if ($balance < 0) {
// unpaid! create a fake bill that matches the amount.
$description = $creditCard->name;
$amount = $balance * -1;
$fakeBill = $this->createFakeBill($description, $date, $amount);
unset($description, $amount);
$unpaid->push([$fakeBill, $date]);
}
if ($balance == 0) {
// find transfer(s) TO the credit card which should account for
// anything paid. If not, the CC is not yet used.
$journals = $accounts->getTransfersInRange($creditCard, $start, $end);
$paid = $paid->merge($journals);
}
}
$set = new Collection;
$set->put('paid', $paid);
$set->put('unpaid', $unpaid);
/** @var Collection $set */
$set = Auth::user()->bills()
->where('active', 1)
->get(
[
'bills.*',
DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`')
]
)->sortBy('name');
return $set;
}
/**
* Get the total amount of money due for the users active bills in the date range given. This amount will be positive.
*
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function getBillsUnpaidInRange(Carbon $start, Carbon $end)
{
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('bills-unpaid-in-range');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$amount = '0';
$bills = $this->getActiveBills();
/** @var Bill $bill */
foreach ($bills as $bill) {
$ranges = $this->getRanges($bill, $start, $end);
$paidBill = '0';
foreach ($ranges as $range) {
$paid = $bill->transactionjournals()
->before($range['end'])
->after($range['start'])
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '>', 0);
}
)
->first([DB::Raw('SUM(`transactions`.`amount`) as `sum_amount`')]);
$paidBill = bcadd($paid->sum_amount, $paidBill);
}
if ($paidBill == 0) {
$amount = bcadd($amount, $bill->expectedAmount);
}
}
$cache->store($amount);
return $amount;
}
/**
* This method will tell you if you still have a CC bill to pay. Amount will be positive if the amount
* has been paid, otherwise it will be negative.
*
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function getCreditCardBill(Carbon $start, Carbon $end)
{
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('credit-card-bill');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$amount = '0';
$creditCards = $accountRepository->getCreditCards($end); // Find credit card accounts and possibly unpaid credit card bills.
/** @var Account $creditCard */
foreach ($creditCards as $creditCard) {
if ($creditCard->balance == 0) {
// find a transfer TO the credit card which should account for
// anything paid. If not, the CC is not yet used.
$set = TransactionJournal::whereIn(
'transaction_journals.id', function (Builder $q) use ($creditCard, $start, $end) {
$q->select('transaction_journals.id')
->from('transactions')
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->where('transactions.account_id', $creditCard->id)
->where('transactions.amount', '>', 0)// this makes the filter unnecessary.
->where('transaction_journals.user_id', Auth::user()->id)
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->where('transaction_types.type', TransactionType::TRANSFER);
}
)->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '>', 0);
}
)->first([DB::Raw('SUM(`transactions`.`amount`) as `sum_amount`')]);
$amount = bcadd($amount, $set->sum_amount);
} else {
$amount = bcadd($amount, $creditCard->balance);
}
}
return $amount;
}
}

View File

@@ -16,49 +16,41 @@ interface BillRepositoryInterface
{
/**
* Takes the paid/unpaid bills collection set up before and expands it using
* credit cards the user might have.
*
* @param Collection $set
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getCreditCardInfoForChart(Collection $set, Carbon $start, Carbon $end);
/**
* Gets a collection of paid bills and a collection of unpaid bills to be used
* in the pie chart on the front page.
* This method will tell you if you still have a CC bill to pay. Amount will be negative if the amount
* has been paid
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
* @return string
*/
public function getBillsForChart(Carbon $start, Carbon $end);
public function getCreditCardBill(Carbon $start, Carbon $end);
/**
* Returns the sum of all payments connected to this bill between the dates.
* Get the total amount of money paid for the users active bills in the date range given.
*
* @param Bill $bill
* @param Carbon $start
* @param Carbon $end
*
* @return float
* @return string
*/
public function billPaymentsInRange(Bill $bill, Carbon $start, Carbon $end);
public function getBillsPaidInRange(Carbon $start, Carbon $end);
/**
* Create a fake bill to help the chart controller.
* Get the total amount of money due for the users active bills in the date range given.
*
* @param string $description
* @param Carbon $date
* @param float $amount
* @param Carbon $start
* @param Carbon $end
*
* @return Bill
* @return string
*/
public function createFakeBill($description, Carbon $date, $amount);
public function getBillsUnpaidInRange(Carbon $start, Carbon $end);
/**
* @return Collection
*/
public function getActiveBills();
/**
* @param Bill $bill
@@ -67,11 +59,6 @@ interface BillRepositoryInterface
*/
public function destroy(Bill $bill);
/**
* @return Collection
*/
public function getActiveBills();
/**
* @return Collection
*/
@@ -114,7 +101,7 @@ interface BillRepositoryInterface
/**
* Every bill repeats itself weekly, monthly or yearly (or whatever). This method takes a date-range (usually the view-range of Firefly itself)
* and returns date ranges that fall within the given range; those ranges are the bills expected. When a bill is due on the 14th of the month and
* you give 1st and the 31st of that month as argument, you'll get one response, matching the range of your bill.
* you give 1st and the 31st of that month as argument, you'll get one response, matching the range of your bill (from the 14th to the 31th).
*
* @param Bill $bill
* @param Carbon $start

View File

@@ -4,17 +4,19 @@ namespace FireflyIII\Repositories\Budget;
use Auth;
use Carbon\Carbon;
use DB;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\LimitRepetition;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Shared\ComponentRepository;
use FireflyIII\Support\CacheProperties;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\Builder as QueryBuilder;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Input;
use Log;
/**
* Class BudgetRepository
@@ -77,6 +79,50 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
return $set;
}
/**
* Returns a list of budgets, budget limits and limit repetitions
* (doubling any of them in a left join)
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getBudgetsAndLimitsInRange(Carbon $start, Carbon $end)
{
/** @var Collection $set */
$set = Auth::user()
->budgets()
->leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id')
->leftJoin('limit_repetitions', 'limit_repetitions.budget_limit_id', '=', 'budget_limits.id')
->where(
function (Builder $query) use ($start, $end) {
$query->where(
function (Builder $query) use ($start, $end) {
$query->where('limit_repetitions.startdate', '>=', $start->format('Y-m-d'));
$query->where('limit_repetitions.startdate', '<=', $end->format('Y-m-d'));
}
);
$query->orWhere(
function (Builder $query) {
$query->whereNull('limit_repetitions.startdate');
$query->whereNull('limit_repetitions.enddate');
}
);
}
)
->get(['budgets.*', 'limit_repetitions.startdate', 'limit_repetitions.enddate', 'limit_repetitions.amount']);
$set = $set->sortBy(
function (Budget $budget) {
return strtolower($budget->name);
}
);
return $set;
}
/**
* @param Budget $budget
* @param Carbon $start
@@ -89,10 +135,10 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
/** @var Collection $repetitions */
return LimitRepetition::
leftJoin('budget_limits', 'limit_repetitions.budget_limit_id', '=', 'budget_limits.id')
->where('limit_repetitions.startdate', '<=', $end->format('Y-m-d 00:00:00'))
->where('limit_repetitions.startdate', '>=', $start->format('Y-m-d 00:00:00'))
->where('budget_limits.budget_id', $budget->id)
->get(['limit_repetitions.*']);
->where('limit_repetitions.startdate', '<=', $end->format('Y-m-d 00:00:00'))
->where('limit_repetitions.startdate', '>=', $start->format('Y-m-d 00:00:00'))
->where('budget_limits.budget_id', $budget->id)
->get(['limit_repetitions.*']);
}
/**
@@ -141,11 +187,9 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
return $cache->get(); // @codeCoverageIgnore
}
$data = $budget->limitrepetitions()
->where('limit_repetitions.startdate', $start->format('Y-m-d 00:00:00'))
->where('limit_repetitions.enddate', $end->format('Y-m-d 00:00:00'))
->first(['limit_repetitions.*']);
//Log::debug('Looking for limit reps for budget #' . $budget->id . ' start [' . $start . '] and end [' . $end . '].');
//Log::debug(DB::getQueryLog())
->where('limit_repetitions.startdate', $start->format('Y-m-d 00:00:00'))
->where('limit_repetitions.enddate', $end->format('Y-m-d 00:00:00'))
->first(['limit_repetitions.*']);
$cache->store($data);
return $data;
@@ -186,9 +230,9 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
/**
* Returns all the transaction journals for a limit, possibly limited by a limit repetition.
*
* @param Budget $budget
* @param Budget $budget
* @param LimitRepetition $repetition
* @param int $take
* @param int $take
*
* @return LengthAwarePaginator
*/
@@ -205,11 +249,11 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
return $cache->get(); // @codeCoverageIgnore
}
$offset = intval(Input::get('page')) > 0 ? intval(Input::get('page')) * $take : 0;
$setQuery = $budget->transactionJournals()->withRelevantData()->take($take)->offset($offset)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC');
$offset = intval(Input::get('page')) > 0 ? intval(Input::get('page')) * $take : 0;
$setQuery = $budget->transactionJournals()->withRelevantData()->take($take)->offset($offset)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC');
$countQuery = $budget->transactionJournals();
@@ -219,7 +263,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
}
$set = $setQuery->get(['transaction_journals.*']);
$set = $setQuery->get(['transaction_journals.*']);
$count = $countQuery->count();
@@ -230,6 +274,8 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
}
/**
* @deprecated
*
* @param Budget $budget
*
* @return Carbon
@@ -245,6 +291,8 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
}
/**
* @deprecated
*
* @param Budget $budget
* @param Carbon $date
*
@@ -253,9 +301,9 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
public function getLimitAmountOnDate(Budget $budget, Carbon $date)
{
$repetition = LimitRepetition::leftJoin('budget_limits', 'limit_repetitions.budget_limit_id', '=', 'budget_limits.id')
->where('limit_repetitions.startdate', $date->format('Y-m-d 00:00:00'))
->where('budget_limits.budget_id', $budget->id)
->first(['limit_repetitions.*']);
->where('limit_repetitions.startdate', $date->format('Y-m-d 00:00:00'))
->where('budget_limits.budget_id', $budget->id)
->first(['limit_repetitions.*']);
if ($repetition) {
return $repetition->amount;
@@ -273,15 +321,15 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
public function getWithoutBudget(Carbon $start, Carbon $end)
{
return Auth::user()
->transactionjournals()
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->whereNull('budget_transaction_journal.id')
->before($end)
->after($start)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(['transaction_journals.*']);
->transactionjournals()
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->whereNull('budget_transaction_journal.id')
->before($end)
->after($start)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(['transaction_journals.*']);
}
/**
@@ -292,51 +340,43 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
*/
public function getWithoutBudgetSum(Carbon $start, Carbon $end)
{
$noBudgetSet = Auth::user()
->transactionjournals()
->whereNotIn(
'transaction_journals.id', function (QueryBuilder $query) use ($start, $end) {
$query
->select('transaction_journals.id')
->from('transaction_journals')
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d 00:00:00'))
->whereNotNull('budget_transaction_journal.budget_id');
}
)
->after($start)
->before($end)
->transactionTypes([TransactionType::WITHDRAWAL])
->get(['transaction_journals.*'])->sum('amount');
$entry = Auth::user()
->transactionjournals()
->whereNotIn(
'transaction_journals.id', function (QueryBuilder $query) use ($start, $end) {
$query
->select('transaction_journals.id')
->from('transaction_journals')
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d 00:00:00'))
->whereNotNull('budget_transaction_journal.budget_id');
}
)
->after($start)
->before($end)
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '<', 0);
}
)
->transactionTypes([TransactionType::WITHDRAWAL])
->first([DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
return $noBudgetSet;
return $entry->journalAmount;
}
/**
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return string
*/
public function balanceInPeriodForList(Budget $budget, Carbon $start, Carbon $end, Collection $accounts)
public function balanceInPeriod(Budget $budget, Carbon $start, Carbon $end, Collection $accounts)
{
return $this->commonBalanceInPeriodForList($budget, $start, $end, $accounts);
}
/**
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
* @param bool $shared
*
* @return string
*/
public function balanceInPeriod(Budget $budget, Carbon $start, Carbon $end, $shared = true)
{
return $this->commonBalanceInPeriod($budget, $start, $end, $shared);
return $this->commonBalanceInPeriod($budget, $start, $end, $accounts);
}
/**
@@ -349,7 +389,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
$newBudget = new Budget(
[
'user_id' => $data['user'],
'name' => $data['name'],
'name' => $data['name'],
]
);
$newBudget->save();
@@ -360,14 +400,14 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
/**
* @param Budget $budget
* @param array $data
* @param array $data
*
* @return Budget
*/
public function update(Budget $budget, array $data)
{
// update the account:
$budget->name = $data['name'];
$budget->name = $data['name'];
$budget->active = $data['active'];
$budget->save();
@@ -391,10 +431,10 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
// if not, create one!
$limit = new BudgetLimit;
$limit->budget()->associate($budget);
$limit->startdate = $date;
$limit->amount = $amount;
$limit->startdate = $date;
$limit->amount = $amount;
$limit->repeat_freq = 'monthly';
$limit->repeats = 0;
$limit->repeats = 0;
$limit->save();
// likewise, there should be a limit repetition to match the end date

View File

@@ -63,6 +63,17 @@ interface BudgetRepositoryInterface
*/
public function getBudgets();
/**
* Returns a list of budgets, budget limits and limit repetitions
* (doubling any of them in a left join)
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getBudgetsAndLimitsInRange(Carbon $start, Carbon $end);
/**
* @param Budget $budget
* @param Carbon $start
@@ -96,6 +107,8 @@ interface BudgetRepositoryInterface
public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50);
/**
* @deprecated
*
* @param Budget $budget
*
* @return Carbon
@@ -103,6 +116,8 @@ interface BudgetRepositoryInterface
public function getLastBudgetLimitDate(Budget $budget);
/**
* @deprecated
*
* @param Budget $budget
* @param Carbon $date
*
@@ -126,19 +141,6 @@ interface BudgetRepositoryInterface
*/
public function getWithoutBudgetSum(Carbon $start, Carbon $end);
/**
*
* Same as ::spentInPeriod but corrects journals for their amount (tags).
*
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
* @param boolean $shared
*
* @return string
*/
public function balanceInPeriod(Budget $budget, Carbon $start, Carbon $end, $shared = true);
/**
*
* Same as ::spentInPeriod but corrects journals for a set of accounts
@@ -150,7 +152,7 @@ interface BudgetRepositoryInterface
*
* @return string
*/
public function balanceInPeriodForList(Budget $budget, Carbon $start, Carbon $end, Collection $accounts);
public function balanceInPeriod(Budget $budget, Carbon $start, Carbon $end, Collection $accounts);
/**
* @param array $data

View File

@@ -5,11 +5,13 @@ namespace FireflyIII\Repositories\Category;
use Auth;
use Carbon\Carbon;
use Crypt;
use DB;
use FireflyIII\Models\Category;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Shared\ComponentRepository;
use FireflyIII\Support\CacheProperties;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
/**
@@ -48,6 +50,13 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
*/
public function getCategories()
{
$cache = new CacheProperties;
$cache->addProperty('category-list');
if ($cache->has()) {
return $cache->get();
}
/** @var Collection $set */
$set = Auth::user()->categories()->orderBy('name', 'ASC')->get();
$set = $set->sortBy(
@@ -56,6 +65,8 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
}
);
$cache->store($set);
return $set;
}
@@ -242,20 +253,6 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
->get(['transaction_journals.*']);
}
/**
* @param Category $category
* @param Carbon $start
* @param Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function balanceInPeriod(Category $category, Carbon $start, Carbon $end, $shared = false)
{
return $this->commonBalanceInPeriod($category, $start, $end, $shared);
}
/**
* @param Category $category
* @param Carbon $start
@@ -264,9 +261,9 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
*
* @return string
*/
public function balanceInPeriodForList(Category $category, Carbon $start, Carbon $end, Collection $accounts)
public function balanceInPeriod(Category $category, Carbon $start, Carbon $end, Collection $accounts)
{
return $this->commonBalanceInPeriodForList($category, $start, $end, $accounts);
return $this->commonBalanceInPeriod($category, $start, $end, $accounts);
}
/**
@@ -316,6 +313,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
}
/**
* @deprecated
* This method returns the sum of the journals in the category, optionally
* limited by a start or end date.
*
@@ -348,8 +346,6 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
* @param \Carbon\Carbon $start
* @param \Carbon\Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function spentInPeriod(Category $category, Carbon $start, Carbon $end)
@@ -379,8 +375,6 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
* @param \Carbon\Carbon $start
* @param \Carbon\Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function earnedInPeriod(Category $category, Carbon $start, Carbon $end)
@@ -405,11 +399,14 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
return $sum;
}
/**
* @param Category $category
* @param int $page
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
* @return mixed
*/
public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end)
{
@@ -430,6 +427,9 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
/**
* @param Category $category
*
* @param Carbon $start
* @param Carbon $end
*
* @return int
*/
public function countJournalsInRange(Category $category, Carbon $start, Carbon $end)
@@ -478,6 +478,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
->transactionTypes([TransactionType::WITHDRAWAL])
->get(['transaction_journals.*'])
->sum('amount');
return $sum;
}
@@ -508,7 +509,102 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
->after($start)
->get(['transaction_journals.*'])
->sum('amount');
return $sum;
}
/**
* Returns a collection of Categories appended with the amount of money that has been earned
* in these categories, based on the $accounts involved, in period X.
* The amount earned in category X in period X is saved in field "earned".
*
* @param $accounts
* @param $start
* @param $end
*
* @return Collection
*/
public function earnedForAccounts(Collection $accounts, Carbon $start, Carbon $end)
{
$accountIds = [];
foreach ($accounts as $account) {
$accountIds[] = $account->id;
}
$collection = Auth::user()->categories()
->leftJoin('category_transaction_journal', 'category_transaction_journal.category_id', '=', 'categories.id')
->leftJoin('transaction_journals', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin(
'transactions AS t_src', function (JoinClause $join) {
$join->on('t_src.transaction_journal_id', '=', 'transaction_journals.id')->where('t_src.amount', '<', 0);
}
)
->leftJoin(
'transactions AS t_dest', function (JoinClause $join) {
$join->on('t_dest.transaction_journal_id', '=', 'transaction_journals.id')->where('t_dest.amount', '>', 0);
}
)
->whereIn('t_dest.account_id', $accountIds)// to these accounts (earned)
->whereNotIn('t_src.account_id', $accountIds)//-- but not from these accounts
->whereIn(
'transaction_types.type', [TransactionType::DEPOSIT, TransactionType::TRANSFER, TransactionType::OPENING_BALANCE]
)// earned from these things.
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->groupBy('categories.id')
->get(['categories.*', DB::Raw('SUM(`t_dest`.`amount`) AS `earned`')]);
return $collection;
}
/**
* Returns a collection of Categories appended with the amount of money that has been spent
* in these categories, based on the $accounts involved, in period X.
* The amount earned in category X in period X is saved in field "spent".
*
* @param $accounts
* @param $start
* @param $end
*
* @return Collection
*/
public function spentForAccounts(Collection $accounts, Carbon $start, Carbon $end)
{
$accountIds = [];
foreach ($accounts as $account) {
$accountIds[] = $account->id;
}
$collection = Auth::user()->categories()
->leftJoin('category_transaction_journal', 'category_transaction_journal.category_id', '=', 'categories.id')
->leftJoin('transaction_journals', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin(
'transactions AS t_src', function (JoinClause $join) {
$join->on('t_src.transaction_journal_id', '=', 'transaction_journals.id')->where('t_src.amount', '<', 0);
}
)
->leftJoin(
'transactions AS t_dest', function (JoinClause $join) {
$join->on('t_dest.transaction_journal_id', '=', 'transaction_journals.id')->where('t_dest.amount', '>', 0);
}
)
->whereIn('t_src.account_id', $accountIds)// from these accounts (spent)
->whereNotIn('t_dest.account_id', $accountIds)//-- but not from these accounts (spent internally)
->whereIn(
'transaction_types.type', [TransactionType::WITHDRAWAL, TransactionType::TRANSFER, TransactionType::OPENING_BALANCE]
)// spent on these things.
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->groupBy('categories.id')
->get(['categories.*', DB::Raw('SUM(`t_dest`.`amount`) AS `spent`')]);
return $collection;
}
}

View File

@@ -23,6 +23,9 @@ interface CategoryRepositoryInterface
/**
* @param Category $category
*
* @param Carbon $start
* @param Carbon $end
*
* @return int
*/
public function countJournalsInRange(Category $category, Carbon $start, Carbon $end);
@@ -34,6 +37,32 @@ interface CategoryRepositoryInterface
*/
public function destroy(Category $category);
/**
* Returns a collection of Categories appended with the amount of money that has been earned
* in these categories, based on the $accounts involved, in period X.
* The amount earned in category X in period X is saved in field "earned".
*
* @param $accounts
* @param $start
* @param $end
*
* @return Collection
*/
public function earnedForAccounts(Collection $accounts, Carbon $start, Carbon $end);
/**
* Returns a collection of Categories appended with the amount of money that has been spent
* in these categories, based on the $accounts involved, in period X.
* The amount earned in category X in period X is saved in field "spent".
*
* @param $accounts
* @param $start
* @param $end
*
* @return Collection
*/
public function spentForAccounts(Collection $accounts, Carbon $start, Carbon $end);
/**
* @return Collection
*/
@@ -115,11 +144,15 @@ interface CategoryRepositoryInterface
* @param Category $category
* @param int $page
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end);
/**
* @deprecated
* This method returns the sum of the journals in the category, optionally
* limited by a start or end date.
*
@@ -147,21 +180,7 @@ interface CategoryRepositoryInterface
public function getWithoutCategory(Carbon $start, Carbon $end);
/**
* Corrected for tags.
*
* @param Category $category
* @param \Carbon\Carbon $start
* @param \Carbon\Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function balanceInPeriod(Category $category, Carbon $start, Carbon $end, $shared = false);
/**
* Corrected for tags.
* Corrected for tags and list of accounts.
*
* @param Category $category
* @param \Carbon\Carbon $start
@@ -170,15 +189,13 @@ interface CategoryRepositoryInterface
*
* @return string
*/
public function balanceInPeriodForList(Category $category, Carbon $start, Carbon $end, Collection $accounts);
public function balanceInPeriod(Category $category, Carbon $start, Carbon $end, Collection $accounts);
/**
* @param Category $category
* @param \Carbon\Carbon $start
* @param \Carbon\Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function spentInPeriod(Category $category, Carbon $start, Carbon $end);
@@ -188,8 +205,6 @@ interface CategoryRepositoryInterface
* @param \Carbon\Carbon $start
* @param \Carbon\Carbon $end
*
* @param bool $shared
*
* @return string
*/
public function earnedInPeriod(Category $category, Carbon $start, Carbon $end);

View File

@@ -13,6 +13,7 @@ use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Support\CacheProperties;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Log;
@@ -44,7 +45,16 @@ class JournalRepository implements JournalRepositoryInterface
*/
public function first()
{
return Auth::user()->transactionjournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
$cache = new CacheProperties;
$cache->addProperty('user-first-journal');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$entry = Auth::user()->transactionjournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
$cache->store($entry);
return $entry;
}
/**
@@ -164,7 +174,7 @@ class JournalRepository implements JournalRepositoryInterface
[
'user_id' => $data['user'],
'transaction_type_id' => $transactionType->id,
'transaction_currency_id' => $data['amount_currency_id'],
'transaction_currency_id' => $data['amount_currency_id_amount'],
'description' => $data['description'],
'completed' => 0,
'date' => $data['date'],
@@ -226,7 +236,7 @@ class JournalRepository implements JournalRepositoryInterface
public function update(TransactionJournal $journal, array $data)
{
// update actual journal.
$journal->transaction_currency_id = $data['amount_currency_id'];
$journal->transaction_currency_id = $data['amount_currency_id_amount'];
$journal->description = $data['description'];
$journal->date = $data['date'];

View File

@@ -1,149 +0,0 @@
<?php
namespace FireflyIII\Repositories\PiggyBank;
use Carbon\Carbon;
use FireflyIII\Models\PiggyBankRepetition;
/**
* Class PiggyBankPart
*
* @codeCoverageIgnore
* @package FireflyIII\Collection
*/
class PiggyBankPart
{
/** @var float */
public $amountPerBar;
/** @var float */
public $cumulativeAmount;
/** @var float */
public $currentamount;
/** @var PiggyBankRepetition */
public $repetition;
/** @var Carbon */
public $startdate;
/** @var Carbon */
public $targetdate;
/**
* @return PiggyBankRepetition
*/
public function getRepetition()
{
return $this->repetition;
}
/**
* @param PiggyBankRepetition $repetition
*/
public function setRepetition($repetition)
{
$this->repetition = $repetition;
}
/**
* @return Carbon
*/
public function getStartdate()
{
return $this->startdate;
}
/**
* @param Carbon $startdate
*/
public function setStartdate($startdate)
{
$this->startdate = $startdate;
}
/**
* @return Carbon
*/
public function getTargetdate()
{
return $this->targetdate;
}
/**
* @param Carbon $targetdate
*/
public function setTargetdate($targetdate)
{
$this->targetdate = $targetdate;
}
/**
* @return float|int
*/
public function percentage()
{
bcscale(2);
if ($this->getCurrentamount() < $this->getCumulativeAmount()) {
$pct = 0;
// calculate halfway point?
if (bcsub($this->getCumulativeAmount(), $this->getCurrentamount()) < $this->getAmountPerBar()) {
$left = $this->getCurrentamount() % $this->getAmountPerBar();
$pct = round($left / $this->getAmountPerBar() * 100);
}
return $pct;
} else {
return 100;
}
}
/**
* @return float
*/
public function getCurrentamount()
{
return $this->currentamount;
}
/**
* @param float $currentamount
*/
public function setCurrentamount($currentamount)
{
$this->currentamount = $currentamount;
}
/**
* @return float
*/
public function getCumulativeAmount()
{
return $this->cumulativeAmount;
}
/**
* @param float $cumulativeAmount
*/
public function setCumulativeAmount($cumulativeAmount)
{
$this->cumulativeAmount = $cumulativeAmount;
}
/**
* @return float
*/
public function getAmountPerBar()
{
return $this->amountPerBar;
}
/**
* @param float $amountPerBar
*/
public function setAmountPerBar($amountPerBar)
{
$this->amountPerBar = $amountPerBar;
}
}

View File

@@ -3,10 +3,10 @@
namespace FireflyIII\Repositories\Shared;
use Carbon\Carbon;
use DB;
use FireflyIII\Models\Account;
use FireflyIII\Models\TransactionType;
use FireflyIII\Support\CacheProperties;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
/**
@@ -17,55 +17,6 @@ use Illuminate\Support\Collection;
class ComponentRepository
{
/**
* @param $object
* @param Carbon $start
* @param Carbon $end
*
* @param bool $shared
*
* @return string
*/
protected function commonBalanceInPeriod($object, Carbon $start, Carbon $end, $shared = false)
{
$cache = new CacheProperties; // we must cache this.
$cache->addProperty($object->id);
$cache->addProperty(get_class($object));
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($shared);
$cache->addProperty('balanceInPeriod');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
if ($shared === true) { // shared is true: always ignore transfers between accounts!
$sum = $object->transactionjournals()
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
->before($end)
->after($start)
->get(['transaction_journals.*'])->sum('amount');
} else {
// do something else, SEE budgets.
// get all journals in this month where the asset account is NOT shared.
$sum = $object->transactionjournals()->before($end)->after($start)
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
->leftJoin(
'account_meta', function (JoinClause $join) {
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
}
)->where('account_meta.data', '!=', '"sharedAsset"')->get(['transaction_journals.*'])->sum('amount');
}
$cache->store($sum);
return $sum;
}
/**
* @param $object
* @param Carbon $start
@@ -74,7 +25,7 @@ class ComponentRepository
*
* @return string
*/
protected function commonBalanceInPeriodForList($object, Carbon $start, Carbon $end, Collection $accounts)
protected function commonBalanceInPeriod($object, Carbon $start, Carbon $end, Collection $accounts)
{
$cache = new CacheProperties; // we must cache this.
$cache->addProperty($object->id);
@@ -84,27 +35,29 @@ class ComponentRepository
$cache->addProperty($accounts);
$cache->addProperty('balanceInPeriodList');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$ids = [];
/** @var Account $account */
foreach ($accounts as $account) {
$ids[] = $account->id;
}
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$sum = $object->transactionjournals()
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
->before($end)
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->whereIn('accounts.id', $ids)
->after($start)
->get(['transaction_journals.*'])->sum('amount');
$entry = $object->transactionjournals()
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
->before($end)
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->whereIn('accounts.id', $ids)
->after($start)
->first([DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
$amount = $entry->journalAmount;
$cache->store($sum);
$cache->store($amount);
return $sum;
return $amount;
}
}

View File

@@ -9,6 +9,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
/**
@@ -54,6 +55,7 @@ class TagRepository implements TagRepositoryInterface
}
/**
* @deprecated
* This method scans the transaction journals from or to the given asset account
* and checks if these are part of a balancing act. If so, it will sum up the amounts
* transferred into the balancing act (if any) and return this amount.
@@ -77,7 +79,9 @@ class TagRepository implements TagRepositoryInterface
/** @var Tag $tag */
foreach ($tags as $tag) {
$journals = $tag->transactionjournals()->after($start)->before($end)->transactionTypes([TransactionType::TRANSFER])->get(['transaction_journals.*']);
$journals = $tag->transactionjournals()->after($start)->before($end)->transactionTypes([TransactionType::TRANSFER])->get(
['transaction_journals.*']
);
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
@@ -108,6 +112,13 @@ class TagRepository implements TagRepositoryInterface
*/
public function get()
{
$cache = new CacheProperties;
$cache->addProperty('tags-list');
if ($cache->has()) {
return $cache->get();
}
/** @var Collection $tags */
$tags = Auth::user()->tags()->get();
$tags = $tags->sortBy(
@@ -116,6 +127,8 @@ class TagRepository implements TagRepositoryInterface
}
);
$cache->store($tags);
return $tags;
}

View File

@@ -27,6 +27,7 @@ interface TagRepositoryInterface
public function connect(TransactionJournal $journal, Tag $tag);
/**
* @deprecated
* This method scans the transaction journals from or to the given asset account
* and checks if these are part of a balancing act. If so, it will sum up the amounts
* transferred into the balancing act (if any) and return this amount.

View File

@@ -40,7 +40,7 @@ class Amount
if ($cache->has()) {
return $cache->get();
} else {
$currencyPreference = Prefs::get('currencyPreference', env('DEFAULT_CURRENCY','EUR'));
$currencyPreference = Prefs::get('currencyPreference', env('DEFAULT_CURRENCY', 'EUR'));
$currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
$cache->store($currency->symbol);
@@ -152,7 +152,7 @@ class Amount
if ($cache->has()) {
return $cache->get();
} else {
$currencyPreference = Prefs::get('currencyPreference', env('DEFAULT_CURRENCY','EUR'));
$currencyPreference = Prefs::get('currencyPreference', env('DEFAULT_CURRENCY', 'EUR'));
$currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
if ($currency) {
@@ -161,9 +161,9 @@ class Amount
return $currency->code;
}
$cache->store(env('DEFAULT_CURRENCY','EUR'));
$cache->store(env('DEFAULT_CURRENCY', 'EUR'));
return env('DEFAULT_CURRENCY','EUR'); // @codeCoverageIgnore
return env('DEFAULT_CURRENCY', 'EUR'); // @codeCoverageIgnore
}
}

View File

@@ -72,6 +72,55 @@ class Steam
return round($balance, 2);
}
/**
* Gets the balance for the given account during the whole range, using this format:
*
* [yyyy-mm-dd] => 123,2
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function balanceInRange(Account $account, Carbon $start, Carbon $end)
{
// abuse chart properties:
$cache = new CacheProperties;
$cache->addProperty($account->id);
$cache->addProperty('balance-in-range');
$cache->addProperty($start);
$cache->addProperty($end);
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$balances = [];
$start->subDay();
$end->addDay();
$startBalance = $this->balance($account, $start);
$balances[$start->format('Y-m-d')] = $startBalance;
$start->addDay();
// query!
$set = $account->transactions()
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->groupBy('transaction_journals.date')
->get(['transaction_journals.date', DB::Raw('SUM(`transactions`.`amount`) as `modified`')]);
$currentBalance = $startBalance;
foreach ($set as $entry) {
$currentBalance = bcadd($currentBalance, $entry->modified);
$balances[$entry->date] = $currentBalance;
}
$cache->store($balances);
return $balances;
}
/**
*
* @param array $ids

View File

@@ -273,7 +273,7 @@ class FireflyValidator extends Validator
// get entries from table
$set = DB::table($table)->where('user_id', Auth::user()->id)
->where('id', '!=', $exclude)->get([$field]);
->where('id', '!=', $exclude)->get([$field]);
foreach ($set as $entry) {
$fieldValue = $this->tryDecrypt($entry->$field);

View File

@@ -22,12 +22,11 @@
"require": {
"laravel/framework": "5.1.*",
"davejamesmiller/laravel-breadcrumbs": "~3.0",
"grumpydictator/gchart": "~1",
"watson/validating": "~1.0",
"doctrine/dbal": "~2.5",
"illuminate/html": "~5.0",
"league/commonmark": "~0.7",
"rcrowe/twigbridge": "0.7.x@dev",
"rcrowe/twigbridge": "~0.9",
"zizaco/entrust": "dev-laravel-5",
"league/csv": "^7.1"
},

264
composer.lock generated
View File

@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "79e0f94d7571803d13e30aa48111b1ab",
"content-hash": "968497c3098b5a38109e66c170c8becd",
"hash": "4fc3975430321d76dd859916a9dcbfb0",
"content-hash": "ad9d33604e0a88fabea148474769942d",
"packages": [
{
"name": "classpreloader/classpreloader",
@@ -269,16 +269,16 @@
},
{
"name": "doctrine/cache",
"version": "v1.5.2",
"version": "v1.5.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
"reference": "47c7128262da274f590ae6f86eb137a7a64e82af"
"reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/cache/zipball/47c7128262da274f590ae6f86eb137a7a64e82af",
"reference": "47c7128262da274f590ae6f86eb137a7a64e82af",
"url": "https://api.github.com/repos/doctrine/cache/zipball/47cdc76ceb95cc591d9c79a36dc3794975b5d136",
"reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136",
"shasum": ""
},
"require": {
@@ -335,7 +335,7 @@
"cache",
"caching"
],
"time": "2015-12-03 10:50:37"
"time": "2015-12-19 05:03:47"
},
{
"name": "doctrine/collections",
@@ -405,16 +405,16 @@
},
{
"name": "doctrine/common",
"version": "v2.5.2",
"version": "v2.6.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
"reference": "311001fd9865a4d0d59efff4eac6d7dcb3f5270c"
"reference": "a579557bc689580c19fee4e27487a67fe60defc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/311001fd9865a4d0d59efff4eac6d7dcb3f5270c",
"reference": "311001fd9865a4d0d59efff4eac6d7dcb3f5270c",
"url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0",
"reference": "a579557bc689580c19fee4e27487a67fe60defc0",
"shasum": ""
},
"require": {
@@ -423,20 +423,20 @@
"doctrine/collections": "1.*",
"doctrine/inflector": "1.*",
"doctrine/lexer": "1.*",
"php": ">=5.3.2"
"php": "~5.5|~7.0"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
"phpunit/phpunit": "~4.8|~5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5.x-dev"
"dev-master": "2.7.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\": "lib/"
"psr-4": {
"Doctrine\\Common\\": "lib/Doctrine/Common"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -474,24 +474,24 @@
"persistence",
"spl"
],
"time": "2015-12-04 12:49:42"
"time": "2015-12-25 13:18:31"
},
{
"name": "doctrine/dbal",
"version": "v2.5.2",
"version": "v2.5.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "01dbcbc5cd0a913d751418e635434a18a2f2a75c"
"reference": "2fbcea96eae34a53183377cdbb0b9bec33974648"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/01dbcbc5cd0a913d751418e635434a18a2f2a75c",
"reference": "01dbcbc5cd0a913d751418e635434a18a2f2a75c",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/2fbcea96eae34a53183377cdbb0b9bec33974648",
"reference": "2fbcea96eae34a53183377cdbb0b9bec33974648",
"shasum": ""
},
"require": {
"doctrine/common": ">=2.4,<2.6-dev",
"doctrine/common": ">=2.4,<2.7-dev",
"php": ">=5.3.2"
},
"require-dev": {
@@ -545,7 +545,7 @@
"persistence",
"queryobject"
],
"time": "2015-09-16 16:29:33"
"time": "2015-12-25 16:28:24"
},
{
"name": "doctrine/inflector",
@@ -1148,16 +1148,16 @@
},
{
"name": "league/flysystem",
"version": "1.0.15",
"version": "1.0.16",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "31525caf9e8772683672fefd8a1ca0c0736020f4"
"reference": "183e1a610664baf6dcd6fceda415baf43cbdc031"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/31525caf9e8772683672fefd8a1ca0c0736020f4",
"reference": "31525caf9e8772683672fefd8a1ca0c0736020f4",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/183e1a610664baf6dcd6fceda415baf43cbdc031",
"reference": "183e1a610664baf6dcd6fceda415baf43cbdc031",
"shasum": ""
},
"require": {
@@ -1171,7 +1171,7 @@
"mockery/mockery": "~0.9",
"phpspec/phpspec": "^2.2",
"phpspec/prophecy-phpunit": "~1.0",
"phpunit/phpunit": "~4.1"
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-fileinfo": "Required for MimeType",
@@ -1228,7 +1228,7 @@
"sftp",
"storage"
],
"time": "2015-09-30 22:26:59"
"time": "2015-12-19 20:16:43"
},
{
"name": "monolog/monolog",
@@ -1609,21 +1609,21 @@
},
{
"name": "rcrowe/twigbridge",
"version": "dev-master",
"version": "v0.9.1",
"source": {
"type": "git",
"url": "https://github.com/rcrowe/TwigBridge.git",
"reference": "0e2693d99745eb8bbd01a80e841951c0738e1d15"
"reference": "634c4d12fc3dc633d202341b7a29a107f77a67da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rcrowe/TwigBridge/zipball/0e2693d99745eb8bbd01a80e841951c0738e1d15",
"reference": "0e2693d99745eb8bbd01a80e841951c0738e1d15",
"url": "https://api.github.com/repos/rcrowe/TwigBridge/zipball/634c4d12fc3dc633d202341b7a29a107f77a67da",
"reference": "634c4d12fc3dc633d202341b7a29a107f77a67da",
"shasum": ""
},
"require": {
"illuminate/support": "5.0.*|5.1.*",
"illuminate/view": "5.0.*|5.1.*",
"illuminate/support": "5.0.*|5.1.*|5.2.*",
"illuminate/view": "5.0.*|5.1.*|5.2.*",
"php": ">=5.4.0",
"twig/twig": "~1.15|~2.0"
},
@@ -1641,7 +1641,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.7-dev"
"dev-master": "0.10-dev"
}
},
"autoload": {
@@ -1669,7 +1669,7 @@
"laravel",
"twig"
],
"time": "2015-05-21 13:46:00"
"time": "2015-12-21 22:03:34"
},
{
"name": "swiftmailer/swiftmailer",
@@ -1726,16 +1726,16 @@
},
{
"name": "symfony/console",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "16bb1cb86df43c90931df65f529e7ebd79636750"
"reference": "4e35a78f932a4c07bd349efea647ac741c1419b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/16bb1cb86df43c90931df65f529e7ebd79636750",
"reference": "16bb1cb86df43c90931df65f529e7ebd79636750",
"url": "https://api.github.com/repos/symfony/console/zipball/4e35a78f932a4c07bd349efea647ac741c1419b6",
"reference": "4e35a78f932a4c07bd349efea647ac741c1419b6",
"shasum": ""
},
"require": {
@@ -1781,20 +1781,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2015-11-18 09:54:26"
"time": "2015-12-23 11:17:38"
},
{
"name": "symfony/css-selector",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "abb47717fb88aebd9437da2fc8bb01a50a36679f"
"reference": "35bebec48d3d08e3138257419e3ca84070152012"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/abb47717fb88aebd9437da2fc8bb01a50a36679f",
"reference": "abb47717fb88aebd9437da2fc8bb01a50a36679f",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/35bebec48d3d08e3138257419e3ca84070152012",
"reference": "35bebec48d3d08e3138257419e3ca84070152012",
"shasum": ""
},
"require": {
@@ -1834,20 +1834,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2015-10-30 20:10:21"
"time": "2015-12-05 17:37:09"
},
{
"name": "symfony/debug",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "0dbc119596f4afc82d9b2eb2a7e6a4af1ee763fa"
"reference": "08589346bd2ec9a8eb3d935e3b1fedba9bb6463f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/0dbc119596f4afc82d9b2eb2a7e6a4af1ee763fa",
"reference": "0dbc119596f4afc82d9b2eb2a7e6a4af1ee763fa",
"url": "https://api.github.com/repos/symfony/debug/zipball/08589346bd2ec9a8eb3d935e3b1fedba9bb6463f",
"reference": "08589346bd2ec9a8eb3d935e3b1fedba9bb6463f",
"shasum": ""
},
"require": {
@@ -1891,11 +1891,11 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2015-10-30 20:10:21"
"time": "2015-12-26 14:05:15"
},
{
"name": "symfony/dom-crawler",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
@@ -1950,7 +1950,7 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v2.8.0",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@@ -2010,16 +2010,16 @@
},
{
"name": "symfony/finder",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "a06a0c0ff7db3736a50d530c908cca547bf13da9"
"reference": "937edcbac3f2dd3187c56cf90368867d55dee991"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/a06a0c0ff7db3736a50d530c908cca547bf13da9",
"reference": "a06a0c0ff7db3736a50d530c908cca547bf13da9",
"url": "https://api.github.com/repos/symfony/finder/zipball/937edcbac3f2dd3187c56cf90368867d55dee991",
"reference": "937edcbac3f2dd3187c56cf90368867d55dee991",
"shasum": ""
},
"require": {
@@ -2055,20 +2055,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2015-10-30 20:10:21"
"time": "2015-12-05 11:06:38"
},
{
"name": "symfony/http-foundation",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "e83a3d105ddaf5a113e803c904fdec552d1f1c35"
"reference": "cf11faac7df5384bb14774ad7266add227e10ec1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e83a3d105ddaf5a113e803c904fdec552d1f1c35",
"reference": "e83a3d105ddaf5a113e803c904fdec552d1f1c35",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/cf11faac7df5384bb14774ad7266add227e10ec1",
"reference": "cf11faac7df5384bb14774ad7266add227e10ec1",
"shasum": ""
},
"require": {
@@ -2110,20 +2110,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2015-11-20 17:41:18"
"time": "2015-12-18 15:35:58"
},
{
"name": "symfony/http-kernel",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "5570de31e8fbc03777a8c61eb24f9b626e5e5941"
"reference": "2dea13800e1a48710cf23a2c60c804c88e72ed57"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/5570de31e8fbc03777a8c61eb24f9b626e5e5941",
"reference": "5570de31e8fbc03777a8c61eb24f9b626e5e5941",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/2dea13800e1a48710cf23a2c60c804c88e72ed57",
"reference": "2dea13800e1a48710cf23a2c60c804c88e72ed57",
"shasum": ""
},
"require": {
@@ -2192,20 +2192,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2015-11-23 11:57:49"
"time": "2015-12-26 15:01:55"
},
{
"name": "symfony/polyfill-php56",
"version": "v1.0.0",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php56.git",
"reference": "a6bd4770a6967517e6610529e14afaa3111094a3"
"reference": "e2e77609a9e2328eb370fbb0e0d8b2000ebb488f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/a6bd4770a6967517e6610529e14afaa3111094a3",
"reference": "a6bd4770a6967517e6610529e14afaa3111094a3",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/e2e77609a9e2328eb370fbb0e0d8b2000ebb488f",
"reference": "e2e77609a9e2328eb370fbb0e0d8b2000ebb488f",
"shasum": ""
},
"require": {
@@ -2248,11 +2248,11 @@
"portable",
"shim"
],
"time": "2015-11-04 20:28:58"
"time": "2015-12-18 15:10:25"
},
{
"name": "symfony/polyfill-util",
"version": "v1.0.0",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-util.git",
@@ -2304,16 +2304,16 @@
},
{
"name": "symfony/process",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "f6290983c8725d0afa29bdc3e5295879de3e58f5"
"reference": "a3fb8f4c4afc4f1b285de5df07e568602934f525"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/f6290983c8725d0afa29bdc3e5295879de3e58f5",
"reference": "f6290983c8725d0afa29bdc3e5295879de3e58f5",
"url": "https://api.github.com/repos/symfony/process/zipball/a3fb8f4c4afc4f1b285de5df07e568602934f525",
"reference": "a3fb8f4c4afc4f1b285de5df07e568602934f525",
"shasum": ""
},
"require": {
@@ -2349,20 +2349,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2015-11-19 16:11:24"
"time": "2015-12-23 11:03:39"
},
{
"name": "symfony/routing",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "7450f6196711b124fb8b04a12286d01a0401ddfe"
"reference": "2c100bd94be50e2a1fce7fe1ac534e28776c24ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/7450f6196711b124fb8b04a12286d01a0401ddfe",
"reference": "7450f6196711b124fb8b04a12286d01a0401ddfe",
"url": "https://api.github.com/repos/symfony/routing/zipball/2c100bd94be50e2a1fce7fe1ac534e28776c24ff",
"reference": "2c100bd94be50e2a1fce7fe1ac534e28776c24ff",
"shasum": ""
},
"require": {
@@ -2422,20 +2422,20 @@
"uri",
"url"
],
"time": "2015-11-18 13:41:01"
"time": "2015-12-23 06:54:35"
},
{
"name": "symfony/translation",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "e4ecb9c3ba1304eaf24de15c2d7a428101c1982f"
"reference": "e7e95debf0465f7886d2994cd808f9382adb423c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/e4ecb9c3ba1304eaf24de15c2d7a428101c1982f",
"reference": "e4ecb9c3ba1304eaf24de15c2d7a428101c1982f",
"url": "https://api.github.com/repos/symfony/translation/zipball/e7e95debf0465f7886d2994cd808f9382adb423c",
"reference": "e7e95debf0465f7886d2994cd808f9382adb423c",
"shasum": ""
},
"require": {
@@ -2485,20 +2485,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2015-11-18 13:41:01"
"time": "2015-12-05 17:37:09"
},
{
"name": "symfony/var-dumper",
"version": "v2.7.7",
"version": "v2.7.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "72bcb27411780eaee9469729aace73c0d46fb2b8"
"reference": "ec3233d755578c56612c13d81d4ef141f8f94e9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/72bcb27411780eaee9469729aace73c0d46fb2b8",
"reference": "72bcb27411780eaee9469729aace73c0d46fb2b8",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/ec3233d755578c56612c13d81d4ef141f8f94e9e",
"reference": "ec3233d755578c56612c13d81d4ef141f8f94e9e",
"shasum": ""
},
"require": {
@@ -2544,7 +2544,7 @@
"debug",
"dump"
],
"time": "2015-11-18 13:41:01"
"time": "2015-12-05 10:02:55"
},
{
"name": "twig/twig",
@@ -2779,28 +2779,28 @@
"packages-dev": [
{
"name": "barryvdh/laravel-debugbar",
"version": "v2.0.6",
"version": "v2.1.1",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-debugbar.git",
"reference": "23672cbbe78278ff1fdb258caa0b1de7b5d0bc0c"
"reference": "974fd16e328ca851a081449100d9509af59cf0ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/23672cbbe78278ff1fdb258caa0b1de7b5d0bc0c",
"reference": "23672cbbe78278ff1fdb258caa0b1de7b5d0bc0c",
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/974fd16e328ca851a081449100d9509af59cf0ff",
"reference": "974fd16e328ca851a081449100d9509af59cf0ff",
"shasum": ""
},
"require": {
"illuminate/support": "~5.0.17|5.1.*",
"maximebf/debugbar": "~1.10.2",
"illuminate/support": "~5.0.17|5.1.*|5.2.*",
"maximebf/debugbar": "~1.11.0",
"php": ">=5.4.0",
"symfony/finder": "~2.6"
"symfony/finder": "~2.6|~3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "2.2-dev"
}
},
"autoload": {
@@ -2829,26 +2829,26 @@
"profiler",
"webprofiler"
],
"time": "2015-09-09 11:39:27"
"time": "2015-12-22 06:22:38"
},
{
"name": "barryvdh/laravel-ide-helper",
"version": "v2.1.0",
"version": "v2.1.2",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
"reference": "83999f8467374adcb8893f566c9171c9d9691f50"
"reference": "d82e8f191fb043a0f8cbf2de64fd3027bfa4f772"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/83999f8467374adcb8893f566c9171c9d9691f50",
"reference": "83999f8467374adcb8893f566c9171c9d9691f50",
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/d82e8f191fb043a0f8cbf2de64fd3027bfa4f772",
"reference": "d82e8f191fb043a0f8cbf2de64fd3027bfa4f772",
"shasum": ""
},
"require": {
"illuminate/console": "5.0.x|5.1.x",
"illuminate/filesystem": "5.0.x|5.1.x",
"illuminate/support": "5.0.x|5.1.x",
"illuminate/console": "5.0.x|5.1.x|5.2.x",
"illuminate/filesystem": "5.0.x|5.1.x|5.2.x",
"illuminate/support": "5.0.x|5.1.x|5.2.x",
"php": ">=5.4.0",
"phpdocumentor/reflection-docblock": "2.0.4",
"symfony/class-loader": "~2.3"
@@ -2892,29 +2892,29 @@
"phpstorm",
"sublime"
],
"time": "2015-08-13 11:40:00"
"time": "2015-12-21 19:48:06"
},
{
"name": "maximebf/debugbar",
"version": "v1.10.5",
"version": "v1.11.0",
"source": {
"type": "git",
"url": "https://github.com/maximebf/php-debugbar.git",
"reference": "30e53e8a28284b69dd223c9f5ee8957befd72636"
"reference": "07741d84d39d10f00551c94284cdefcc69703e77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/30e53e8a28284b69dd223c9f5ee8957befd72636",
"reference": "30e53e8a28284b69dd223c9f5ee8957befd72636",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/07741d84d39d10f00551c94284cdefcc69703e77",
"reference": "07741d84d39d10f00551c94284cdefcc69703e77",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0",
"symfony/var-dumper": "~2.6"
"psr/log": "^1.0",
"symfony/var-dumper": "^2.6|^3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^4.0|^5.0"
},
"suggest": {
"kriswallsmith/assetic": "The best way to manage assets",
@@ -2924,12 +2924,12 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
"dev-master": "1.11-dev"
}
},
"autoload": {
"psr-0": {
"DebugBar": "src/"
"psr-4": {
"DebugBar\\": "src/DebugBar/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -2941,14 +2941,19 @@
"name": "Maxime Bouroumeau-Fuseau",
"email": "maxime.bouroumeau@gmail.com",
"homepage": "http://maximebf.com"
},
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "Debug bar in the browser for php application",
"homepage": "https://github.com/maximebf/php-debugbar",
"keywords": [
"debug"
"debug",
"debugbar"
],
"time": "2015-10-19 20:35:12"
"time": "2015-12-10 09:50:24"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -3001,16 +3006,16 @@
},
{
"name": "symfony/class-loader",
"version": "v2.8.0",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
"reference": "51f83451bf0ddfc696e47e4642d6cd10fcfce160"
"reference": "ec74b0a279cf3a9bd36172b3e3061591d380ce6c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/51f83451bf0ddfc696e47e4642d6cd10fcfce160",
"reference": "51f83451bf0ddfc696e47e4642d6cd10fcfce160",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/ec74b0a279cf3a9bd36172b3e3061591d380ce6c",
"reference": "ec74b0a279cf3a9bd36172b3e3061591d380ce6c",
"shasum": ""
},
"require": {
@@ -3049,13 +3054,12 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
"time": "2015-11-26 07:00:59"
"time": "2015-12-05 17:37:59"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"rcrowe/twigbridge": 20,
"zizaco/entrust": 20,
"barryvdh/laravel-debugbar": 0
},

View File

@@ -52,7 +52,7 @@ return [
|
*/
'locale' => 'en',
'locale' => 'en_US',
/*
|--------------------------------------------------------------------------
@@ -65,7 +65,7 @@ return [
|
*/
'fallback_locale' => 'en',
'fallback_locale' => 'en_US',
/*
|--------------------------------------------------------------------------

View File

@@ -1,20 +1,20 @@
<?php
return [
'chart' => 'chartjs',
'version' => '3.5.4',
'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'],
'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'csv_import_enabled' => true,
'maxUploadSize' => 5242880,
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
'piggy_bank_periods' => [
'chart' => 'chartjs',
'version' => '3.5.6.1',
'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'],
'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'csv_import_enabled' => true,
'maxUploadSize' => 5242880,
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
'piggy_bank_periods' => [
'week' => 'Week',
'month' => 'Month',
'quarter' => 'Quarter',
'year' => 'Year'
],
'periods_to_text' => [
'periods_to_text' => [
'weekly' => 'A week',
'monthly' => 'A month',
'quarterly' => 'A quarter',
@@ -22,7 +22,7 @@ return [
'yearly' => 'A year',
],
'accountRoles' => [
'accountRoles' => [
'defaultAsset' => 'Default asset account',
'sharedAsset' => 'Shared asset account',
'savingAsset' => 'Savings account',
@@ -98,13 +98,23 @@ return [
'Revenue account' => 'revenue',
'Cash account' => 'cash',
],
'languages' => [
'en_US' => ['name_locale' => 'English', 'name_english' => 'English', 'complete' => true],
'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch', 'complete' => true],
'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portugese (Brazil)', 'complete' => false],
'fr_FR' => ['name_locale' => 'Français', 'name_english' => 'French', 'complete' => false],
],
'lang' => [
'en' => 'English',
'nl' => 'Nederlands'
'en_US' => 'English',
'nl_NL' => 'Nederlands',
'fr_FR' => 'Français',
'pt_BR' => 'Português do Brasil',
],
'locales' => [
'en' => ['en', 'English', 'en_US', 'en_US.utf8'],
'nl' => ['nl', 'Dutch', 'nl_NL', 'nl_NL.utf8'],
'en_US' => ['en', 'English', 'en_US', 'en_US.utf8'],
'nl_NL' => ['nl', 'Dutch', 'nl_NL', 'nl_NL.utf8'],
'pt_BR' => ['pt_BR', 'pt_BR.utf8'],
'fr_FR' => ['fr_FR', 'fr_FR.utf8'],
],
'transactionTypesByWhat' => [
'expenses' => ['Withdrawal'],
@@ -124,13 +134,17 @@ return [
],
'month' => [
'en' => '%B %Y',
'nl' => '%B %Y',
'month' => [
'en_US' => '%B %Y',
'nl_NL' => '%B %Y',
'fr_FR' => '%B %Y',
'pt_BR' => '%B %Y',
],
'monthAndDay' => [
'en' => '%B %e, %Y',
'nl' => '%e %B %Y',
'monthAndDay' => [
'en_US' => '%B %e, %Y',
'nl_NL' => '%e %B %Y',
'fr_FR' => '%B %e, %Y',
'pt_BR' => '%B %e, %Y',
],
];

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .content-wrapper,.skin-blue-light .main-footer{border-left:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .treeview-menu>li>a{color:#777}.skin-blue-light .treeview-menu>li.active>a,.skin-blue-light .treeview-menu>li>a:hover{color:#000}.skin-blue-light .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus,.skin-blue-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .content-wrapper,.skin-blue-light .main-footer{border-left:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .treeview-menu>li>a{color:#777}.skin-blue-light .treeview-menu>li.active>a,.skin-blue-light .treeview-menu>li>a:hover{color:#000}.skin-blue-light .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
/* globals $, Chart, currencySymbol */
/* globals $, Chart, currencySymbol,mon_decimal_point ,accounting, mon_thousands_sep, frac_digits */
/*
Make some colours:
@@ -29,16 +29,16 @@ accounting.settings = {
currency: {
symbol : currencySymbol, // default currency symbol is '$'
format: "%s %v", // controls output: %s = symbol, %v = value/number (can be object: see below)
decimal : ",", // decimal point separator
thousand: ".", // thousands separator
precision : 2 // decimal places
decimal : mon_decimal_point, // decimal point separator
thousand: mon_thousands_sep, // thousands separator
precision : frac_digits // decimal places
},
number: {
precision : 0, // default precision on numbers is 0
thousand: ",",
decimal : "."
}
}
};
var fillColors = [];

View File

@@ -1,7 +1,9 @@
/* globals token, dateRangeConfig, $, */
$(function () {
"use strict";
$('.currencySelect').click(currencySelect);
// when you click on a currency, this happens:
$('.currency-option').click(currencySelect);
var ranges = {};
// range for the current month:
@@ -62,21 +64,51 @@ $(function () {
function currencySelect(e) {
"use strict";
var target = $(e.target);
// clicked on
var target = $(e.target); // target is the <A> tag.
// name of the field in question:
var name = target.data('name');
// id of menu button (used later on):
var menuID = 'currency_dropdown_' + name;
// the hidden input with the actual value of the selected currency:
var hiddenInputName = 'amount_currency_id_' + target.data('name');
// span with the current selection (next to the caret):
var spanId = 'currency_select_symbol_' + target.data('name');
// the selected currency symbol:
var symbol = target.data('symbol');
var code = target.data('code');
// id of the selected currency.
var id = target.data('id');
var fieldType = target.data('field');
var menu = $('.' + fieldType + 'CurrencyDropdown');
var symbolHolder = $('#' + fieldType + 'CurrentSymbol');
symbolHolder.text(symbol);
$('input[name="' + fieldType + '_currency_id"]').val(id);
// update the hidden input:
$('input[name="' + hiddenInputName + '"]').val(id);
// close dropdown (hack hack)
menu.click();
// update the symbol:
$('#' + spanId).text(symbol);
// close the menu (hack hack)
$('#' + menuID).click();
return false;
//var code = target.data('code');
//var fieldType = target.data('field');
//var menu = $('.' + fieldType + 'CurrencyDropdown');
//
//var symbolHolder = $('#' + fieldType + 'CurrentSymbol');
//symbolHolder.text(symbol);
//$('input[name="' + fieldType + '_currency_id"]').val(id);
//
// close dropdown (hack hack)
//menu.click();
//return false;
}

View File

@@ -115,10 +115,6 @@ function drawChart() {
stackedColumnChart('chart/category/earned-in-year/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'categories-earned-in-year');
}
//if (typeof lineChart !== 'undefined' && typeof month !== 'undefined' && typeof reportURL === 'undefined') {
// lineChart('/chart/account/month/' + year + '/' + month + shared, 'account-balances-chart');
//}
if (typeof lineChart !== 'undefined' && typeof accountIds !== 'undefined') {
lineChart('/chart/account/report/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'account-balances-chart');
}

View File

@@ -18,8 +18,8 @@ function drawChart() {
columnChart('chart/report/in-out/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-chart');
columnChart('chart/report/in-out-sum/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-sum-chart');
stackedColumnChart('chart/budget/year/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'budgets');
stackedColumnChart('chart/category/spent-in-year/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'categories-spent-in-year');
stackedColumnChart('chart/category/earned-in-year/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'categories-earned-in-year');
stackedColumnChart('chart/category/spent-in-period/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'categories-spent-in-period');
stackedColumnChart('chart/category/earned-in-period/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'categories-earned-in-period');
}

View File

@@ -27,8 +27,8 @@ return [
// reports
'reports' => 'Reports',
'monthly_report' => 'Montly report for :date',
'monthly_report_shared' => 'Montly report for :date (including shared accounts)',
'monthly_report' => 'Monthly report for :date',
'monthly_report_shared' => 'Monthly report for :date (including shared accounts)',
'yearly_report' => 'Yearly report for :date',
'yearly_report_shared' => 'Yearly report for :date (including shared accounts)',
'budget_report' => 'Budget report for :date',

View File

@@ -0,0 +1,8 @@
<?php
return [
'locale' => 'en, English, en_US, en_US.utf8',
'month' => '%B %Y',
'month_and_day' => '%B %e, %Y',
];

View File

@@ -2,6 +2,7 @@
return [
// general stuff:
'language_incomplete' => 'This language is not yet fully translated',
'test' => 'You have selected English.',
'close' => 'Close',
'pleaseHold' => 'Please hold...',
@@ -67,8 +68,7 @@ return [
'new_password' => 'New password',
'new_password_again' => 'New password (again)',
'delete_your_account' => 'Delete your account',
'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, <em>anything</em> you might have saved' .
' into Firefly III. It\'ll be GONE.',
'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, <em>anything</em> you might have saved into Firefly III. It\'ll be GONE.',
'delete_your_account_password' => 'Enter your password to continue.',
'password' => 'Password',
'are_you_sure' => 'Are you sure? You cannot undo this.',
@@ -109,23 +109,15 @@ return [
'csv_define_column_roles' => 'Define column roles',
'csv_map_values' => 'Map found values to existing values',
'csv_download_config' => 'Download CSV configuration file.',
'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV' .
' importer made by the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV' .
' file and follow the instructions. If you would like to learn more, please click on the <i ' .
'class="fa fa-question-circle"></i> button at the top of this page.',
'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions. If you would like to learn more, please click on the <i class="fa fa-question-circle"></i> button at the top of this page.',
'csv_index_beta_warning' => 'This tool is very much in beta. Please proceed with caution',
'csv_header_help' => 'Check this box when your CSV file\'s first row consists of column names, not actual data',
'csv_date_help' => 'Date time format in your CSV. Follow the format like <a href="https://secure.php.net/manual/en/' .
'datetime.createfromformat.php#refsect1-datetime.createfromformat-parameters">this page</a> ' .
'indicates. The default value will parse dates that look like this: ' . date('Ymd'),
'csv_date_help' => 'Date time format in your CSV. Follow the format like <a href="https://secure.php.net/manual/en/datetime.createfromformat.php#refsect1-datetime.createfromformat-parameters">this page</a> indicates. The default value will parse dates that look like this: :dateExample.',
'csv_csv_file_help' => 'Select the CSV file here. You can only upload one file at a time',
'csv_csv_config_file_help' => 'Select your CSV import configuration here. If you do not know what this is, ignore it. It will be explained later.',
'csv_upload_button' => 'Start importing CSV',
'csv_column_roles_title' => 'Define column roles',
'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. ' .
'Please check out the example data if you\'re not sure yourself. Click on the question mark ' .
'(top right of the page) to learn what each column means. If you want to map imported data ' .
'onto existing data in Firefly, use the checkbox. The next step will show you what this button does.',
'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. Please check out the example data if you\'re not sure yourself. Click on the question mark (top right of the page) to learn what each column means. If you want to map imported data onto existing data in Firefly, use the checkbox. The next step will show you what this button does.',
'csv_column_roles_table' => 'Column roles',
'csv_column' => 'CSV column',
'csv_column_name' => 'CSV column name',
@@ -135,15 +127,13 @@ return [
'csv_continue' => 'Continue to the next step',
'csv_go_back' => 'Go back to the previous step',
'csv_map_title' => 'Map found values to existing values',
'csv_map_text' => 'This page allows you to map the values from the CSV file to existing entries in your ' .
'database. This ensures that accounts and other things won\'t be created twice.',
'csv_map_text' => 'This page allows you to map the values from the CSV file to existing entries in your database. This ensures that accounts and other things won\'t be created twice.',
'csv_field_value' => 'Field value from CSV',
'csv_field_mapped_to' => 'Must be mapped to...',
'csv_do_not_map' => 'Do not map this value',
'csv_download_config_title' => 'Download CSV configuration',
'csv_download_config_text' => 'Everything you\'ve just set up can be downloaded as a configuration file. Click the button to do so.',
'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all ' .
'over again. But, if the import succeeds, it will be easier to upload similar CSV files.',
'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all over again. But, if the import succeeds, it will be easier to upload similar CSV files.',
'csv_do_download_config' => 'Download configuration file.',
'csv_empty_description' => '(empty description)',
'csv_upload_form' => 'CSV upload form',
@@ -189,11 +179,9 @@ return [
'csv_column_tags-space' => 'Tags (space separated)',
'csv_specifix_RabobankDescription' => 'Select this when you\'re importing Rabobank CSV export files.',
'csv_specifix_Dummy' => 'Checking this has no effect whatsoever.',
'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which'
. ' account the transactions in the CSV belong to.',
'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.',
'csv_date_parse_error' => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?',
// create new stuff:
'create_new_withdrawal' => 'Create new withdrawal',
'create_new_deposit' => 'Create new deposit',
@@ -204,7 +192,6 @@ return [
'create_new_piggy_bank' => 'Create new piggy bank',
'create_new_bill' => 'Create new bill',
// currencies:
'create_currency' => 'Create a new currency',
'edit_currency' => 'Edit currency ":name"',
@@ -369,133 +356,123 @@ return [
'profile' => 'Profile',
// reports:
'report_default' => 'Default financial report for :start until :end',
'quick_link_reports' => 'Quick links',
'quick_link_default_report' => 'Default financial report',
'report_this_month_quick' => 'Current month, all accounts',
'report_this_year_quick' => 'Current year, all accounts',
'report_all_time_quick' => 'All-time, all accounts',
'reports_can_bookmark' => 'Remember that reports can be bookmarked.',
'incomeVsExpenses' => 'Income vs. expenses',
'accountBalances' => 'Account balances',
'balanceStartOfYear' => 'Balance at start of year',
'balanceEndOfYear' => 'Balance at end of year',
'balanceStartOfMonth' => 'Balance at start of month',
'balanceEndOfMonth' => 'Balance at end of month',
'balanceStart' => 'Balance at start of period',
'balanceEnd' => 'Balance at end of period',
'reportsOwnAccounts' => 'Reports for your own accounts',
'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts',
'splitByAccount' => 'Split by account',
'balancedByTransfersAndTags' => 'Balanced by transfers and tags',
'coveredWithTags' => 'Covered with tags',
'leftUnbalanced' => 'Left unbalanced',
'expectedBalance' => 'Expected balance',
'outsideOfBudgets' => 'Outside of budgets',
'leftInBudget' => 'Left in budget',
'sumOfSums' => 'Sum of sums',
'noCategory' => '(no category)',
'notCharged' => 'Not charged (yet)',
'inactive' => 'Inactive',
'difference' => 'Difference',
'in' => 'In',
'out' => 'Out',
'topX' => 'top :number',
'showTheRest' => 'Show everything',
'hideTheRest' => 'Show only the top :number',
'sum_of_year' => 'Sum of year',
'sum_of_years' => 'Sum of years',
'average_of_year' => 'Average of year',
'average_of_years' => 'Average of years',
'categories_earned_in_year' => 'Categories (by earnings)',
'categories_spent_in_year' => 'Categories (by spendings)',
'report_type' => 'Report type',
'report_type_default' => 'Default financial report',
'report_included_accounts' => 'Included accounts',
'report_date_range' => 'Date range',
'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.',
'report_preset_ranges' => 'Pre-set ranges',
'shared' => 'Shared',
'report_default' => 'Default financial report for :start until :end',
'quick_link_reports' => 'Quick links',
'quick_link_default_report' => 'Default financial report',
'report_this_month_quick' => 'Current month, all accounts',
'report_this_year_quick' => 'Current year, all accounts',
'report_all_time_quick' => 'All-time, all accounts',
'reports_can_bookmark' => 'Remember that reports can be bookmarked.',
'incomeVsExpenses' => 'Income vs. expenses',
'accountBalances' => 'Account balances',
'balanceStartOfYear' => 'Balance at start of year',
'balanceEndOfYear' => 'Balance at end of year',
'balanceStartOfMonth' => 'Balance at start of month',
'balanceEndOfMonth' => 'Balance at end of month',
'balanceStart' => 'Balance at start of period',
'balanceEnd' => 'Balance at end of period',
'reportsOwnAccounts' => 'Reports for your own accounts',
'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts',
'splitByAccount' => 'Split by account',
'balancedByTransfersAndTags' => 'Balanced by transfers and tags',
'coveredWithTags' => 'Covered with tags',
'leftUnbalanced' => 'Left unbalanced',
'expectedBalance' => 'Expected balance',
'outsideOfBudgets' => 'Outside of budgets',
'leftInBudget' => 'Left in budget',
'sumOfSums' => 'Sum of sums',
'noCategory' => '(no category)',
'notCharged' => 'Not charged (yet)',
'inactive' => 'Inactive',
'difference' => 'Difference',
'in' => 'In',
'out' => 'Out',
'topX' => 'top :number',
'showTheRest' => 'Show everything',
'hideTheRest' => 'Show only the top :number',
'sum_of_year' => 'Sum of year',
'sum_of_years' => 'Sum of years',
'average_of_year' => 'Average of year',
'average_of_years' => 'Average of years',
'categories_earned_in_year' => 'Categories (by earnings)',
'categories_spent_in_year' => 'Categories (by spendings)',
'report_type' => 'Report type',
'report_type_default' => 'Default financial report',
'report_included_accounts' => 'Included accounts',
'report_date_range' => 'Date range',
'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.',
'report_preset_ranges' => 'Pre-set ranges',
'shared' => 'Shared',
// charts:
'dayOfMonth' => 'Day of the month',
'month' => 'Month',
'budget' => 'Budget',
'spent' => 'Spent',
'earned' => 'Earned',
'overspent' => 'Overspent',
'left' => 'Left',
'noBudget' => '(no budget)',
'maxAmount' => 'Maximum amount',
'minAmount' => 'Minumum amount',
'billEntry' => 'Current bill entry',
'name' => 'Name',
'date' => 'Date',
'paid' => 'Paid',
'unpaid' => 'Unpaid',
'day' => 'Day',
'budgeted' => 'Budgeted',
'period' => 'Period',
'balance' => 'Balance',
'summary' => 'Summary',
'sum' => 'Sum',
'average' => 'Average',
'balanceFor' => 'Balance for :name',
'dayOfMonth' => 'Day of the month',
'month' => 'Month',
'budget' => 'Budget',
'spent' => 'Spent',
'earned' => 'Earned',
'overspent' => 'Overspent',
'left' => 'Left',
'noBudget' => '(no budget)',
'maxAmount' => 'Maximum amount',
'minAmount' => 'Minumum amount',
'billEntry' => 'Current bill entry',
'name' => 'Name',
'date' => 'Date',
'paid' => 'Paid',
'unpaid' => 'Unpaid',
'day' => 'Day',
'budgeted' => 'Budgeted',
'period' => 'Period',
'balance' => 'Balance',
'summary' => 'Summary',
'sum' => 'Sum',
'average' => 'Average',
'balanceFor' => 'Balance for :name',
// piggy banks:
'piggy_bank' => 'Piggy bank',
'new_piggy_bank' => 'Create new piggy bank',
'store_piggy_bank' => 'Store new piggy bank',
'account_status' => 'Account status',
'left_for_piggy_banks' => 'Left for piggy banks',
'sum_of_piggy_banks' => 'Sum of piggy banks',
'saved_so_far' => 'Saved so far',
'left_to_save' => 'Left to save',
'add_money_to_piggy_title' => 'Add money to piggy bank ":name"',
'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"',
'add' => 'Add',
'remove' => 'Remove',
'max_amount_add' => 'The maximum amount you can add is',
'max_amount_remove' => 'The maximum amount you can remove is',
'update_piggy_button' => 'Update piggy bank',
'update_piggy_title' => 'Update piggy bank ":name"',
'details' => 'Details',
'events' => 'Events',
'target_amount' => 'Target amount',
'start_date' => 'Start date',
'target_date' => 'Target date',
'no_target_date' => 'No target date',
'todo' => 'to do',
'table' => 'Table',
'piggy_bank_not_exists' => 'Piggy bank no longer exists.',
'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.',
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
'delete_piggy_bank' => 'Delete piggy bank ":name"',
'piggy_bank' => 'Piggy bank',
'new_piggy_bank' => 'Create new piggy bank',
'store_piggy_bank' => 'Store new piggy bank',
'account_status' => 'Account status',
'left_for_piggy_banks' => 'Left for piggy banks',
'sum_of_piggy_banks' => 'Sum of piggy banks',
'saved_so_far' => 'Saved so far',
'left_to_save' => 'Left to save',
'add_money_to_piggy_title' => 'Add money to piggy bank ":name"',
'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"',
'add' => 'Add',
'remove' => 'Remove',
'max_amount_add' => 'The maximum amount you can add is',
'max_amount_remove' => 'The maximum amount you can remove is',
'update_piggy_button' => 'Update piggy bank',
'update_piggy_title' => 'Update piggy bank ":name"',
'details' => 'Details',
'events' => 'Events',
'target_amount' => 'Target amount',
'start_date' => 'Start date',
'target_date' => 'Target date',
'no_target_date' => 'No target date',
'todo' => 'to do',
'table' => 'Table',
'piggy_bank_not_exists' => 'Piggy bank no longer exists.',
'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.',
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
'delete_piggy_bank' => 'Delete piggy bank ":name"',
// tags
'regular_tag' => 'Just a regular tag.',
'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.',
'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.',
'delete_tag' => 'Delete tag ":tag"',
'new_tag' => 'Make new tag',
'edit_tag' => 'Edit tag ":tag"',
'no_year' => 'No year set',
'no_month' => 'No month set',
'tag_title_nothing' => 'Default tags',
'tag_title_balancingAct' => 'Balancing act tags',
'tag_title_advancePayment' => 'Advance payment tags',
'tags_introduction' => 'Usually tags are singular words, designed to quickly band items together using things like' .
' <span class="label label-info">expensive</span>, <span class="label label-info">bill</span>' .
' or <span class="label label-info">for-party</span>. In Firefly III, tags can have more properties' .
' such as a date, description and location. This allows you to join transactions together in a more' .
' meaningful way. For example, you could make a tag called <span class="label label-success">' .
'Christmas dinner with friends</span> and add information about the restaurant. Such tags are "singular",' .
' you would only use them for a single occasion, perhaps with multiple transactions.',
'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money' .
' for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where ' .
'expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you.' .
' Using tags the old-fashioned way is of course always possible. ',
'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.',
'regular_tag' => 'Just a regular tag.',
'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.',
'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.',
'delete_tag' => 'Delete tag ":tag"',
'new_tag' => 'Make new tag',
'edit_tag' => 'Edit tag ":tag"',
'no_year' => 'No year set',
'no_month' => 'No month set',
'tag_title_nothing' => 'Default tags',
'tag_title_balancingAct' => 'Balancing act tags',
'tag_title_advancePayment' => 'Advance payment tags',
'tags_introduction' => 'Usually tags are singular words, designed to quickly band items together using things like <span class="label label-info">expensive</span>, <span class="label label-info">bill</span> or <span class="label label-info">for-party</span>. In Firefly III, tags can have more properties such as a date, description and location. This allows you to join transactions together in a more meaningful way. For example, you could make a tag called <span class="label label-success"> Christmas dinner with friends</span> and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion, perhaps with multiple transactions.',
'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.',
'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.',
];

View File

@@ -88,16 +88,10 @@ return [
'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?',
'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.',
'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.' .
'|All :count transactions connected to this account will be deleted as well.',
'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.' .
'|All :count piggy bank connected to this account will be deleted as well.',
'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.' .
'|All :count transactions connected to this bill will spared deletion.',
'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.' .
'|All :count transactions connected to this budget will spared deletion.',
'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.' .
'|All :count transactions connected to this category will spared deletion.',
'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.' .
'|All :count transactions connected to this tag will spared deletion.',
'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.',
'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.',
'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.',
'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.',
'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.',
'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.',
];

View File

@@ -0,0 +1,84 @@
<?php
return [
// tour!
'main-content-title' => 'Welcome to Firefly III',
'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.',
'sidebar-toggle-title' => 'Sidebar to create stuff',
'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!',
'account-menu-title' => 'All your accounts',
'account-menu-text' => 'Here you can find all the accounts you\'ve made.',
'budget-menu-title' => 'Budgets',
'budget-menu-text' => 'Use this page to organise your finances and limit spending.',
'report-menu-title' => 'Reports',
'report-menu-text' => 'Check this out when you want a solid overview of your fiances.',
'transaction-menu-title' => 'Transactions',
'transaction-menu-text' => 'All transactions you\'ve created can be found here.',
'option-menu-title' => 'Options',
'option-menu-text' => 'This is pretty self-explanatory.',
'main-content-end-title' => 'The end!',
'main-content-end-text' => 'Remember that every page has a small question mark at the right top. Click it to get help about the page you\'re on.',
'index' => 'index',
'home' => 'home',
'accounts-index' => 'accounts.index',
'accounts-create' => 'accounts.create',
'accounts-edit' => 'accounts.edit',
'accounts-delete' => 'accounts.delete',
'accounts-show' => 'accounts.show',
'attachments-edit' => 'attachments.edit',
'attachments-delete' => 'attachments.delete',
'attachments-show' => 'attachments.show',
'attachments-preview' => 'attachments.preview',
'bills-index' => 'bills.index',
'bills-create' => 'bills.create',
'bills-edit' => 'bills.edit',
'bills-delete' => 'bills.delete',
'bills-show' => 'bills.show',
'budgets-index' => 'budgets.index',
'budgets-create' => 'budgets.create',
'budgets-edit' => 'budgets.edit',
'budgets-delete' => 'budgets.delete',
'budgets-show' => 'budgets.show',
'budgets-noBudget' => 'budgets.noBudget',
'categories-index' => 'categories.index',
'categories-create' => 'categories.create',
'categories-edit' => 'categories.edit',
'categories-delete' => 'categories.delete',
'categories-show' => 'categories.show',
'categories-show-date' => 'categories.show.date',
'categories-noCategory' => 'categories.noCategory',
'csv-index' => 'csv.index',
'csv-column-roles' => 'csv.column-roles',
'csv-map' => 'csv.map',
'csv-download-config-page' => 'csv.download-config-page',
'csv-process' => 'csv.process',
'currency-index' => 'currency.index',
'currency-create' => 'currency.create',
'currency-edit' => 'currency.edit',
'currency-delete' => 'currency.delete',
'new-user-index' => 'new-user.index',
'piggy-banks-index' => 'piggy-banks.index',
'piggy-banks-create' => 'piggy-banks.create',
'piggy-banks-edit' => 'piggy-banks.edit',
'piggy-banks-delete' => 'piggy-banks.delete',
'piggy-banks-show' => 'piggy-banks.show',
'preferences' => 'preferences',
'profile' => 'profile',
'profile-change-password' => 'profile.change-password',
'profile-delete-account' => 'profile.delete-account',
'reports-index' => 'reports.index',
'reports-report' => 'reports.report',
'search' => 'search',
'tags-index' => 'tags.index',
'tags-create' => 'tags.create',
'tags-show' => 'tags.show',
'tags-edit' => 'tags.edit',
'tags-delete' => 'tags.delete',
'transactions-index' => 'transactions.index',
'transactions-create' => 'transactions.create',
'transactions-edit' => 'transactions.edit',
'transactions-delete' => 'transactions.delete',
'transactions-show' => 'transactions.show',
];

View File

@@ -14,7 +14,7 @@ return [
'matchingAmount' => 'Amount',
'lastMatch' => 'Last match',
'expectedMatch' => 'Expected match',
'automatch' => 'Automatch?',
'automatch' => 'Auto match?',
'repeat_freq' => 'Repeats',
'description' => 'Description',
'amount' => 'Amount',

View File

@@ -1,18 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'invalid_domain' => 'Due to security constraints, you cannot register from this domain.',
'file_already_attached' => 'Uploaded file ":name" is already attached to this object.',
'file_attached' => 'Succesfully uploaded file ":name".',
@@ -47,6 +35,7 @@ return [
"in" => "The selected :attribute is invalid.",
"integer" => "The :attribute must be an integer.",
"ip" => "The :attribute must be a valid IP address.",
'json' => 'The :attribute must be a valid JSON string.',
"max.numeric" => "The :attribute may not be greater than :max.",
"max.file" => "The :attribute may not be greater than :max kilobytes.",
"max.string" => "The :attribute may not be greater than :max characters.",
@@ -61,6 +50,7 @@ return [
"regex" => "The :attribute format is invalid.",
"required" => "The :attribute field is required.",
"required_if" => "The :attribute field is required when :other is :value.",
'required_unless' => 'The :attribute field is required unless :other is in :values.',
"required_with" => "The :attribute field is required when :values is present.",
"required_with_all" => "The :attribute field is required when :values is present.",
"required_without" => "The :attribute field is required when :values is not present.",
@@ -71,8 +61,7 @@ return [
"size.string" => "The :attribute must be :size characters.",
"size.array" => "The :attribute must contain :size items.",
"unique" => "The :attribute has already been taken.",
'string' => 'The :attribute must be a string.',
"url" => "The :attribute format is invalid.",
"timezone" => "The :attribute must be a valid zone.",
'attributes' => [],
];

View File

@@ -0,0 +1,60 @@
<?php
return [
'home' => 'Accueil',
// accounts
'cash_accounts' => 'Cash accounts',
'edit_account' => 'Editer le compte : ":name"',
// currencies
'edit_currency' => 'Editer la devise : ";name"',
'delete_currency' => 'Supprimer la devise ":name"',
// piggy banks
'newPiggyBank' => 'Create a new piggy bank',
'edit_piggyBank' => 'Edit piggy bank ":name"',
// top menu
'preferences' => 'Preferences',
'profile' => 'Profil',
'changePassword' => 'Modifier le mot de passe',
// bills
'bills' => 'Factures',
'newBill' => 'Nouvelle facture',
'edit_bill' => 'Editer la facture : ":name"',
'delete_bill' => 'Supprimer la facture ":name"',
// reports
'reports' => 'Rapport',
'monthly_report' => 'Rapport mensuel pour :date',
'monthly_report_shared' => 'Rapport mensuel pour :date (avec les comptes joints)',
'yearly_report' => 'Rapport annuel pour :date',
'yearly_report_shared' => 'Rapport annuel pour :date (avec les comptes joints)',
'budget_report' => 'Rapport budgetaire pour :date',
// search
'searchResult' => 'Resultat de recherche pour ":query"',
// transaction lists.
'withdrawal_list' => 'Dépenses',
'deposit_list' => 'Revenue, Salaire et depots ',
'transfer_list' => 'Transferts',
'transfers_list' => 'Transferts',
// create transactions
'create_withdrawal' => 'Creer un nouveau retrait',
'create_deposit' => 'Create new deposit',
'create_transfer' => 'Creer un nouveau transfert',
// edit transactions
'edit_journal' => 'Editer la transaction ":description"',
'delete_journal' => 'Supprimer la transaction ":description"',
// tags
'tags' => 'Tags',
'createTag' => 'Créer un nouveau tag',
'edit_tag' => 'Editer le tag ":tag"',
'delete_tag' => 'Supprimer le tag ":tag"',
];

View File

@@ -0,0 +1,8 @@
<?php
return [
'locale' => 'fr, French, fr_FR, fr_FR.utf8',
'month' => '%B %Y',
'month_and_day' => '%e %B %Y',
];

View File

@@ -0,0 +1,487 @@
<?php
return [
// general stuff
'test' => 'Vous avez choisi Anglais',
'close' => 'Fermer',
'pleaseHold' => 'Veuillew patienter...',
'actions' => 'Actions',
'edit' => 'Editer',
'delete' => 'Supprimer',
'welcomeBack' => 'What\'s playing?',
'everything' => 'Everything',
'customRange' => 'Custom range',
'apply' => 'Apply',
'cancel' => 'Cancel',
'from' => 'From',
'to' => 'To',
'total_sum' => 'Total sum',
'period_sum' => 'Sum for period',
'showEverything' => 'Show everything',
'never' => 'Never',
'search_results_for' => 'Search results for ":query"',
'bounced_error' => 'The message sent to :email bounced, so no access for you.',
'deleted_error' => 'These credentials do not match our records.',
'general_blocked_error' => 'Your account has been disabled, so you cannot login.',
'removed_amount' => 'Removed :amount',
'added_amount' => 'Added :amount',
'asset_account_role_help' => 'Any extra options resulting from your choice can be set later.',
'Opening balance' => 'Opening balance',
'create_new_stuff' => 'Create new stuff',
'new_withdrawal' => 'New withdrawal',
'new_deposit' => 'New deposit',
'new_transfer' => 'New transfer',
'new_asset_account' => 'New asset account',
'new_expense_account' => 'New expense account',
'new_revenue_account' => 'New revenue account',
'new_budget' => 'New budget',
'new_bill' => 'New bill',
// tags
'store_new_tag' => 'Store new tag',
'update_tag' => 'Update tag',
'no_location_set' => 'No location set.',
'meta_data' => 'Meta data',
'location' => 'Location',
// preferences
'pref_home_screen_accounts' => 'Home screen accounts',
'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?',
'pref_budget_settings' => 'Budget settings',
'pref_budget_settings_help' => 'What\'s the maximum amount of money a budget envelope may contain?',
'pref_view_range' => 'View range',
'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?',
'pref_1D' => 'One day',
'pref_1W' => 'One week',
'pref_1M' => 'One month',
'pref_3M' => 'Three months (quarter)',
'pref_6M' => 'Six months',
'pref_languages' => 'Languages',
'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?',
'pref_save_settings' => 'Save settings',
// profile
'change_your_password' => 'Change your password',
'delete_account' => 'Delete account',
'current_password' => 'Current password',
'new_password' => 'New password',
'new_password_again' => 'New password (again)',
'delete_your_account' => 'Delete your account',
'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, <em>anything</em> you might have saved into Firefly III. It\'ll be GONE.',
'delete_your_account_password' => 'Enter your password to continue.',
'password' => 'Password',
'are_you_sure' => 'Are you sure? You cannot undo this.',
'delete_account_button' => 'DELETE your account',
'invalid_current_password' => 'Invalid current password!',
'password_changed' => 'Password changed!',
'should_change' => 'The idea is to change your password.',
'invalid_password' => 'Invalid password!',
// attachments
'nr_of_attachments' => 'One attachment|:count attachments',
'attachments' => 'Attachments',
'edit_attachment' => 'Edit attachment ":name"',
'update_attachment' => 'Update attachment',
'delete_attachment' => 'Delete attachment ":name"',
'attachment_deleted' => 'Deleted attachment ":name"',
'upload_max_file_size' => 'Maximum file size: :size',
// tour
'prev' => 'Prev',
'next' => 'Next',
'end-tour' => 'End tour',
'pause' => 'Pause',
// transaction index
'title_expenses' => 'Expenses',
'title_withdrawal' => 'Expenses',
'title_revenue' => 'Revenue / income',
'title_deposit' => 'Revenue / income',
'title_transfer' => 'Transferts',
'title_transfers' => 'Transferts',
// csv import
'csv_import' => 'Import CSV file',
'csv' => 'CSV',
'csv_index_title' => 'Upload and import a CSV file',
'csv_define_column_roles' => 'Define column roles',
'csv_map_values' => 'Map found values to existing values',
'csv_download_config' => 'Download CSV configuration file.',
'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions. If you would like to learn more, please click on the <i class="fa fa-question-circle"></i> button at the top of this page.',
'csv_index_beta_warning' => 'This tool is very much in beta. Please proceed with caution',
'csv_header_help' => 'Check this box when your CSV file\'s first row consists of column names, not actual data',
'csv_date_help' => 'Date time format in your CSV. Follow the format like <a href="https://secure.php.net/manual/en/datetime.createfromformat.php#refsect1-datetime.createfromformat-parameters">this page</a> indicates. The default value will parse dates that look like this: 20151201',
'csv_csv_file_help' => 'Select the CSV file here. You can only upload one file at a time',
'csv_csv_config_file_help' => 'Select your CSV import configuration here. If you do not know what this is, ignore it. It will be explained later.',
'csv_upload_button' => 'Start importing CSV',
'csv_column_roles_title' => 'Define column roles',
'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. Please check out the example data if you\'re not sure yourself. Click on the question mark (top right of the page) to learn what each column means. If you want to map imported data onto existing data in Firefly, use the checkbox. The next step will show you what this button does.',
'csv_column_roles_table' => 'Column roles',
'csv_column' => 'CSV column',
'csv_column_name' => 'CSV column name',
'csv_column_example' => 'Column example data',
'csv_column_role' => 'Column contains?',
'csv_do_map_value' => 'Map value?',
'csv_continue' => 'Continue to the next step',
'csv_go_back' => 'Go back to the previous step',
'csv_map_title' => 'Map found values to existing values',
'csv_map_text' => 'This page allows you to map the values from the CSV file to existing entries in your database. This ensures that accounts and other things won\'t be created twice.',
'csv_field_value' => 'Field value from CSV',
'csv_field_mapped_to' => 'Must be mapped to...',
'csv_do_not_map' => 'Do not map this value',
'csv_download_config_title' => 'Download CSV configuration',
'csv_download_config_text' => 'Everything you\'ve just set up can be downloaded as a configuration file. Click the button to do so.',
'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all over again. But, if the import succeeds, it will be easier to upload similar CSV files.',
'csv_do_download_config' => 'Download configuration file.',
'csv_empty_description' => '(empty description)',
'csv_upload_form' => 'CSV upload form',
'csv_index_unsupported_warning' => 'The CSV importer is yet incapable of doing the following:',
'csv_unsupported_map' => 'The importer cannot map the column ":columnRole" to existing values in the database.',
'csv_unsupported_value' => 'The importer does not know how to handle values in columns marked as ":columnRole".',
'csv_cannot_store_value' => 'The importer has not reserved space for columns marked ":columnRole" and will be incapable of processing them.',
'csv_process_title' => 'CSV import finished!',
'csv_process_text' => 'The CSV importer has finished and has processed :rows rows',
'csv_row' => 'Row',
'csv_import_with_errors' => 'There was one error.|There were :errors errors.',
'csv_error_see_logs' => 'Check the log files to see details.',
'csv_process_new_entries' => 'Firefly has created :imported new transaction(s).',
'csv_start_over' => 'Import again',
'csv_to_index' => 'Back home',
'csv_upload_not_writeable' => 'Cannot write to the path mentioned here. Cannot upload',
'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_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_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_specifix_RabobankDescription' => 'Select this when you\'re importing Rabobank CSV export files.',
'csv_specifix_Dummy' => 'Checking this has no effect whatsoever.',
'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.',
'csv_date_parse_error' => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?',
// create new stuff
'create_new_withdrawal' => 'Creer un nouveau retrait',
'create_new_deposit' => 'Create new deposit',
'create_new_transfer' => 'Creer un nouveau transfert',
'create_new_asset' => 'Create new asset account',
'create_new_expense' => 'Create new expense account',
'create_new_revenue' => 'Create new revenue account',
'create_new_piggy_bank' => 'Create new piggy bank',
'create_new_bill' => 'Create new bill',
// currencies
'create_currency' => 'Create a new currency',
'edit_currency' => 'Edit currency ":name"',
'store_currency' => 'Store new currency',
'update_currency' => 'Update currency',
// new user
'submit' => 'Submit',
'getting_started' => 'Getting started',
'to_get_started' => 'To get started with Firefly, please enter your current bank\'s name, and the balance of your checking account:',
'savings_balance_text' => 'If you have a savings account, please enter the current balance of your savings account:',
'cc_balance_text' => 'If you have a credit card, please enter your credit card\'s limit.',
// forms
'mandatoryFields' => 'Mandatory fields',
'optionalFields' => 'Optional fields',
'options' => 'Options',
'something' => 'Something!',
// budgets
'create_new_budget' => 'Create a new budget',
'store_new_budget' => ' Store new budget',
'availableIn' => 'Available in :date',
'transactionsWithoutBudget' => 'Expenses without budget',
'transactionsWithoutBudgetDate' => 'Expenses without budget in :date',
'createBudget' => 'New budget',
'inactiveBudgets' => 'Inactive budgets',
'without_budget_between' => 'Transactions without a budget between :start and :end',
'budget_in_month' => ':name in :month',
'delete_budget' => 'Delete budget ":name"',
'edit_budget' => 'Edit budget ":name"',
'update_amount' => 'Update amount',
'update_budget' => 'Update budget',
// bills
'delete_bill' => 'Delete bill ":name"',
'edit_bill' => 'Edit bill ":name"',
'update_bill' => 'Update bill',
'store_new_bill' => 'Store new bill',
// accounts
'details_for_asset' => 'Details for asset account ":name"',
'details_for_expense' => 'Details for expense account ":name"',
'details_for_revenue' => 'Details for revenue account ":name"',
'details_for_cash' => 'Details for cash account ":name"',
'store_new_asset_account' => 'Store new asset account',
'store_new_expense_account' => 'Store new expense account',
'store_new_revenue_account' => 'Store new revenue account',
'edit_asset_account' => 'Edit asset account ":name"',
'edit_expense_account' => 'Edit expense account ":name"',
'edit_revenue_account' => 'Edit revenue account ":name"',
'delete_asset_account' => 'Delete asset account ":name"',
'delete_expense_account' => 'Delete expense account ":name"',
'delete_revenue_account' => 'Delete revenue account ":name"',
'asset_deleted' => 'Successfully deleted asset account ":name"',
'expense_deleted' => 'Successfully deleted expense account ":name"',
'revenue_deleted' => 'Successfully deleted revenue account ":name"',
'update_asset_account' => 'Update asset account',
'update_expense_account' => 'Update expense account',
'update_revenue_account' => 'Update revenue account',
'make_new_asset_account' => 'Create a new asset account',
'make_new_expense_account' => 'Create a new expense account',
'make_new_revenue_account' => 'Create a new revenue account',
'asset_accounts' => 'Asset accounts',
'expense_accounts' => 'Expense accounts',
'revenue_accounts' => 'Revenue accounts',
'accountExtraHelp_asset' => '',
'accountExtraHelp_expense' => '',
'accountExtraHelp_revenue' => '',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
// categories
'new_category' => 'New category',
'create_new_category' => 'Create a new category',
'without_category' => 'Without a category',
'update_category' => 'Wijzig categorie',
'categories' => 'Categories',
'edit_category' => 'Edit category ":name"',
'no_category' => '(no category)',
'category' => 'Category',
'delete_category' => 'Delete category ":name"',
'store_category' => 'Store new category',
// transactions
'update_withdrawal' => 'Update withdrawal',
'update_deposit' => 'Update deposit',
'update_transfer' => 'Update transfer',
'delete_withdrawal' => 'Delete withdrawal ":description"',
'delete_deposit' => 'Delete deposit ":description"',
'delete_transfer' => 'Delete transfer ":description"',
// new user
'welcome' => 'Welcome to Firefly!',
'createNewAsset' => 'Create a new asset account to get started. This will allow you to create transactions and start your financial management',
'createNewAssetButton' => 'Create new asset account',
// home page
'yourAccounts' => 'Your accounts',
'budgetsAndSpending' => 'Budgets and spending',
'savings' => 'Savings',
'markAsSavingsToContinue' => 'Mark your asset accounts as "Savings account" to fill this panel',
'createPiggyToContinue' => 'Create piggy banks to fill this panel.',
'newWithdrawal' => 'New expense',
'newDeposit' => 'New deposit',
'newTransfer' => 'New transfer',
'moneyIn' => 'Money in',
'moneyOut' => 'Money out',
'billsToPay' => 'Bills to pay',
'billsPaid' => 'Bills paid',
'viewDetails' => 'View details',
'divided' => 'divided',
'toDivide' => 'left to divide',
// menu and titles, should be recycled as often as possible
'toggleNavigation' => 'Toggle navigation',
'currency' => 'Currency',
'preferences' => 'Preferences',
'logout' => 'Logout',
'searchPlaceholder' => 'Search...',
'dashboard' => 'Dashboard',
'currencies' => 'Currencies',
'accounts' => 'Accounts',
'Asset account' => 'Asset account',
'Default account' => 'Asset account',
'Expense account' => 'Expense account',
'Revenue account' => 'Revenue account',
'Initial balance account' => 'Initial balance account',
'budgets' => 'Budgets',
'tags' => 'Tags',
'reports' => 'Reports',
'transactions' => 'Transactions',
'expenses' => 'Expenses',
'income' => 'Revenue / income',
'transfers' => 'Transferts',
'moneyManagement' => 'Money management',
'piggyBanks' => 'Piggy banks',
'bills' => 'Bills',
'createNew' => 'Create new',
'withdrawal' => 'Withdrawal',
'deposit' => 'Deposit',
'account' => 'Account',
'transfer' => 'Transfer',
'Withdrawal' => 'Withdrawal',
'Deposit' => 'Deposit',
'Transfer' => 'Transfer',
'bill' => 'Bill',
'yes' => 'Yes',
'no' => 'No',
'amount' => 'Amount',
'newBalance' => 'New balance',
'overview' => 'Overview',
'saveOnAccount' => 'Save on account',
'unknown' => 'Unknown',
'daily' => 'Daily',
'weekly' => 'Weekly',
'monthly' => 'Monthly',
'quarterly' => 'Quarterly',
'half-year' => 'Every six months',
'yearly' => 'Yearly',
'profile' => 'Profile',
// reports
'report_default' => 'Default financial report for :start until :end',
'quick_link_reports' => 'Quick links',
'quick_link_default_report' => 'Default financial report',
'report_this_month_quick' => 'Current month, all accounts',
'report_this_year_quick' => 'Current year, all accounts',
'report_all_time_quick' => 'All-time, all accounts',
'reports_can_bookmark' => 'Remember that reports can be bookmarked.',
'incomeVsExpenses' => 'Income vs. expenses',
'accountBalances' => 'Account balances',
'balanceStartOfYear' => 'Balance at start of year',
'balanceEndOfYear' => 'Balance at end of year',
'balanceStartOfMonth' => 'Balance at start of month',
'balanceEndOfMonth' => 'Balance at end of month',
'balanceStart' => 'Balance at start of period',
'balanceEnd' => 'Balance at end of period',
'reportsOwnAccounts' => 'Reports for your own accounts',
'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts',
'splitByAccount' => 'Split by account',
'balancedByTransfersAndTags' => 'Balanced by transfers and tags',
'coveredWithTags' => 'Covered with tags',
'leftUnbalanced' => 'Left unbalanced',
'expectedBalance' => 'Expected balance',
'outsideOfBudgets' => 'Outside of budgets',
'leftInBudget' => 'Left in budget',
'sumOfSums' => 'Sum of sums',
'noCategory' => '(no category)',
'notCharged' => 'Not charged (yet)',
'inactive' => 'Inactive',
'difference' => 'Difference',
'in' => 'In',
'out' => 'Out',
'topX' => 'top :number',
'showTheRest' => 'Show everything',
'hideTheRest' => 'Show only the top :number',
'sum_of_year' => 'Sum of year',
'sum_of_years' => 'Sum of years',
'average_of_year' => 'Average of year',
'average_of_years' => 'Average of years',
'categories_earned_in_year' => 'Categories (by earnings)',
'categories_spent_in_year' => 'Categories (by spendings)',
'report_type' => 'Report type',
'report_type_default' => 'Default financial report',
'report_included_accounts' => 'Included accounts',
'report_date_range' => 'Date range',
'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.',
'report_preset_ranges' => 'Pre-set ranges',
'shared' => 'Shared',
// charts
'dayOfMonth' => 'Day of the month',
'month' => 'Month',
'budget' => 'Budget',
'spent' => 'Spent',
'earned' => 'Earned',
'overspent' => 'Overspent',
'left' => 'Left',
'noBudget' => '(no budget)',
'maxAmount' => 'Maximum amount',
'minAmount' => 'Minumum amount',
'billEntry' => 'Current bill entry',
'name' => 'Name',
'date' => 'Date',
'paid' => 'Paid',
'unpaid' => 'Unpaid',
'day' => 'Day',
'budgeted' => 'Budgeted',
'period' => 'Period',
'balance' => 'Balance',
'summary' => 'Summary',
'sum' => 'Sum',
'average' => 'Average',
'balanceFor' => 'Balance for :name',
// piggy banks
'piggy_bank' => 'Piggy bank',
'new_piggy_bank' => 'Create new piggy bank',
'store_piggy_bank' => 'Store new piggy bank',
'account_status' => 'Account status',
'left_for_piggy_banks' => 'Left for piggy banks',
'sum_of_piggy_banks' => 'Sum of piggy banks',
'saved_so_far' => 'Saved so far',
'left_to_save' => 'Left to save',
'add_money_to_piggy_title' => 'Add money to piggy bank ":name"',
'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"',
'add' => 'Add',
'remove' => 'Remove',
'max_amount_add' => 'The maximum amount you can add is',
'max_amount_remove' => 'The maximum amount you can remove is',
'update_piggy_button' => 'Update piggy bank',
'update_piggy_title' => 'Update piggy bank ":name"',
'details' => 'Details',
'events' => 'Events',
'target_amount' => 'Target amount',
'start_date' => 'Start date',
'target_date' => 'Target date',
'no_target_date' => 'No target date',
'todo' => 'to do',
'table' => 'Table',
'piggy_bank_not_exists' => 'Piggy bank no longer exists.',
'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.',
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
'delete_piggy_bank' => 'Delete piggy bank ":name"',
// tags
'regular_tag' => 'Just a regular tag.',
'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.',
'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.',
'delete_tag' => 'Supprimer le tag ":tag"',
'new_tag' => 'Make new tag',
'edit_tag' => 'Editer le tag ":tag"',
'no_year' => 'No year set',
'no_month' => 'No month set',
'tag_title_nothing' => 'Default tags',
'tag_title_balancingAct' => 'Balancing act tags',
'tag_title_advancePayment' => 'Advance payment tags',
'tags_introduction' => 'Usually tags are singular words, designed to quickly band items together using things like <span class="label label-info">expensive</span>, <span class="label label-info">bill</span> or <span class="label label-info">for-party</span>. In Firefly III, tags can have more properties such as a date, description and location. This allows you to join transactions together in a more meaningful way. For example, you could make a tag called <span class="label label-success">Christmas dinner with friends</span> and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion, perhaps with multiple transactions.',
'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible. ',
'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.',
];

View File

@@ -0,0 +1,96 @@
<?php
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',
'repeat_freq' => 'Repeats',
'account_from_id' => 'From account',
'account_to_id' => 'To account',
'account_id' => 'Asset account',
'budget_id' => 'Budget',
'openingBalance' => 'Opening balance',
'tagMode' => 'Tag mode',
'tagPosition' => 'Tag location',
'virtualBalance' => 'Virtual balance',
'longitude_latitude' => 'Location',
'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',
'amount' => 'Amount',
'date' => 'Date',
'category' => 'Category',
'tags' => 'Tags',
'deletePermanently' => 'Delete permanently',
'cancel' => 'Cancel',
'targetdate' => 'Target date',
'tag' => 'Tag',
'under' => 'Under',
'symbol' => 'Symbol',
'code' => 'Code',
'iban' => 'IBAN',
'csv' => 'CSV file',
'has_headers' => 'Headers',
'date_format' => 'Date format',
'csv_config' => 'CSV import configuration',
'specifix' => 'Bank- or file specific fixes',
'csv_import_account' => 'Default import account',
'attachments[]' => 'Attachments',
'store_new_withdrawal' => 'Store new withdrawal',
'store_new_deposit' => 'Store new deposit',
'store_new_transfer' => 'Store new transfer',
'add_new_withdrawal' => 'Add a new withdrawal',
'add_new_deposit' => 'Add a new deposit',
'add_new_transfer' => 'Add a new transfer',
'noPiggybank' => '(no piggy bank)',
'noBudget' => '(no budget)',
'title' => 'Title',
'notes' => 'Notes',
'filename' => 'File name',
'mime' => 'Mime type',
'size' => 'Size',
'delete_account' => 'Delete account ":name"',
'delete_bill' => 'Supprimer la facture ":name"',
'delete_budget' => 'Delete budget ":name"',
'delete_category' => 'Delete category ":name"',
'delete_currency' => 'Delete currency ":name"',
'delete_journal' => 'Delete transaction with description ":description"',
'delete_attachment' => 'Delete attachment ":name"',
'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?',
'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?',
'bill_areYouSure' => 'Are you sure you want to delete the bill named ":name"?',
'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?',
'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?',
'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?',
'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?',
'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?',
'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?',
'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.',
'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.',
'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.',
'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.',
'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.',
'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.',
'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.',
];

View File

@@ -2,22 +2,22 @@
return [
// tour!
'main-content-title' => 'Welcome to Firefly III',
'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.',
'sidebar-toggle-title' => 'Sidebar to create stuff',
'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!',
'account-menu-title' => 'All your accounts',
'account-menu-text' => 'Here you can find all the accounts you\'ve made.',
'budget-menu-title' => 'Budgets',
'budget-menu-text' => 'Use this page to organise your finances and limit spending.',
'report-menu-title' => 'Reports',
'report-menu-text' => 'Check this out when you want a solid overview of your fiances.',
'transaction-menu-title' => 'Transactions',
'transaction-menu-text' => 'All transactions you\'ve created can be found here.',
'option-menu-title' => 'Options',
'option-menu-text' => 'This is pretty self-explanatory.',
'main-content-end-title' => 'The end!',
'main-content-end-text' => 'Remember that every page has a small question mark at the right top. Click it to get help about the page you\'re on.',
'main-content-title' => 'Welcome to Firefly III',
'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.',
'sidebar-toggle-title' => 'Sidebar to create stuff',
'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!',
'account-menu-title' => 'All your accounts',
'account-menu-text' => 'Here you can find all the accounts you\'ve made.',
'budget-menu-title' => 'Budgets',
'budget-menu-text' => 'Use this page to organise your finances and limit spending.',
'report-menu-title' => 'Rapport',
'report-menu-text' => 'Check this out when you want a solid overview of your fiances.',
'transaction-menu-title' => 'Transactions',
'transaction-menu-text' => 'All transactions you\'ve created can be found here.',
'option-menu-title' => 'Options',
'option-menu-text' => 'This is pretty self-explanatory.',
'main-content-end-title' => 'The end!',
'main-content-end-text' => 'Remember that every page has a small question mark at the right top. Click it to get help about the page you\'re on.',
'register' => 'register',

View File

@@ -0,0 +1,33 @@
<?php
// all table headers.
return [
'name' => 'Name',
'role' => 'Role',
'currentBalance' => 'Current balance',
'active' => 'Is active?',
'lastActivity' => 'Last activity',
'balanceDiff' => 'Balance difference between :start and :end',
'matchedOn' => 'Matched on',
'matchesOn' => 'Matched on',
'matchingAmount' => 'Amount',
'lastMatch' => 'Last match',
'expectedMatch' => 'Expected match',
'automatch' => 'Auto match?',
'repeat_freq' => 'Repeats',
'description' => 'Description',
'amount' => 'Amount',
'date' => 'Date',
'from' => 'From',
'to' => 'To',
'budget' => 'Budget',
'category' => 'Category',
'bill' => 'Bill',
'withdrawal' => 'Withdrawal',
'deposit' => 'Deposit',
'transfer' => 'Transfer',
'type' => 'Type',
'completed' => 'Completed',
'iban' => 'IBAN',
];

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];

View File

@@ -0,0 +1,21 @@
<?php
return [
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
"password" => "Passwords must be at least six characters and match the confirmation.",
"user" => "We can't find a user with that e-mail address.",
"token" => "This password reset token is invalid.",
"sent" => "We have e-mailed your password reset link!",
"reset" => "Your password has been reset!",
'blocked' => 'Nice try though.'
];

View File

@@ -0,0 +1,78 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| such as the size rules. Feel free to tweak each of these messages.
|
*/
'invalid_domain' => 'Due to security constraints, you cannot register from this domain.',
'file_already_attached' => 'Uploaded file ":name" is already attached to this object.',
'file_attached' => 'Succesfully uploaded file ":name".',
'file_invalid_mime' => 'File ":name" is of type ":mime" which is not accepted as a new upload.',
'file_too_large' => 'File ":name" is too large.',
'accepted' => 'Le champ :attribute doit être accepté.',
"unique_for_user" => "There already is an entry with this :attribute.",
'unique_object_for_user' => 'This name is already in use',
'unique_account_for_user' => 'This account name is already in use',
'active_url' => "Le champ :attribute n'est pas une URL valide.",
'after' => 'Le champ :attribute doit être une date postérieure au :date.',
'alpha' => 'Le champ :attribute doit seulement contenir des lettres.',
'alpha_dash' => 'Le champ :attribute doit seulement contenir des lettres, des chiffres et des tirets.',
'alpha_num' => 'Le champ :attribute doit seulement contenir des chiffres et des lettres.',
'array' => 'Le champ :attribute doit être un tableau.',
'before' => 'Le champ :attribute doit être une date antérieure au :date.',
'between.numeric' => 'La valeur de :attribute doit être comprise entre :min et :max.',
'between.file' => 'Le fichier :attribute doit avoir une taille entre :min et :max kilo-octets.',
'between.string' => 'Le texte :attribute doit avoir entre :min et :max caractères.',
'between.array' => 'Le tableau :attribute doit avoir entre :min et :max éléments.',
'boolean' => 'Le champ :attribute doit être vrai ou faux.',
'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.',
'date' => "Le champ :attribute n'est pas une date valide.",
'date_format' => 'Le champ :attribute ne correspond pas au format :format.',
'different' => 'Les champs :attribute et :other doivent être différents.',
'digits' => 'Le champ :attribute doit avoir :digits chiffres.',
'digits_between' => 'Le champ :attribute doit avoir entre :min et :max chiffres.',
'email' => 'Le champ :attribute doit être une adresse email valide.',
'exists' => 'Le champ :attribute sélectionné est invalide.',
'filled' => 'Le champ :attribute est obligatoire.',
'image' => 'Le champ :attribute doit être une image.',
'in' => 'Le champ :attribute est invalide.',
'integer' => 'Le champ :attribute doit être un entier.',
'ip' => 'Le champ :attribute doit être une adresse IP valide.',
'json' => 'Le champ :attribute doit être un document JSON valide.',
'max.numeric' => 'La valeur de :attribute ne peut être supérieure à :max.',
'max.file' => 'Le fichier :attribute ne peut être plus gros que :max kilo-octets.',
'max.string' => 'Le texte de :attribute ne peut contenir plus de :max caractères.',
'max.array' => 'Le tableau :attribute ne peut avoir plus de :max éléments.',
'mimes' => 'Le champ :attribute doit être un fichier de type : :values.',
'min.numeric' => 'La valeur de :attribute doit être supérieure à :min.',
'min.file' => 'Le fichier :attribute doit être plus gros que :min kilo-octets.',
'min.string' => 'Le texte :attribute doit contenir au moins :min caractères.',
'min.array' => 'Le tableau :attribute doit avoir au moins :min éléments.',
'not_in' => "Le champ :attribute sélectionné n'est pas valide.",
'numeric' => 'Le champ :attribute doit contenir un nombre.',
'regex' => 'Le format du champ :attribute est invalide.',
'required' => 'Le champ :attribute est obligatoire.',
'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.',
'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.',
'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.',
'required_with_all' => 'Le champ :attribute est obligatoire quand :values est présent.',
'required_without' => "Le champ :attribute est obligatoire quand :values n'est pas présent.",
'required_without_all' => "Le champ :attribute est requis quand aucun de :values n'est présent.",
'same' => 'Les champs :attribute et :other doivent être identiques.',
'size.numeric' => 'La valeur de :attribute doit être :size.',
'size.file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.',
'size.string' => 'Le texte de :attribute doit contenir :size caractères.',
'size.array' => 'Le tableau :attribute doit contenir :size éléments.',
'string' => 'Le champ :attribute doit être une chaîne de caractères.',
'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.',
'unique' => 'La valeur du champ :attribute est déjà utilisée.',
'url' => "Le format de l'URL de :attribute n'est pas valide.",
];

View File

@@ -1,516 +0,0 @@
<?php
return [
// general stuff:
'test' => 'Nederlands geselecteerd!',
'close' => 'Sluiten',
'pleaseHold' => 'Momentje...',
'actions' => 'Acties',
'edit' => 'Wijzig',
'delete' => 'Verwijder',
'welcomeBack' => 'Hoe staat het er voor?',
'everything' => 'Alles',
'customRange' => 'Zelf bereik kiezen',
'apply' => 'Go',
'cancel' => 'Annuleren',
'from' => 'Van',
'to' => 'Tot',
'total_sum' => 'Totale som',
'period_sum' => 'Som van periode',
'showEverything' => 'Laat alles zien',
'never' => 'Nooit',
'search_results_for' => 'Zoekresultaten voor ":query"',
'bounced_error' => 'Het emailtje naar :email kwam nooit aan.',
'deleted_error' => 'Deze gegevens zijn niet correct.',
'general_blocked_error' => 'Je account is uitgeschakeld, je kan helaas niet inloggen.',
'removed_amount' => ':amount weggehaald',
'added_amount' => ':amount toegevoegd',
'asset_account_role_help' => 'Voorkeuren die voortkomen uit je keuze hier kan je later aangeven.',
'Opening balance' => 'Startsaldo',
'create_new_stuff' => 'Nieuw',
'new_withdrawal' => 'Nieuwe uitgave',
'new_deposit' => 'Nieuwe inkomsten',
'new_transfer' => 'Nieuwe overschrijving',
'new_asset_account' => 'Nieuwe betaalrekening',
'new_expense_account' => 'Nieuwe crediteur',
'new_revenue_account' => 'Nieuwe debiteur',
'new_budget' => 'Nieuw budget',
'new_bill' => 'Nieuw contract',
// tags
'store_new_tag' => 'Sla tag op',
'update_tag' => 'Sla wijzigingen op',
'no_location_set' => 'Zonder plaats',
'location' => 'Plaats',
'meta_data' => 'Metagegevens',
// preferences
'pref_home_screen_accounts' => 'Voorpaginarekeningen',
'pref_home_screen_accounts_help' => 'Welke betaalrekeningen wil je op de voorpagina zien?',
'pref_budget_settings' => 'Budgetinstellingen',
'pref_budget_settings_help' => 'Wat is het maximale bedrag dat je voor een budget kan instellen?',
'pref_view_range' => 'Bereik',
'pref_view_range_help' => 'Sommige pagina\'s springen naar een standaard bereik. Welk bereik heeft jouw voorkeur?',
'pref_1D' => 'Eén dag',
'pref_1W' => 'Eén week',
'pref_1M' => 'Eén maand',
'pref_3M' => 'Drie maanden (kwartaal)',
'pref_6M' => 'Zes maanden',
'pref_languages' => 'Talen',
'pref_languages_help' => 'Firefly III ondersteunt meerdere talen. Welke heeft jouw voorkeur?',
'pref_save_settings' => 'Instellingen opslaan',
// profile:
'change_your_password' => 'Verander je wachtwoord',
'delete_account' => 'Verwijder je account',
'current_password' => 'Huidige wachtwoord',
'new_password' => 'Nieuw wachtwoord',
'new_password_again' => 'Nieuw wachtwoord (bevestiging)',
'delete_your_account' => 'Verwijder je account',
'delete_your_account_help' => 'Als je je account verwijderd worden ook al je rekeningen, transacties en <em>alle andere zaken</em> verwijderd.' .
' Alles is dan WEG.',
'delete_your_account_password' => 'Voer je wachtwoord in om door te gaan.',
'password' => 'Wachtwoord',
'are_you_sure' => 'Zeker weten? Je kan niet meer terug!',
'delete_account_button' => 'VERWIJDER je account',
'invalid_current_password' => 'Huidige wachtwoord is niet geldig!',
'password_changed' => 'Je wachtwoord is veranderd!',
'should_change' => 'Vul ook echt een ander wachtwoord in.',
'invalid_password' => 'Ongeldig wachtwoord!',
// attach
'nr_of_attachments' => 'Eén bijlage|:count bijlagen',
'attachments' => 'Bijlagen',
'edit_attachment' => 'Wijzig bijlage ":name"',
'update_attachment' => 'Update bijlage',
'delete_attachment' => 'Verwijder bijlage ":name"',
'attachment_deleted' => 'Bijlage ":name" verwijderd',
'upload_max_file_size' => 'Maximale grootte: :size',
// tour:
'prev' => 'Vorige',
'next' => 'Volgende',
'end-tour' => 'Einde',
'pause' => 'Pauze',
// transaction index
'title_expenses' => 'Uitgaven',
'title_withdrawal' => 'Uitgaven',
'title_revenue' => 'Inkomsten',
'title_deposit' => 'Inkomsten',
'title_transfer' => 'Overboekingen',
'title_transfers' => 'Overboekingen',
// csv import:
'csv_import' => 'Importeer CSV-bestand',
'csv' => 'CSV',
'csv_index_title' => 'Upload en importeer een kommagescheiden tekstbestand',
'csv_define_column_roles' => 'Bepaal kolominhoud',
'csv_map_values' => 'Leg relaties met kolomwaardes',
'csv_download_config' => 'Download CSV configuratiebestand.',
'csv_index_text' => 'Met deze (en de komende) pagina\'s kan je kommagescheiden tekstbestanden importeren. Deze tool is gebaseerd '
. 'op de prachtige tool van <a href="https://www.atlassian.com/">Atlassian</a>. Om te beginnen selecteer'
. ' je jouw tekstbestand bij "CSV-bestand". '
. 'Als je hulp nodig hebt, klik dan op het <i class="fa fa-question-circle"></i>-icoontje rechtsboven.',
'csv_index_beta_warning' => 'Deze tool is nog erg experimenteel. Wees dus voorzichtig.',
'csv_header_help' => 'Zet hier een vinkje als de eerste rij van je tekstbestand bestaat uit kolomnamen,'
. 'en niet uit daadwerkelijke gegevens.',
'csv_date_help' => 'Het gebruikte datumformaat in jouw bestand. Gebruik het formaat zoals <a href="https://secure.'
. 'php.net/manual/en/datetime.createfromformat.php#refsect1-datetime.createfromformat-parameters">deze'
. ' pagina</a> het uitlegt (Engels). Het standaardformaat kan omgaan met data zoals deze: ' . date('Ymd'),
'csv_csv_file_help' => 'Voer hier je kommagescheiden tekstbestand in. Je kan er maar één tegelijkertijd invoeren.',
'csv_csv_config_file_help' => 'Voer hier je configuratiebestand in. Als je deze niet hebt, geen zorgen. Latere stappen leggen dit uit.',
'csv_upload_button' => 'Begin de import',
'csv_column_roles_title' => 'Bepaal de inhoud van elke kolom',
'csv_column_roles_text' => 'Firefly kan niet automatisch ontdekken wat elke kolom betekent. Je moet het zelf aangeven. Gebruik de'
. ' voorbeeldgegevens als je het ook niet zeker weet. Klik op het <i class="fa fa-question-circle"></i>-icoontje '
. 'rechtsboven om te ontdekken wat elke kolomsoort precies is. Als de kolominhoud een directe'
. ' relatie heeft met gegevens'
. ' die al in Firefly staan, gebruik dan het vinkje. Tijdens de volgende stap komt Firefly hier dan op terug.',
'csv_column_roles_table' => 'Kolominhoud',
'csv_column' => 'CSV-kolom',
'csv_column_name' => 'CSV-kolomnaam',
'csv_column_example' => 'Voorbeeldgegevens',
'csv_column_role' => 'Kolom bevat?',
'csv_do_map_value' => 'Directe relatie?',
'csv_continue' => 'Naar de volgende stap',
'csv_go_back' => 'Terug naar de vorige stap',
'csv_map_title' => 'Leg relaties met kolomwaardes',
'csv_map_text' => 'Sommige kolommen bevatten waardes die misschien al in Firefly bestaan. Selecteer hier de juiste combinaties'
. 'zodat het importeren netjes aansluit bij je huidige gegevens.',
'csv_field_value' => 'Veldwaarde',
'csv_field_mapped_to' => 'Is gelijk aan',
'csv_do_not_map' => 'Geen relatie',
'csv_download_config_title' => 'Download importconfiguratie',
'csv_download_config_text' => 'Firefly is klaar om je bestand te importeren. De instellingen en selecties die je zojuist hebt gemaakt' .
' kan je downloaden en opslaan. Bij de volgende keer kan je dit bestand ook uploaden. Als je' .
' kommagescheiden bestand dezelfde indeling heeft, zullen alle selecties goed staan. Dat scheelt weer!',
'csv_more_information_text' => 'Ook als het importeren fout gaat is dit bestand handig. Na het importeren krijg je nogmaals' .
' de gelegenheid dit bestand te downloaden.',
'csv_do_download_config' => 'Download het configuratiebestand',
'csv_empty_description' => '(geen beschrijving)',
'csv_upload_form' => 'CSV upload formulier',
'csv_index_unsupported_warning' => 'Het volgende wordt nog niet ondersteund:',
'csv_unsupported_map' => 'The importer cannot map the column ":columnRole" to existing values in the database.',
'csv_unsupported_value' => 'The importer does not know how to handle values in columns marked as ":columnRole".',
'csv_cannot_store_value' => 'The importer has not reserved space for columns marked ":columnRole" and will be incapable of processing them.',
'csv_process_title' => 'Het importeren is klaar',
'csv_process_text' => ':rows rijen zijn verwerkt.',
'csv_row' => 'Rij',
'csv_import_with_errors' => 'Er was één fout. Deze foutmelding is mogelijk in het Engels.|Er zijn :errors fouten opgetreden. De foutmeldingen'
. ' zijn mogelijk in het Engels.',
'csv_error_see_logs' => 'De logboeken bevatten mogelijk meer details.',
'csv_process_new_entries' => 'Firefly heeft :imported nieuwe transactie(s) gemaakt.',
'csv_start_over' => 'Begin opnieuw',
'csv_to_index' => 'Naar de index',
'csv_upload_not_writeable' => 'Kan niet naar onderstaand pad schrijven. Kan dus niet uploaden.',
'csv_column__ignore' => '(negeer deze kolom)',
'csv_column_account-iban' => 'Betaalrekening (IBAN)',
'csv_column_account-id' => 'Betaalrekening (ID gelijk aan Firefly)',
'csv_column_account-name' => 'Betaalrekeningnaam',
'csv_column_amount' => 'Bedrag',
'csv_column_bill-id' => 'Contract (ID gelijk aan Firefly)',
'csv_column_bill-name' => 'Contractnaam',
'csv_column_budget-id' => 'Budget (ID gelijk aan Firefly)',
'csv_column_budget-name' => 'Budgetnaam',
'csv_column_category-id' => 'Categorie (ID gelijk aan Firefly)',
'csv_column_category-name' => 'Categorienaam',
'csv_column_currency-code' => 'Valutacode (ISO 4217)',
'csv_column_currency-id' => 'Valuta (ID gelijk aan Firefly)',
'csv_column_currency-name' => 'Valutanaam',
'csv_column_currency-symbol' => 'Valuta',
'csv_column_date-rent' => 'Datum (renteberekening)',
'csv_column_date-transaction' => 'Datum (transactie)',
'csv_column_description' => 'Beschrijving',
'csv_column_opposing-iban' => 'Tegenrekening (IBAN)',
'csv_column_opposing-id' => 'Tegenrekening (ID gelijk aan Firefly)',
'csv_column_opposing-name' => 'Tegenrekeningnaam',
'csv_column_rabo-debet-credit' => 'Rabobankspecifiek bij/af indicator',
'csv_column_sepa-ct-id' => 'SEPA transactienummer',
'csv_column_sepa-ct-op' => 'SEPA tegenrekeningnummer',
'csv_column_sepa-db' => 'SEPA "direct debet"-nummer',
'csv_column_tags-comma' => 'Tags (kommagescheiden)',
'csv_column_tags-space' => 'Tags (spatiegescheiden)',
'csv_specifix_RabobankDescription' => 'Vink dit aan als je Rabobank bestanden importeert.',
'csv_specifix_Dummy' => 'Dit vinkje doet niks (dummy).',
'csv_import_account_help' => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.',
'csv_date_parse_error' => 'Kan geen chocola maken van ":value" (met hulp van configuratie ":format").' .
' Weet je zeker dat je CSV bestand geen fouten bevat?',
// create new stuff:
'create_new_withdrawal' => 'Nieuwe uitgave',
'create_new_deposit' => 'Nieuwe inkomsten',
'create_new_transfer' => 'Nieuwe overschrijving',
'create_new_asset' => 'Nieuwe betaalrekening',
'create_new_expense' => 'Nieuwe crediteur',
'create_new_revenue' => 'Nieuwe debiteur',
'create_new_piggy_bank' => 'Nieuw spaarpotje',
'create_new_bill' => 'Nieuw contract',
// currencies:
'create_currency' => 'Voeg nieuwe valuta toe',
'edit_currency' => 'Wijzig valuta ":name"',
'store_currency' => 'Sla nieuwe valuta op',
'update_currency' => 'Wijzig valuta',
// new user:
'submit' => 'Invoeren',
'getting_started' => 'Aan de start!',
'to_get_started' => 'Begin met de naam van de bank waar je je betaalrekening hebt, en het saldo van die rekening.',
'savings_balance_text' => 'Voer ook het saldo van je spaarrekening in, als je die hebt.',
'cc_balance_text' => 'Als je een credit card hebt, vul dan hier je credit cardlimiet in.',
// forms:
'mandatoryFields' => 'Verplichte velden',
'optionalFields' => 'Optionele velden',
'options' => 'Opties',
'something' => 'Iets!',
// budgets:
'create_new_budget' => 'Maak een nieuw budget',
'store_new_budget' => 'Sla nieuw budget op',
'availableIn' => 'Beschikbaar in :date',
'transactionsWithoutBudget' => 'Uitgaven zonder budget',
'transactionsWithoutBudgetDate' => 'Uitgaven zonder budget in :date',
'createBudget' => 'Maak nieuw budget',
'inactiveBudgets' => 'Inactieve budgetten',
'without_budget_between' => 'Transacties zonder budget tussen :start en :end',
'budget_in_month' => ':name in :month',
'delete_budget' => 'Verwijder budget ":name"',
'edit_budget' => 'Wijzig budget ":name"',
'update_amount' => 'Bedrag bijwerken',
'update_budget' => 'Budget bijwerken',
// bills:
'delete_bill' => 'Verwijder contract ":name"',
'update_bill' => 'Wijzig contract',
'edit_bill' => 'Wijzig contract ":name"',
'store_new_bill' => 'Sla nieuw contract op',
// accounts:
'details_for_asset' => 'Overzicht voor betaalrekening ":name"',
'details_for_expense' => 'Overzicht voor crediteur ":name"',
'details_for_revenue' => 'Overzicht voor debiteur ":name"',
'details_for_cash' => 'Overzicht voor contant geldrekening ":name"',
'store_new_asset_account' => 'Sla nieuwe betaalrekening op',
'store_new_expense_account' => 'Sla nieuwe crediteur op',
'store_new_revenue_account' => 'Sla nieuwe debiteur op',
'edit_asset_account' => 'Wijzig betaalrekening ":name"',
'edit_expense_account' => 'Wijzig crediteur ":name"',
'edit_revenue_account' => 'Wijzig debiteur ":name"',
'delete_asset_account' => 'Verwijder betaalrekening ":name"',
'delete_expense_account' => 'Verwijder crediteur ":name"',
'delete_revenue_account' => 'Verwijder debiteur ":name"',
'asset_deleted' => 'Betaalrekening ":name" is verwijderd.',
'expense_deleted' => 'Crediteur ":name" is verwijderd.',
'revenue_deleted' => 'Debiteur ":name" is verwijderd.',
'update_asset_account' => 'Wijzig betaalrekening',
'update_expense_account' => 'Wijzig crediteur',
'update_revenue_account' => 'Wijzig debiteur',
'make_new_asset_account' => 'Nieuwe betaalrekening',
'make_new_expense_account' => 'Nieuwe crediteur',
'make_new_revenue_account' => 'Nieuwe debiteur',
'asset_accounts' => 'Betaalrekeningen',
'expense_accounts' => 'Crediteuren',
'revenue_accounts' => 'Debiteuren',
'account_type' => 'Account type',
// some extra help:
'accountExtraHelp_asset' => '',
'accountExtraHelp_expense' =>
'Een crediteur is een persoon of een bedrijf waar je geld aan moet betalen. Je staat bij ze in het krijt. Een verwarrende' .
' term misschien, maar zo werkt het nou eenmaal. De supermarkt, je huurbaas of de bank zijn crediteuren. Jouw ' .
'geld (krediet) gaat naar hen toe. De term komt uit de wereld van de boekhouding. De uitgaves die je hier ziet zijn ' .
'positief, want je kijkt uit hun perspectief. Zodra jij afrekent in een winkel, komt het geld er bij hen bij (positief).',
'accountExtraHelp_revenue' => 'Als je geld krijgt van een bedrijf of een persoon is dat een debiteur. ' .
'Dat kan salaris zijn, of een andere betaling. ' .
' Ze hebben een schuld (debet) aan jou. De term komt uit de wereld van de boekhouding.' .
' De inkomsten die je hier ziet zijn negatief, want je kijkt uit hun perspectief. Zodra een debiteur geld naar jou ' .
'overmaakt gaat het er bij hen af (negatief).',
'save_transactions_by_moving' => 'Bewaar deze transacties door ze aan een andere rekening te koppelen:',
// categories:
'new_category' => 'Nieuwe categorie',
'create_new_category' => 'Nieuwe categorie',
'without_category' => 'Zonder categorie',
'update_category' => 'Wijzig categorie',
'edit_category' => 'Wijzig categorie ":name"',
'categories' => 'Categorieën',
'no_category' => '(geen categorie)',
'category' => 'Categorie',
'delete_category' => 'Verwijder categorie ":name"',
'store_category' => 'Sla nieuwe categorie op',
// transactions:
'update_withdrawal' => 'Wijzig uitgave',
'update_deposit' => 'Wijzig inkomsten',
'update_transfer' => 'Wijzig overschrijving',
'delete_withdrawal' => 'Verwijder uitgave ":description"',
'delete_deposit' => 'Verwijder inkomsten ":description"',
'delete_transfer' => 'Verwijder overschrijving ":description"',
// new user:
'welcome' => 'Welkom bij Firefly!',
'createNewAsset' => 'Maak om te beginnen een nieuwe betaalrekening. Dit is je start van je financiële beheer.',
'createNewAssetButton' => 'Maak een nieuwe betaalrekening',
// home page:
'yourAccounts' => 'Je betaalrekeningen',
'budgetsAndSpending' => 'Budgetten en uitgaven',
'savings' => 'Sparen',
'markAsSavingsToContinue' => 'Om hier wat te zien stel je je betaalrekeningen in als "spaarrekening".',
'createPiggyToContinue' => 'Maak spaarpotjes om hier iets te zien.',
'newWithdrawal' => 'Nieuwe uitgave',
'newDeposit' => 'Nieuwe inkomsten',
'newTransfer' => 'Nieuwe overschrijving',
'moneyIn' => 'Inkomsten',
'moneyOut' => 'Uitgaven',
'billsToPay' => 'Openstaande contracten',
'billsPaid' => 'Betaalde contracten',
'viewDetails' => 'Meer info',
'divided' => 'verdeeld',
'toDivide' => 'te verdelen',
// menu and titles, should be recycled as often as possible:
'toggleNavigation' => 'Navigatie aan of uit',
'currency' => 'Valuta',
'preferences' => 'Voorkeuren',
'logout' => 'Uitloggen',
'searchPlaceholder' => 'Zoeken...',
'dashboard' => 'Dashboard',
'currencies' => 'Valuta',
'accounts' => 'Rekeningen',
'Asset account' => 'Betaalrekening',
'Default account' => 'Betaalrekening',
'Expense account' => 'Crediteur',
'Revenue account' => 'Debiteur',
'Initial balance account' => 'Startbalansrekening',
'budgets' => 'Budgetten',
'tags' => 'Tags',
'reports' => 'Overzichten',
'transactions' => 'Transacties',
'expenses' => 'Uitgaven',
'income' => 'Inkomsten',
'transfers' => 'Overschrijvingen',
'moneyManagement' => 'Geldbeheer',
'piggyBanks' => 'Spaarpotjes',
'bills' => 'Contracten',
'createNew' => 'Nieuw',
'withdrawal' => 'Uitgave',
'deposit' => 'Inkomsten',
'account' => 'Rekening',
'transfer' => 'Overschrijving',
'Withdrawal' => 'Uitgave',
'Deposit' => 'Inkomsten',
'Transfer' => 'Overschrijving',
'profile' => 'Profiel',
'bill' => 'Contract',
'yes' => 'Ja',
'no' => 'Nee',
'amount' => 'Bedrag',
'newBalance' => 'Nieuw saldo',
'overview' => 'Overzicht',
'saveOnAccount' => 'Sparen op rekening',
'unknown' => 'Onbekend',
'daily' => 'Dagelijks',
'weekly' => 'Wekelijks',
'monthly' => 'Maandelijks',
'quarterly' => 'Elk kwartaal',
'half-year' => 'Elk half jaar',
'yearly' => 'Jaarlijks',
'sum_of_year' => 'Som van jaar',
'average_of_year' => 'Gemiddelde in jaar',
'sum_of_years' => 'Som van jaren',
'average_of_years' => 'Gemiddelde in jaren',
// reports:
'report_default' => 'Standaard financieel rapport (:start tot :end)',
'quick_link_reports' => 'Snelle links',
'quick_link_default_report' => 'Standaard financieel rapport',
'report_this_month_quick' => 'Deze maand, alle rekeningen',
'report_this_year_quick' => 'Dit jaar, alle rekeningen',
'report_all_time_quick' => 'Gehele periode, alle rekeningen',
'reports_can_bookmark' => 'Je kan rapporten aan je favorieten toevoegen.',
'incomeVsExpenses' => 'Inkomsten tegenover uitgaven',
'accountBalances' => 'Rekeningsaldi',
'balanceStartOfYear' => 'Saldo aan het begin van het jaar',
'balanceEndOfYear' => 'Saldo aan het einde van het jaar',
'balanceStartOfMonth' => 'Saldo aan het begin van de maand',
'balanceEndOfMonth' => 'Saldo aan het einde van de maand',
'balanceStart' => 'Saldo aan het begin van de periode',
'balanceEnd' => 'Saldo aan het einde van de periode',
'reportsOwnAccounts' => 'Overzichten voor je eigen betaalrekeningen',
'reportsOwnAccountsAndShared' => 'Overzichten voor je eigen betaalrekeningen en gedeelde rekeningen',
'splitByAccount' => 'Per betaalrekening',
'balancedByTransfersAndTags' => 'Gecorrigeerd met overschrijvingen en tags',
'coveredWithTags' => 'Gecorrigeerd met tags',
'leftUnbalanced' => 'Ongecorrigeerd',
'expectedBalance' => 'Verwacht saldo',
'outsideOfBudgets' => 'Buiten budgetten',
'leftInBudget' => 'Over van budget',
'sumOfSums' => 'Alles bij elkaar',
'noCategory' => '(zonder categorie)',
'notCharged' => '(Nog) niet betaald',
'inactive' => 'Niet actief',
'difference' => 'Verschil',
'in' => 'In',
'out' => 'Uit',
'topX' => 'top :number',
'showTheRest' => 'Laat alles zien',
'hideTheRest' => 'Laat alleen de top :number zien',
'categories_earned_in_year' => 'Categorieën (inkomsten)',
'categories_spent_in_year' => 'Categorieën (uitgaven)',
'report_type' => 'Rapporttype',
'report_type_default' => 'Standard financieel rapport',
'report_included_accounts' => 'Accounts in rapport',
'report_date_range' => 'Datumbereik',
'report_include_help' => 'Overboekingen naar gedeelde rekeningen tellen als uitgave. Overboekingen van gedeelde rekeningen tellen als inkomsten.',
'report_preset_ranges' => 'Standaardbereik',
'shared' => 'Gedeeld',
// charts:
'dayOfMonth' => 'Dag vd maand',
'month' => 'Maand',
'budget' => 'Budget',
'spent' => 'Uitgegeven',
'earned' => 'Verdiend',
'overspent' => 'Teveel uitgegeven',
'left' => 'Over',
'noBudget' => '(geen budget)',
'maxAmount' => 'Maximaal bedrag',
'minAmount' => 'Minimaal bedrag',
'billEntry' => 'Bedrag voor dit contract',
'name' => 'Naam',
'date' => 'Datum',
'paid' => 'Betaald',
'unpaid' => 'Niet betaald',
'day' => 'Dag',
'budgeted' => 'Gebudgetteerd',
'period' => 'Periode',
'balance' => 'Saldo',
'summary' => 'Samenvatting',
'sum' => 'Som',
'average' => 'Gemiddeld',
'balanceFor' => 'Saldo op :name',
// piggy banks:
'piggy_bank' => 'Spaarpotje',
'new_piggy_bank' => 'Nieuw spaarpotje',
'store_piggy_bank' => 'Sla spaarpotje op',
'account_status' => 'Rekeningoverzicht',
'left_for_piggy_banks' => 'Over voor spaarpotjes',
'sum_of_piggy_banks' => 'Som van spaarpotjes',
'saved_so_far' => 'Gespaard',
'left_to_save' => 'Te sparen',
'add_money_to_piggy_title' => 'Stop geld in spaarpotje ":name"',
'remove_money_from_piggy_title' => 'Haal geld uit spaarpotje ":name"',
'add' => 'Toevoegen',
'remove' => 'Verwijderen',
'max_amount_add' => 'Hooguit toe te voegen',
'max_amount_remove' => 'Hooguit te verwijderen',
'update_piggy_button' => 'Wijzig spaarpotje',
'update_piggy_title' => 'Wijzig spaarpotje ":name"',
'details' => 'Details',
'events' => 'Gebeurtenissen',
'target_amount' => 'Doelbedrag',
'start_date' => 'Startdatum',
'target_date' => 'Doeldatum',
'no_target_date' => 'Geen doeldatum',
'todo' => 'te doen',
'table' => 'Tabel',
'piggy_bank_not_exists' => 'Dit spaarpotje bestaat niet meer.',
'add_any_amount_to_piggy' => 'Stop geld in dit spaarpotje om het doel van :amount te halen.',
'add_set_amount_to_piggy' => 'Stop voor :date :amount in dit spaarpotje om hem op tijd te vullen.',
'delete_piggy_bank' => 'Verwijder spaarpotje ":name"',
// tags
'regular_tag' => 'Een gewone tag.',
'balancing_act' => 'Er kunnen maar twee transacties worden getagged; een uitgaven en inkomsten. Ze balanceren elkaar.',
'advance_payment' => 'Je kan een uitgave taggen en zoveel inkomsten om de uitgave (helemaal) te compenseren.',
'delete_tag' => 'Verwijder tag ":tag"',
'new_tag' => 'Maak nieuwe tag',
'edit_tag' => 'Wijzig tag ":tag"',
'no_year' => 'Zonder jaar',
'no_month' => 'Zonder maand',
'tag_title_nothing' => 'Standaard tags',
'tag_title_balancingAct' => 'Balancerende tags',
'tag_title_advancePayment' => 'Vooruitbetaalde tags',
'tags_introduction' => 'Normaal gesproken zijn tags enkele woorden, gebruikt om gerelateerde zaken snel aan elkaar te plakken. ' .
'<span class="label label-info">dure-aanschaf</span>, <span class="label label-info">rekening</span>, ' .
'<span class="label label-info">feestje</span>. In Firefly III hebben tags meer betekenis en kan je er een datum' .
', beschrijving en locatie aan geven. Daarmee kan je je transacties op een wat zinvollere manier aan elkaar ' .
'koppelen. Je kan bijvoorbeeld een tag <span class="label label-success">Kerstdiner</span> maken en informatie over' .
' het restaurant meenemen. Zulke tags zijn enkelvoudig; je gebruikt ze maar bij één gelegenheid.',
'tags_group' => 'Omdat tags transacties groeperen kan je er teruggaves, vergoedingen en andere geldzaken mee aanduiden, zolang' .
' de transacties elkaar "opheffen". Hoe je dit aanpakt is aan jou. De gewone manier kan natuurlijk ook.',
'tags_start' => 'Maak hieronder een tag, of voer nieuwe tags in als je nieuwe transacties maakt.',
];

View File

@@ -1,78 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'invalid_domain' => 'Kan niet registereren vanaf dit domein.',
'file_already_attached' => 'Het geuploade bestand ":name" is al gelinkt aan deze transactie.',
'file_attached' => 'Bestand met naam ":name" is met succes geuploaded.',
'file_invalid_mime' => 'Bestand ":name" is van het type ":mime", en die kan je niet uploaden.',
'file_too_large' => 'Bestand ":name" is te groot.',
"accepted" => "The :attribute must be accepted.",
"active_url" => "The :attribute is not a valid URL.",
"after" => "The :attribute must be a date after :date.",
"alpha" => "The :attribute may only contain letters.",
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
"alpha_num" => "The :attribute may only contain letters and numbers.",
"array" => "The :attribute must be an array.",
"unique_for_user" => "There already is an entry with this :attribute.",
"before" => "The :attribute must be a date before :date.",
'unique_object_for_user' => 'Deze naam is al in gebruik',
'unique_account_for_user' => 'This rekeningnaam is already in use',
"between.numeric" => "The :attribute must be between :min and :max.",
"between.file" => "The :attribute must be between :min and :max kilobytes.",
"between.string" => "The :attribute must be between :min and :max characters.",
"between.array" => "The :attribute must have between :min and :max items.",
"boolean" => "The :attribute field must be true or false.",
"confirmed" => "The :attribute confirmation does not match.",
"date" => "The :attribute is not a valid date.",
"date_format" => "The :attribute does not match the format :format.",
"different" => "The :attribute and :other must be different.",
"digits" => "The :attribute must be :digits digits.",
"digits_between" => "The :attribute must be between :min and :max digits.",
"email" => "The :attribute must be a valid email address.",
"filled" => "The :attribute field is required.",
"exists" => "The selected :attribute is invalid.",
"image" => "The :attribute must be an image.",
"in" => "The selected :attribute is invalid.",
"integer" => "The :attribute must be an integer.",
"ip" => "The :attribute must be a valid IP address.",
"max.numeric" => "The :attribute may not be greater than :max.",
"max.file" => "The :attribute may not be greater than :max kilobytes.",
"max.string" => "The :attribute may not be greater than :max characters.",
"max.array" => "The :attribute may not have more than :max items.",
"mimes" => "The :attribute must be a file of type: :values.",
"min.numeric" => "The :attribute must be at least :min.",
"min.file" => "The :attribute must be at least :min kilobytes.",
"min.string" => "The :attribute must be at least :min characters.",
"min.array" => "The :attribute must have at least :min items.",
"not_in" => "The selected :attribute is invalid.",
"numeric" => "The :attribute must be a number.",
"regex" => "The :attribute format is invalid.",
"required" => "The :attribute field is required.",
"required_if" => "The :attribute field is required when :other is :value.",
"required_with" => "The :attribute field is required when :values is present.",
"required_with_all" => "The :attribute field is required when :values is present.",
"required_without" => "The :attribute field is required when :values is not present.",
"required_without_all" => "The :attribute field is required when none of :values are present.",
"same" => "The :attribute and :other must match.",
"size.numeric" => "The :attribute must be :size.",
"size.file" => "The :attribute must be :size kilobytes.",
"size.string" => "The :attribute must be :size characters.",
"size.array" => "The :attribute must contain :size items.",
"unique" => "The :attribute has already been taken.",
"url" => "The :attribute format is invalid.",
"timezone" => "The :attribute must be a valid zone.",
'attributes' => [],
];

Some files were not shown because too many files have changed in this diff Show More