mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
Fixed the tests.
This commit is contained in:
parent
1a0cbbdb31
commit
8b901084fe
@ -380,7 +380,7 @@ class ChangesForV321 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'budget_limits', function (Blueprint $table) {
|
||||
$table->integer('budget_id')->unsigned()->after('updated_at');
|
||||
$table->integer('budget_id', false, true)->nullable()->after('updated_at');
|
||||
$table->foreign('budget_id', 'bid_foreign')->references('id')->on('budgets')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
@ -14,6 +14,7 @@ use Illuminate\Support\MessageBag;
|
||||
* Class Account
|
||||
*
|
||||
* @package FireflyIII\Database
|
||||
* @implements FireflyIII\Database\Account\AccountInterface
|
||||
*/
|
||||
class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
||||
{
|
||||
|
@ -24,4 +24,19 @@ class Category extends Eloquent
|
||||
{
|
||||
return $this->belongsTo('User');
|
||||
}
|
||||
|
||||
/**
|
||||
* remove this method in favour of something in the FireflyIII libraries.
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function lastActionDate()
|
||||
{
|
||||
$transaction = $this->transactionjournals()->orderBy('updated_at', 'DESC')->first();
|
||||
if (is_null($transaction)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $transaction->date;
|
||||
}
|
||||
}
|
@ -17,19 +17,4 @@ class Component extends Eloquent
|
||||
protected $fillable = ['name', 'user_id','class'];
|
||||
protected $table = 'components';
|
||||
use ValidatingTrait;
|
||||
|
||||
// /**
|
||||
// * remove this method in favour of something in the FireflyIII libraries.
|
||||
// *
|
||||
// * @return Carbon
|
||||
// */
|
||||
// public function lastActionDate()
|
||||
// {
|
||||
// $transaction = $this->transactionjournals()->orderBy('updated_at', 'DESC')->first();
|
||||
// if (is_null($transaction)) {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// return $transaction->date;
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user