diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index 4c344d3153..ac34fef3ce 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -78,7 +78,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface $overspent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? '0' : bcadd($expenses, $repetition->amount); $budgetLine->setLeft($left); - $budgetLine->setSpent($spent); + $budgetLine->setSpent($expenses); $budgetLine->setOverspent($overspent); $budgetLine->setBudgeted($repetition->amount); diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 38c8a02fa3..0e818f3f20 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -10,7 +10,6 @@ use FireflyIII\Models\Attachment; use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface; use Input; use Preferences; -use Request; use Response; use Session; use URL; @@ -25,7 +24,7 @@ class AttachmentController extends Controller { /** - * @codeCoverageIgnore + * */ public function __construct() { @@ -83,17 +82,17 @@ class AttachmentController extends Controller $quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\')); - Request::header('Content-Description: File Transfer'); - Request::header('Content-Type: application/octet-stream'); - Request::header('Content-Disposition: attachment; filename=' . $quoted); - Request::header('Content-Transfer-Encoding: binary'); - Request::header('Connection: Keep-Alive'); - Request::header('Expires: 0'); - Request::header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - Request::header('Pragma: public'); - Request::header('Content-Length: ' . $attachment->size); - return Crypt::decrypt(file_get_contents($file)); + return response(Crypt::decrypt(file_get_contents($file)), 200) + ->header('Content-Description', 'File Transfer') + ->header('Content-Type', 'application/octet-stream') + ->header('Content-Disposition', 'attachment; filename=' . $quoted) + ->header('Content-Transfer-Encoding', 'binary') + ->header('Connection', 'Keep-Alive') + ->header('Expires', '0') + ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') + ->header('Pragma', 'public') + ->header('Content-Length', $attachment->size); } else { abort(404); diff --git a/app/Models/Component.php b/app/Models/Component.php index c904b1db28..52f4dc4ba8 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -7,6 +7,13 @@ use Illuminate\Database\Eloquent\Model; * * @property int $transaction_journal_id * @package FireflyIII\Models + * @property integer $id + * @property \Carbon\Carbon $created_at + * @property \Carbon\Carbon $updated_at + * @property \Carbon\Carbon $deleted_at + * @property string $name + * @property integer $user_id + * @property string $class */ class Component extends Model { diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index fa892edc4a..dcfd4ab316 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -54,6 +54,8 @@ use Watson\Validating\ValidatingTrait; * @method static \Illuminate\Database\Query\Builder|TransactionJournal transactionTypes($types) * @method static \Illuminate\Database\Query\Builder|TransactionJournal withRelevantData() * @property string $type + * @property \Carbon\Carbon $interest_date + * @property \Carbon\Carbon $book_date */ class TransactionJournal extends Model { @@ -61,7 +63,7 @@ class TransactionJournal extends Model /** @var array */ - protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at']; + protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at', 'interest_date', 'book_date']; /** @var array */ protected $fillable = ['user_id', 'transaction_type_id', 'bill_id', 'transaction_currency_id', 'description', 'completed', 'date', 'encrypted', 'tag_count']; diff --git a/app/User.php b/app/User.php index b274e6d9dc..f093b495c4 100644 --- a/app/User.php +++ b/app/User.php @@ -27,6 +27,8 @@ use Zizaco\Entrust\Traits\EntrustUserTrait; * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Preference[] $preferences * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionJournal[] $transactionjournals * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Role[] $roles + * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\RuleGroup[] $ruleGroups + * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Rule[] $rules */ class User extends Authenticatable { diff --git a/composer.lock b/composer.lock index 936361999c..5f29ed5b9e 100644 --- a/composer.lock +++ b/composer.lock @@ -1369,16 +1369,16 @@ }, { "name": "paragonie/random_compat", - "version": "1.1.5", + "version": "1.1.6", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "dd8998b7c846f6909f4e7a5f67fabebfc412a4f7" + "reference": "e6f80ab77885151908d0ec743689ca700886e8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/dd8998b7c846f6909f4e7a5f67fabebfc412a4f7", - "reference": "dd8998b7c846f6909f4e7a5f67fabebfc412a4f7", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/e6f80ab77885151908d0ec743689ca700886e8b0", + "reference": "e6f80ab77885151908d0ec743689ca700886e8b0", "shasum": "" }, "require": { @@ -1413,7 +1413,7 @@ "pseudorandom", "random" ], - "time": "2016-01-06 13:31:20" + "time": "2016-01-29 16:19:52" }, { "name": "psr/log", diff --git a/database/migrations/2016_01_11_193428_changes_for_v370.php b/database/migrations/2016_01_11_193428_changes_for_v370.php index ba11bbaf44..996bb6ada7 100644 --- a/database/migrations/2016_01_11_193428_changes_for_v370.php +++ b/database/migrations/2016_01_11_193428_changes_for_v370.php @@ -39,6 +39,15 @@ class ChangesForV370 extends Migration */ public function up() { + // extend transaction journals: + Schema::table( + 'transaction_journals', function (Blueprint $table) { + $table->date('interest_date')->nullable()->after('date'); + $table->date('book_date')->nullable()->after('interest_date'); + } + ); + + // new table "rule_groups" Schema::create( 'rule_groups', function (Blueprint $table) { diff --git a/public/css/firefly.css b/public/css/firefly.css index 670ca9d721..898a85a3be 100644 --- a/public/css/firefly.css +++ b/public/css/firefly.css @@ -12,11 +12,7 @@ padding: 0; } -/* fix login box */ -.login-box {width:600px;} -.login-logo {width:360px;margin-left:110px;} -.login-box-body {width:360px;margin-left:110px;} -.register-box-body {width:360px;margin-left:110px;} + /* cursors */ .rule-triggers {cursor:move;} diff --git a/public/js/charts.js b/public/js/charts.js index 3111645a18..b4ad2736c9 100644 --- a/public/js/charts.js +++ b/public/js/charts.js @@ -249,6 +249,9 @@ function columnChart(URL, container, options) { function stackedColumnChart(URL, container, options) { "use strict"; + options = options || {}; + + $.getJSON(URL).success(function (data) { var result = true; diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 990a759694..502db22d64 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -531,6 +531,7 @@ return [ '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', + 'fiscal_year' => 'Fiscal year', // charts: 'dayOfMonth' => 'Day of the month', diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index e2599ed714..5f02d0c10a 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -531,6 +531,7 @@ return [ 'report_include_help' => 'Overboekingen naar gedeelde rekeningen tellen als uitgave. Overboekingen van gedeelde rekeningen tellen als inkomsten.', 'report_preset_ranges' => 'Standaardbereik', 'shared' => 'Gedeeld', + 'fiscal_year' => 'Boekjaar', // charts: 'dayOfMonth' => 'Dag vd maand', diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 00885f1211..22805ae830 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -531,6 +531,7 @@ return [ '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', + 'fiscal_year' => 'Fiscal year', // charts: 'dayOfMonth' => 'Dia do mês',