Merge branch 'release/3.7.0' into develop

This commit is contained in:
James Cole 2016-02-04 07:21:29 +01:00
commit 6303b172b1
12 changed files with 45 additions and 24 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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
{

View File

@ -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'];

View File

@ -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
{

10
composer.lock generated
View File

@ -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",

View File

@ -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) {

View File

@ -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;}

View File

@ -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;

View File

@ -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',

View File

@ -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',

View File

@ -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',