Compare commits

...

36 Commits

Author SHA1 Message Date
James Cole
aaa186be5e Merge branch 'release/3.4.0.6' 2015-05-14 09:21:23 +02:00
James Cole
98ae5b0ca0 New read me. 2015-05-14 09:21:12 +02:00
James Cole
36c8171d0f Clean up and tests. 2015-05-14 09:01:10 +02:00
James Cole
3603eb94cc Different budget query [skip ci] 2015-05-14 08:08:25 +02:00
James Cole
0e068d4ccf Fixed some tests. 2015-05-13 21:37:11 +02:00
James Cole
199f348ff4 Smaller mobile pages. 2015-05-13 21:32:33 +02:00
James Cole
b22655fb7c Fix helper 2015-05-13 21:32:27 +02:00
James Cole
06cc9618ba Some new tests 2015-05-13 21:32:21 +02:00
James Cole
b9019c8c7f Smaller screens update [skip ci] 2015-05-13 06:34:17 +02:00
James Cole
77e133e67c Some cleaning up for mobile screens [skip ci] 2015-05-13 06:31:32 +02:00
James Cole
571e7df807 Some tiny optimisations. 2015-05-12 20:51:03 +02:00
James Cole
22f4d2979a Added some more ignores, edited some middleware. 2015-05-11 22:12:53 +02:00
James Cole
e46e366694 Added some tests to cover an event. 2015-05-11 21:45:31 +02:00
James Cole
7b4bc23815 Merge branch 'release/3.4.0.5' 2015-05-10 19:18:57 +02:00
James Cole
9ca79f767c Merge branch 'release/3.4.0.5' into develop 2015-05-10 19:18:57 +02:00
James Cole
274dba7408 Update read me. 2015-05-10 19:18:49 +02:00
James Cole
31708ca29e Ignore some code. 2015-05-10 19:18:43 +02:00
James Cole
671b025588 More ignore stuff. 2015-05-10 13:40:29 +02:00
James Cole
a7956e4856 Adding lots of ignore statements because testing the models is pointless. 2015-05-10 13:22:00 +02:00
James Cole
355862025a Auth and password controller. 2015-05-10 13:06:02 +02:00
James Cole
a2a39ee0f8 Ignore piggy bank part. 2015-05-10 09:35:42 +02:00
James Cole
ec8e39c16f Fixed currency tests. 2015-05-10 09:26:44 +02:00
James Cole
88f714999e Add test to get full coverage. 2015-05-10 08:53:49 +02:00
James Cole
c0c2aa3be0 Fixed one test. 2015-05-10 08:49:15 +02:00
James Cole
822044820e Ignored more files. 2015-05-10 08:26:42 +02:00
James Cole
6ffc182142 Ignore lots of code in test coverage. 2015-05-10 08:08:07 +02:00
James Cole
3d54a78573 Tag repository tests 2015-05-10 07:48:33 +02:00
James Cole
8ddf7d953a Ignore constructor. 2015-05-10 07:09:21 +02:00
James Cole
8b9e9ad103 Tests for reminder repository. 2015-05-10 07:07:17 +02:00
James Cole
5737224c40 Simplified translations [skip ci] 2015-05-09 22:42:45 +02:00
James Cole
ec9aacbcae More new tests. 2015-05-09 22:30:16 +02:00
James Cole
9395454997 Small optimalizations [skip ci] 2015-05-09 19:27:25 +02:00
James Cole
66198a8d98 Expanded bread crumb [skip ci] 2015-05-09 19:23:37 +02:00
James Cole
96ed9a4256 Finished journal repository. 2015-05-09 18:30:58 +02:00
James Cole
10e54b2263 Tested part of the journal repository. 2015-05-09 18:11:48 +02:00
James Cole
84e8e007a5 Merge branch 'release/3.4.0.4' into develop 2015-05-09 15:13:20 +02:00
112 changed files with 2051 additions and 331 deletions

View File

@@ -15,4 +15,5 @@ EMAIL_SMTP=
EMAIL_DRIVER=smtp
EMAIL_USERNAME=
EMAIL_PASSWORD=
ANALYTICS_ID=
ANALYTICS_ID=
EMAIL_PRETEND=false

View File

@@ -14,4 +14,5 @@ SESSION_DRIVER=array
EMAIL_SMTP=
EMAIL_USERNAME=
EMAIL_PASSWORD=
ANALYTICS_ID=ABC
ANALYTICS_ID=ABC
EMAIL_PRETEND=true

View File

@@ -1,5 +1,5 @@
# Firefly III
#### v3.4.0.4
#### v3.4.0.6
[![Build Status](https://travis-ci.org/JC5/firefly-iii.svg?branch=develop)](https://travis-ci.org/JC5/firefly-iii)
[![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii)
@@ -13,11 +13,13 @@
"Firefly III" is a financial manager. It can help you keep track of expenses, income, budgets and everything in between. It even supports credit cards, shared
household accounts and savings accounts! It's pretty fancy. You should use it to save and organise money.
Firefly is a system you'll have install yourself on webhosting of your choosing.
_Firefly is a system you'll have install yourself on webhosting of your choosing._
Personal financial management is pretty difficult, and everybody has their own approach to it. Some people
make budgets, other people limit their cashflow by throwing away their credit cards, others get a better job.
There are tons of ways to save and earn money.
make budgets, other people limit their cashflow by throwing away their credit cards, others try to increase
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:
@@ -28,7 +30,7 @@ To get to know Firefly, and to see if it fits you, check out these resources:
and the philosophy behind it.
### About the name (if you care)
#### About the name (if you care)
It's III, or 3, because [version 2](https://github.com/JC5/Firefly) and version 1 (not online) preceded it. It has been growing steadily ever since.

View File

@@ -2,6 +2,7 @@
/**
* Class Command
*
* @codeCoverageIgnore
* @package FireflyIII\Commands
*/
abstract class Command

View File

@@ -6,6 +6,7 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
/**
* Class Kernel
*
* @codeCoverageIgnore
* @package FireflyIII\Console
*/
class Kernel extends ConsoleKernel

View File

@@ -3,6 +3,7 @@
/**
* Class Event
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
abstract class Event

View File

@@ -6,6 +6,7 @@ use Illuminate\Queue\SerializesModels;
/**
* Class JournalCreated
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalCreated extends Event

View File

@@ -5,6 +5,7 @@ use Illuminate\Queue\SerializesModels;
/**
* Class JournalDeleted
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalDeleted extends Event

View File

@@ -6,6 +6,7 @@ use Illuminate\Queue\SerializesModels;
/**
* Class JournalSaved
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalSaved extends Event

View File

@@ -6,6 +6,7 @@ namespace FireflyIII\Exceptions;
/**
* Class FireflyException
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class FireflyException extends \Exception

View File

@@ -6,6 +6,7 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
/**
* Class Handler
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class Handler extends ExceptionHandler

View File

@@ -5,6 +5,7 @@ namespace FireflyIII\Exceptions;
/**
* Class NotImplementedException
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class NotImplementedException extends \Exception

View File

@@ -4,6 +4,7 @@ namespace FireflyIII\Exceptions;
/**
* Class ValidationExceptions
*
* @codeCoverageIgnore
* @package FireflyIII\Exception
*/
class ValidationException extends \Exception

View File

@@ -30,7 +30,7 @@ class ConnectJournalToPiggyBank
*
* @param JournalCreated $event
*
* @return void
* @return boolean
*/
public function handle(JournalCreated $event)
{
@@ -38,7 +38,7 @@ class ConnectJournalToPiggyBank
$journal = $event->journal;
$piggyBankId = $event->piggyBankId;
if (intval($piggyBankId) < 1) {
return;
return false;
}
Log::debug('JournalCreated event: ' . $journal->id . ', ' . $piggyBankId);
@@ -47,20 +47,20 @@ class ConnectJournalToPiggyBank
$piggyBank = Auth::user()->piggybanks()->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
if (is_null($piggyBank) || $journal->transactionType->type != 'Transfer') {
return;
return false;
}
Log::debug('Found a piggy bank');
$amount = $journal->amount;
Log::debug('Amount: ' . $amount);
if ($amount == 0) {
return;
return false;
}
// update piggy bank rep for date of transaction journal.
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
if (is_null($repetition)) {
Log::debug('Found no repetition for piggy bank for date ' . $journal->date->format('Y M d'));
return;
return false;
}
Log::debug('Found rep! ' . $repetition->id);
@@ -91,6 +91,7 @@ class ConnectJournalToPiggyBank
'amount' => $amount
]
);
return true;
}

View File

@@ -5,6 +5,7 @@ use FireflyIII\Events\JournalDeleted;
/**
* Class JournalDeletedHandler
*
* @codeCoverageIgnore
* @package FireflyIII\Handlers\Events
*/
class JournalDeletedHandler

View File

@@ -7,6 +7,7 @@ use Log;
/**
* Class RescanJournal
*
* @codeCoverageIgnore
* @package FireflyIII\Handlers\Events
*/
class RescanJournal

View File

@@ -6,6 +6,7 @@ use FireflyIII\Models\PiggyBankEvent;
/**
* Class UpdateJournalConnection
*
* @codeCoverageIgnore
* @package FireflyIII\Handlers\Events
*/
class UpdateJournalConnection

View File

@@ -17,6 +17,7 @@ class Help implements HelpInterface
{
/**
* @codeCoverageIgnore
* @param $key
*
* @return string
@@ -27,6 +28,7 @@ class Help implements HelpInterface
}
/**
* @codeCoverageIgnore
* @param $route
*
* @return array
@@ -54,6 +56,7 @@ class Help implements HelpInterface
}
/**
* @codeCoverageIgnore
* @param $route
*
* @return bool
@@ -64,6 +67,7 @@ class Help implements HelpInterface
}
/**
* @codeCoverageIgnore
* @param $route
* @param array $content
*
@@ -76,6 +80,7 @@ class Help implements HelpInterface
}
/**
* @codeCoverageIgnore
* @param $route
*
* @return bool

View File

@@ -33,7 +33,7 @@ class ReminderHelper implements ReminderHelperInterface
$ranges = $this->getReminderRanges($piggyBank, $start);
$currentRep = $piggyBank->currentRelevantRep();
$left = $piggyBank->targetamount - $currentRep->currentamount;
$perReminder = $left / count($ranges);
$perReminder = count($ranges) == 0 ? $left : $left / count($ranges);
} else {
$perReminder = null;
$ranges = [];
@@ -46,8 +46,6 @@ class ReminderHelper implements ReminderHelperInterface
'leftToSave' => $left,
];
// create one:
$reminder = new Reminder;
$reminder->user()->associate(Auth::user());
$reminder->startdate = $start;

View File

@@ -18,25 +18,6 @@ use Steam;
class ReportHelper implements ReportHelperInterface
{
/**
* This methods fails to take in account transfers FROM shared accounts.
*
* @param Carbon $start
* @param Carbon $end
* @param int $limit
*
* @return Collection
*/
public function expensesGroupedByAccount(Carbon $start, Carbon $end, $limit = 15)
{
$result = $this->_queries->journalsByExpenseAccount($start, $end);
$array = $this->_helper->makeArray($result);
$limited = $this->_helper->limitArray($array, $limit);
return $limited;
}
/**
* This method gets some kind of list for a monthly overview.
*

View File

@@ -13,18 +13,6 @@ use Illuminate\Support\Collection;
interface ReportHelperInterface
{
/**
* This methods fails to take in account transfers FROM shared accounts.
*
* @param Carbon $start
* @param Carbon $end
* @param int $limit
*
* @return Collection
*/
public function expensesGroupedByAccount(Carbon $start, Carbon $end, $limit = 15);
/**
* This method gets some kind of list for a monthly overview.
*

View File

@@ -38,6 +38,7 @@ class AuthController extends Controller
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
* @codeCoverageIgnore
*
*/
public function __construct(Guard $auth, Registrar $registrar)
@@ -51,7 +52,9 @@ class AuthController extends Controller
/**
* Show the application login form.
*
* @codeCoverageIgnore
* @return \Illuminate\Http\Response
*
*/
public function getLogin()
{
@@ -73,7 +76,9 @@ class AuthController extends Controller
$this->throwValidationException(
$request, $validator
);
// @codeCoverageIgnoreStart
}
// @codeCoverageIgnoreEnd
$data = $request->all();
$data['password'] = bcrypt($data['password']);

View File

@@ -7,7 +7,7 @@ use Illuminate\Foundation\Auth\ResetsPasswords;
/**
* Class PasswordController
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Controllers\Auth
*/
class PasswordController extends Controller

View File

@@ -187,17 +187,6 @@ class GoogleChartController extends Controller
if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) {
$chart->addRow($entry[0], $entry[1], $entry[2], $entry[3]);
}
// if ($entry[2] > 0) {
// $left = $entry[1] - $entry[2];
// if ($left > 0) {
// $chart->addRow($entry[0], $left, null);
// } else {
// if ($left < 0) {
// $chart->addRow($entry[0], null, $left);
// }
// }
//
// }
}
$chart->generate();

View File

@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
/**
* Class Authenticate
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Middleware
*/
class Authenticate

View File

@@ -46,7 +46,7 @@ class PiggyBanks
*/
public function handle(Request $request, Closure $next)
{
if ($this->auth->check() && !$request->isXmlHttpRequest() && App::environment() != 'testing') {
if ($this->auth->check() && !$request->isXmlHttpRequest()) {
// get piggy banks without a repetition:
/** @var Collection $set */
$set = $this->auth->user()->piggybanks()

View File

@@ -48,7 +48,7 @@ class Range
*/
public function handle(Request $request, Closure $theNext)
{
if ($this->auth->check() && App::environment() != 'testing') {
if ($this->auth->check()) {
// ignore preference. set the range to be the current month:
if (!Session::has('start') && !Session::has('end')) {

View File

@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
/**
* Class RedirectIfAuthenticated
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Middleware
*/
class RedirectIfAuthenticated

View File

@@ -46,7 +46,7 @@ class Reminders
*/
public function handle(Request $request, Closure $next)
{
if ($this->auth->check() && !$request->isXmlHttpRequest() && App::environment() != 'testing') {
if ($this->auth->check() && !$request->isXmlHttpRequest()) {
// do reminders stuff.
$piggyBanks = $this->auth->user()->piggyBanks()->where('remind_me', 1)->get();
$today = new Carbon;

View File

@@ -10,6 +10,7 @@ use Log;
/**
* Class ReplaceTestVars
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Middleware
*/
class ReplaceTestVars

View File

@@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
/**
* Class VerifyCsrfToken
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Middleware
*/
class VerifyCsrfToken extends BaseVerifier

View File

@@ -10,6 +10,7 @@ use Input;
/**
* Class AccountFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class AccountFormRequest extends Request

View File

@@ -9,6 +9,7 @@ use Input;
/**
* Class BillFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class BillFormRequest extends Request

View File

@@ -9,6 +9,7 @@ use Input;
/**
* Class BudgetFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class BudgetFormRequest extends Request

View File

@@ -9,6 +9,7 @@ use Input;
/**
* Class CategoryFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class CategoryFormRequest extends Request

View File

@@ -8,6 +8,7 @@ use Input;
/**
* Class BillFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class CurrencyFormRequest extends Request

View File

@@ -7,6 +7,7 @@ use Auth;
/**
* Class DeleteAccountFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class DeleteAccountFormRequest extends Request

View File

@@ -10,6 +10,7 @@ use Input;
/**
* Class JournalFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class JournalFormRequest extends Request

View File

@@ -8,6 +8,7 @@ use Input;
/**
* Class PiggyBankFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class PiggyBankFormRequest extends Request

View File

@@ -7,6 +7,7 @@ use Auth;
/**
* Class ProfileFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class ProfileFormRequest extends Request

View File

@@ -5,6 +5,7 @@ use Illuminate\Foundation\Http\FormRequest;
/**
* Class Request
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
abstract class Request extends FormRequest

View File

@@ -15,6 +15,7 @@ use Input;
/**
* Class TagFormRequest
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Requests
*/
class TagFormRequest extends Request

View File

@@ -319,7 +319,7 @@ Breadcrumbs::register(
Breadcrumbs::register(
'reports.month', function (Generator $breadcrumbs, Carbon $date) {
$breadcrumbs->parent('reports.index');
$breadcrumbs->parent('reports.year', $date);
$breadcrumbs->push('Monthly report for ' . $date->format('F Y'), route('reports.month', [$date->year, $date->month]));
}
);

View File

@@ -29,6 +29,7 @@ class Account extends Model
/**
* @param array $fields
*
*
* @return Account|null
*/
public static function firstOrCreateEncrypted(array $fields)
@@ -86,6 +87,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function accountMeta()
@@ -94,6 +96,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function accountType()
@@ -102,6 +105,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -110,6 +114,7 @@ class Account extends Model
}
/**
*
* @param $fieldName
*
* @return string|null
@@ -127,6 +132,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string
@@ -144,6 +150,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggyBanks()
@@ -152,6 +159,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param array $types
*/
@@ -165,6 +173,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param string $name
* @param string $value
@@ -181,6 +190,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setNameAttribute($value)
@@ -190,6 +200,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactions()
@@ -198,6 +209,7 @@ class Account extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()

View File

@@ -6,6 +6,7 @@ use Watson\Validating\ValidatingTrait;
/**
* Class AccountMeta
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class AccountMeta extends Model
@@ -22,6 +23,7 @@ class AccountMeta extends Model
protected $table = 'account_meta';
/**
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function account()

View File

@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class AccountType
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class AccountType extends Model

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Budget
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class Budget extends Model
@@ -17,6 +18,7 @@ class Budget extends Model
protected $fillable = ['user_id', 'name'];
/**
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function budgetlimits()

View File

@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class BudgetLimit
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class BudgetLimit extends Model

View File

@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Category
*
*
* @package FireflyIII\Models
*/
class Category extends Model
@@ -17,6 +18,7 @@ class Category extends Model
protected $fillable = ['user_id', 'name'];
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -25,6 +27,7 @@ class Category extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function transactionjournals()
@@ -66,6 +69,7 @@ class Category extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
@@ -74,6 +78,7 @@ class Category extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setNameAttribute($value)
@@ -83,6 +88,7 @@ class Category extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string
@@ -94,9 +100,7 @@ class Category extends Model
return Crypt::decrypt($value);
}
// @codeCoverageIgnoreStart
return $value;
// @codeCoverageIgnoreEnd
}
}

View File

@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Component
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class Component extends Model

View File

@@ -13,6 +13,7 @@ class LimitRepetition extends Model
{
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function budgetLimit()
@@ -21,6 +22,7 @@ class LimitRepetition extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()

View File

@@ -17,6 +17,7 @@ class PiggyBank extends Model
= ['name', 'account_id', 'order', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder', 'remind_me'];
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function account()
@@ -44,6 +45,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggyBankRepetitions()
@@ -52,6 +54,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -60,6 +63,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return int
@@ -70,6 +74,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggyBankEvents()
@@ -78,6 +83,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function reminders()
@@ -86,6 +92,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setNameAttribute($value)
@@ -95,6 +102,7 @@ class PiggyBank extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string

View File

@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class PiggyBankEvent
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class PiggyBankEvent extends Model

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class PiggyBankRepetition
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class PiggyBankRepetition extends Model

View File

@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class Preference
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class Preference extends Model

View File

@@ -17,6 +17,7 @@ class Reminder extends Model
protected $fillable = ['user_id', 'startdate', 'metadata', 'enddate', 'active', 'notnow', 'remindersable_id', 'remindersable_type',];
/**
* @codeCoverageIgnore
* @param $value
*
* @return int
@@ -27,6 +28,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -35,6 +37,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return mixed
@@ -49,6 +52,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return bool
@@ -59,6 +63,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
*/
public function remindersable()
@@ -67,6 +72,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param Carbon $start
* @param Carbon $end
@@ -79,6 +85,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
*
* @return $this
@@ -92,6 +99,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setMetadataAttribute($value)
@@ -101,6 +109,7 @@ class Reminder extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()

View File

@@ -67,6 +67,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -75,6 +76,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string
@@ -85,6 +87,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string
@@ -95,6 +98,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setDescriptionAttribute($value)
@@ -103,6 +107,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setTagAttribute($value)
@@ -111,6 +116,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function transactionjournals()
@@ -119,6 +125,7 @@ class Tag extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()

View File

@@ -9,6 +9,7 @@ use Watson\Validating\ValidatingTrait;
/**
* Class Transaction
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class Transaction extends Model

View File

@@ -4,8 +4,10 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
*
* Class TransactionCurrency
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class TransactionCurrency extends Model

View File

@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class TransactionGroup
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class TransactionGroup extends Model

View File

@@ -32,6 +32,7 @@ class TransactionJournal extends Model
];
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function bill()
@@ -40,6 +41,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function budgets()
@@ -48,6 +50,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function categories()
@@ -94,6 +97,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactions()
@@ -102,6 +106,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getDates()
@@ -110,6 +115,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*
* @return string
@@ -120,12 +126,11 @@ class TransactionJournal extends Model
return Crypt::decrypt($value);
}
// @codeCoverageIgnoreStart
return $value;
// @codeCoverageIgnoreEnd
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggyBankEvents()
@@ -134,6 +139,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param Account $account
*/
@@ -147,6 +153,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param Carbon $date
*
@@ -158,6 +165,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param Carbon $date
*
@@ -169,6 +177,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param $amount
*/
@@ -185,6 +194,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param Carbon $date
*
@@ -196,6 +206,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param EloquentBuilder $query
* @param array $types
*/
@@ -211,6 +222,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* Automatically includes the 'with' parameters to get relevant related
* objects.
*
@@ -226,6 +238,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setDescriptionAttribute($value)
@@ -235,6 +248,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function tags()
@@ -243,6 +257,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function transactionCurrency()
@@ -251,6 +266,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function transactionType()
@@ -259,6 +275,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function transactiongroups()
@@ -267,6 +284,7 @@ class TransactionJournal extends Model
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()

View File

@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class TransactionRelation
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class TransactionRelation extends Model

View File

@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class TransactionType
*
* @codeCoverageIgnore
* @package FireflyIII\Models
*/
class TransactionType extends Model

View File

@@ -10,6 +10,7 @@ use FireflyIII\Support\Preferences;
use FireflyIII\Support\Steam;
use FireflyIII\Support\Twig\Budget;
use FireflyIII\Support\Twig\General;
use FireflyIII\Support\Twig\Translation;
use FireflyIII\Support\Twig\Journal;
use FireflyIII\Support\Twig\PiggyBank;
use FireflyIII\Validation\FireflyValidator;
@@ -42,6 +43,7 @@ class FireflyServiceProvider extends ServiceProvider
Twig::addExtension(new General);
Twig::addExtension(new Journal);
Twig::addExtension(new Budget);
Twig::addExtension(new Translation);
}
public function register()

View File

@@ -246,13 +246,12 @@ class BudgetRepository implements BudgetRepositoryInterface
->whereNotNull('budget_transaction_journal.budget_id');
}
)
->before($end)
->after($start)
->before($end)
->lessThan(0)
->transactionTypes(['Withdrawal'])
->get();
return floatval($noBudgetSet->sum('amount')) * -1;
->sum('transactions.amount');
return floatval($noBudgetSet) * -1;
}
/**

View File

@@ -137,7 +137,7 @@ class JournalRepository implements JournalRepositoryInterface
*/
public function getWithDate($id, Carbon $date)
{
return Auth::user()->transactionjournals()->where('id', $id)->where('date', $date->format('Y-m-d'))->first();
return Auth::user()->transactionjournals()->where('id', $id)->where('date', $date->format('Y-m-d 00:00:00'))->first();
}
/**
@@ -379,14 +379,19 @@ class JournalRepository implements JournalRepositoryInterface
$to = Account::find($data['account_to_id']);
break;
}
if (is_null($to->id)) {
if (is_null($to) || (!is_null($to) && is_null($to->id))) {
Log::error('"to"-account is null, so we cannot continue!');
App::abort(500, '"to"-account is null, so we cannot continue!');
// @codeCoverageIgnoreStart
}
if (is_null($from->id)) {
// @codeCoverageIgnoreEnd
if (is_null($from) || (!is_null($from) && is_null($from->id))) {
Log::error('"from"-account is null, so we cannot continue!');
App::abort(500, '"from"-account is null, so we cannot continue!');
// @codeCoverageIgnoreStart
}
// @codeCoverageIgnoreEnd
return [$from, $to];
}

View File

@@ -145,14 +145,20 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
/**
* Set all piggy banks to order 0.
*
* @return void
* @return boolean
*/
public function reset()
{
DB::table('piggy_banks')
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.id')
->where('accounts.user_id', Auth::user()->id)
->update(['order' => 0, 'piggy_banks.updated_at' => DB::Raw('NOW()')]);
// split query to make it work in sqlite:
$set = PiggyBank::
leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.id')
->where('accounts.user_id', Auth::user()->id)->get(['piggy_banks.*']);
foreach ($set as $e) {
$e->order = 0;
$e->save();
}
return true;
}
/**

View File

@@ -9,6 +9,7 @@ use FireflyIII\Models\Reminder;
/**
* Class PiggyBankPart
*
* @codeCoverageIgnore
* @package FireflyIII\Collection
*/
class PiggyBankPart

View File

@@ -20,7 +20,7 @@ class ReminderRepository implements ReminderRepositoryInterface
protected $helper;
/**
*
* @codeCoverageIgnore
*/
public function __construct()
{

View File

@@ -52,6 +52,7 @@ class TagRepository implements TagRepositoryInterface
$withdrawals = $tag->transactionjournals()->where('transaction_type_id', $withdrawal->id)->count();
$transfers = $tag->transactionjournals()->where('transaction_type_id', $transfer->id)->count();
$deposits = $tag->transactionjournals()->where('transaction_type_id', $deposit->id)->count();
if ($tag->tagMode == 'balancingAct') {
@@ -73,39 +74,47 @@ class TagRepository implements TagRepositoryInterface
}
if ($tag->tagMode == 'advancePayment') {
// advance payments cannot accept transfers:
if ($journal->transaction_type_id == $transfer->id) {
return false;
}
// only if this is the only withdrawal
if ($journal->transaction_type_id == $withdrawal->id && $withdrawals < 1) {
// the first transaction to be attached to this
// tag is attached just like that:
if ($withdrawals < 1 && $deposits < 1) {
$journal->tags()->save($tag);
return true;
}
// only if this is a deposit.
if ($journal->transaction_type_id == $deposit->id) {
// if withdrawal and already has a withdrawal, return false:
if ($journal->transaction_type_id == $withdrawal->id && $withdrawals == 1) {
return false;
}
// if this is a deposit, account must match the current only journal
// (if already present):
$currentWithdrawal = $tag->transactionjournals()->where('transaction_type_id', $withdrawal->id)->first();
if ($currentWithdrawal && $currentWithdrawal->assetAccount->id == $journal->assetAccount->id) {
// if already has transaction journals, must match ALL asset account id's:
if ($deposits > 0 || $withdrawals == 1) {
$match = true;
/** @var TransactionJournal $check */
foreach ($tag->transactionjournals as $check) {
if ($check->assetAccount->id != $journal->assetAccount->id) {
$match = false;
}
}
if ($match) {
$journal->tags()->save($tag);
return true;
} else {
if (is_null($currentWithdrawal)) {
$journal->tags()->save($tag);
return true;
}
}
}
return false;
}
// @codeCoverageIgnoreStart
return false;
}
// @codeCoverageIgnoreEnd
/**
* @param Tag $tag

View File

@@ -7,6 +7,7 @@ use Validator;
/**
* Class Registrar
*
* @codeCoverageIgnore
* @package FireflyIII\Services
*/
class Registrar implements RegistrarContract

View File

@@ -2,7 +2,6 @@
namespace FireflyIII\Support;
use Cache;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Models\TransactionJournal;

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Facade;
/**
* Class Amount
*
* @codeCoverageIgnore
* @package FireflyIII\Support\Facades
*/
class Amount extends Facade

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Facade;
/**
* Class Amount
*
* @codeCoverageIgnore
* @package FireflyIII\Support\Facades
*/
class ExpandedForm extends Facade

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Facade;
/**
* Class Navigation
*
* @codeCoverageIgnore
* @package FireflyIII\Support\Facades
*/
class Navigation extends Facade

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Facade;
/**
* Class Preferences
*
* @codeCoverageIgnore
* @package FireflyIII\Support\Facades
*/
class Preferences extends Facade

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Facade;
/**
* Class Steam
*
* @codeCoverageIgnore
* @package FireflyIII\Support\Facades
*/
class Steam extends Facade

View File

@@ -0,0 +1,42 @@
<?php
namespace FireflyIII\Support\Twig;
use FireflyIII\Models\LimitRepetition;
use Twig_Extension;
use Twig_SimpleFilter;
/**
* Class Budget
*
* @package FireflyIII\Support\Twig
*/
class Translation extends Twig_Extension
{
/**
* @return array
*/
public function getFilters()
{
$filters = [];
$filters[] = new Twig_SimpleFilter(
'_', function ($name) {
return trans('firefly.'.$name);
}, ['is_safe' => ['html']]
);
return $filters;
}
/**
* {@inheritDoc}
*/
public function getName()
{
return 'FireflyIII\Support\Twig\Translation';
}
}

View File

@@ -119,6 +119,6 @@ return [
|
*/
'pretend' => false,
'pretend' => env('EMAIL_PRETEND', false),
];

View File

@@ -6,5 +6,7 @@ return [
'pleaseHold' => 'Please hold...',
'mandatoryFields' => 'Mandatory fields',
'optionalFields' => 'Optional fields',
'options' => 'Options'
];
'options' => 'Options',
'something' => 'Something!'
];

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -22,7 +22,7 @@
{% if what == 'asset' %}
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
@@ -37,7 +37,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','account') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -20,7 +20,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
@@ -50,7 +50,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','account') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation-circle"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -23,7 +23,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.integer('skip',0) }}
@@ -35,7 +35,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','bill') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation-circle"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -26,7 +26,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.integer('skip') }}
@@ -37,7 +37,7 @@
</div>
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','bill') }}

View File

@@ -6,7 +6,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -17,7 +17,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','budget') }}

View File

@@ -13,7 +13,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-fw fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.checkbox('active') }}
@@ -26,7 +26,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','budget') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -20,7 +20,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','category') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name') }}
@@ -21,7 +21,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','category') }}

View File

@@ -6,7 +6,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
@@ -22,7 +22,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','currency') }}

View File

@@ -8,7 +8,7 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
@@ -23,7 +23,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','currency') }}

View File

@@ -5,7 +5,7 @@
{% if count == 0 %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p class="lead">{{ trans('firefly.welcome') }}</p>
<p class="lead">{{ 'welcome'|_ }}</p>
<p>
Create a new asset account to get started.

View File

@@ -60,7 +60,7 @@
<div class="col-lg-12">
<h1 class="page-header">
{% if mainTitleIcon %}
<i class="fa {{ mainTitleIcon }}"></i>
<i class="hidden-xs fa {{ mainTitleIcon }}"></i>
{% endif %}
{{ title }}
@@ -68,12 +68,12 @@
{% if subTitle %}
<small>
{% if subTitleIcon %}
<i class="fa {{ subTitleIcon }}"></i>
<i class="hidden-xs fa {{ subTitleIcon }}"></i>
{% endif %}
{{ subTitle }}
</small>
{% endif %}
<small class="pull-right"><a href="#" id="help" data-route="{{ Route.getCurrentRoute.getName }}"><i
<small class="pull-right hidden-xs"><a href="#" id="help" data-route="{{ Route.getCurrentRoute.getName }}"><i
data-route="{{ Route.getCurrentRoute.getName }}" class="fa fa-question-circle"></i></a></small>
</h1>
@@ -89,15 +89,15 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{{ trans('firefly.close') }}</span>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button>
<h4 class="modal-title" id="helpTitle">{{ trans('firefly.pleaseHold') }}</h4>
<h4 class="modal-title" id="helpTitle">{{ 'pleaseHold'|_ }}</h4>
</div>
<div class="modal-body" id="helpBody">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('firefly.close') }}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
</div>
</div>
</div>

View File

@@ -2,25 +2,25 @@
<table class="table table-striped table-bordered sortable-table">
<tr class="ignore">
<th colspan="2">&nbsp;</th>
<th class="hidden-xs" colspan="2">&nbsp;</th>
<th>Description</th>
<th>Amount</th>
<th>Date</th>
<th>From</th>
<th>To</th>
<th class="hidden-xs">From</th>
<th class="hidden-xs">To</th>
<!-- Hide budgets? -->
{% if not hideBudgets %}
<th><i class="fa fa-tasks fa-fw" title="Budget"></i></th>
<th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="Budget"></i></th>
{% endif %}
<!-- Hide categories? -->
{% if not hideCategories %}
<th><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
<th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
{% endif %}
<!-- Hide bills? -->
{% if not hideBills %}
<th><i class="fa fa-fw fa-rotate-right" title="Bill"></i></th>
<th class="hidden-xs"><i class="fa fa-fw fa-rotate-right" title="Bill"></i></th>
{% endif %}
</tr>
{% for journal in journals %}
@@ -37,7 +37,7 @@
</tr>
{% else %}
<tr class="drag" data-date="{{journal.date.format('Y-m-d')}}" data-id="{{journal.id}}">
<td>
<td class="hidden-xs">
<div class="btn-group btn-group-xs">
{% if sorting %}
<a href="#" class="handle btn btn-default btn-xs"><i class="fa fa-fw fa-arrows-v"></i></a>
@@ -47,7 +47,7 @@
</div>
</td>
<td>
<td class="hidden-xs">
{{ journal|typeIcon }}
</td>
<td>
@@ -63,14 +63,14 @@
<td>
{{journal.date.format('j F Y')}}
</td>
<td>
<td class="hidden-xs">
{% if journal.transactions[0].account.accountType.type == 'Cash account' %}
<span class="text-success">(cash)</span>
{% else %}
<a href="{{route('accounts.show',journal.transactions[0].account_id)}}">{{journal.transactions[0].account.name}}</a>
{% endif %}
</td>
<td>
<td class="hidden-xs">
{% if journal.transactions[1].account.accountType.type == 'Cash account' %}
<span class="text-success">(cash)</span>
{% else %}
@@ -80,7 +80,7 @@
<!-- Do NOT hide the budget? -->
{% if not hideBudgets %}
<td>
<td class="hidden-xs">
{% if journal.budgets[0] %}
<a href="{{route('budgets.show',journal.budgets[0].id)}}">{{journal.budgets[0].name}}</a>
{% endif %}
@@ -89,7 +89,7 @@
<!-- Do NOT hide the category? -->
{% if not hideCategories %}
<td>
<td class="hidden-xs">
{% if journal.categories[0] %}
<a href="{{route('categories.show',journal.categories[0].id)}}">{{journal.categories[0].name}}</a>
{% endif %}
@@ -98,7 +98,7 @@
<!-- Do NOT hide the bill? -->
{% if not hideBills %}
<td>
<td class="hidden-xs">
{% if journal.bill %}
<a href="{{ route('bills.show',journal.bill_id) }}">{{journal.bill.name}}</a>
{% endif %}

View File

@@ -13,7 +13,7 @@
<!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right">
<ul class="nav navbar-top-links navbar-right hidden-xs">
<!-- reminders -->
{% if reminders|length > 0 %}
@@ -68,16 +68,15 @@
<!-- /.dropdown -->
</ul>
<p class="navbar-text navbar-right" id="daterange"><span>&nbsp;</span> <b class="caret"></b></p>
<p class="navbar-text navbar-right hidden-xs" id="daterange"><span>&nbsp;</span> <b class="caret"></b></p>
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li class="sidebar-search">
<li class="sidebar-search hidden-xs">
<form action="{{ route('search') }}" method="GET" class="form-inline">
<div class="input-group custom-search-form">
<input type="text" name="q" class="form-control" value="{% if Input.get('q') %}{{ Input.get('q') }}{% endif %}"
@@ -174,6 +173,8 @@
</ul>
<!-- /.nav-second-level -->
</li>
<!-- profile, again-->
<!-- reminders, again-->
</ul>
</div>
<!-- /.sidebar-collapse -->

View File

@@ -8,7 +8,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-fw fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
@@ -22,7 +22,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.date('targetdate') }}
@@ -34,7 +34,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','piggy bank') }}

View File

@@ -10,7 +10,7 @@
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-fw fa-exclamation"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
@@ -25,7 +25,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.date('targetdate') }}
@@ -37,7 +37,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','piggy bank') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-5 col-md-5 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-tag"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-tag"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('tag') }}
@@ -20,7 +20,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.date('date') }}
@@ -32,7 +32,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','tag') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-5 col-md-5 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-tag"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-tag"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.text('tag') }}
@@ -22,7 +22,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.date('date') }}
@@ -34,7 +34,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','tag') }}

View File

@@ -8,7 +8,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation-circle"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
<!-- DESCRIPTION ALWAYS AVAILABLE -->
@@ -47,7 +47,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@@ -71,7 +71,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('create','transaction') }}

View File

@@ -10,7 +10,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
<i class="fa fa-exclamation-circle"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="panel-body">
<!-- ALWAYS AVAILABLE -->
@@ -49,7 +49,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
</div>
<div class="panel-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@@ -74,7 +74,7 @@
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="panel-body">
{{ ExpandedForm.optionsList('update','transaction') }}

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