Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fixed the tests.
James Cole8b901084fea6
diff --git a/app/database/migrations/2014_12_13_190730_changes_for_v321.php b/app/database/migrations/2014_12_13_190730_changes_for_v321.phpindex 6e44cf697a..8d41d878b0 100644--- a/app/database/migrations/2014_12_13_190730_changes_for_v321.php+++ b/app/database/migrations/2014_12_13_190730_changes_for_v321.php@@ -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');});diff --git a/app/lib/FireflyIII/Database/Account/Account.php b/app/lib/FireflyIII/Database/Account/Account.phpindex 8be9cf9766..e75ca92b56 100644--- a/app/lib/FireflyIII/Database/Account/Account.php+++ b/app/lib/FireflyIII/Database/Account/Account.php@@ -14,6 +14,7 @@ use Illuminate\Support\MessageBag;* Class Account** @package FireflyIII\Database+ * @implements FireflyIII\Database\Account\AccountInterface*/class Account implements CUD, CommonDatabaseCalls, AccountInterface{diff --git a/app/models/Category.php b/app/models/Category.phpindex 2878c29fed..3ead64a97f 100644--- a/app/models/Category.php+++ b/app/models/Category.php@@ -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;+ }}\ No newline at end of filediff --git a/app/models/Component.php b/app/models/Component.phpindex 726e80e68e..cefdf02627 100644--- a/app/models/Component.php+++ b/app/models/Component.php@@ -17,19 +17,4 @@ class Component extends Eloquentprotected $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;-// }}\ No newline at end of file