Some extensions.

This commit is contained in:
James Cole
2015-03-29 19:44:59 +02:00
parent be10e836dc
commit 8d982c1a90
3 changed files with 35 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ class HomeController extends Controller
// check if all books are correct.
$sum = floatval(Auth::user()->transactions()->sum('amount'));
if ($sum == 0) {
if ($sum != 0) {
Session::flash(
'error', 'Your transactions are unbalanced. This means a'
. ' withdrawal, deposit or transfer was not stored properly. '

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangesFor336 extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(
'budgets', function (Blueprint $table) {
$table->smallInteger('active',false,true)->default(1);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -21,7 +21,7 @@ class DatabaseSeeder extends Seeder
$this->call('TransactionCurrencySeeder');
$this->call('TransactionTypeSeeder');
if (App::environment() == 'testing' || App::environment() == 'homestead') {
if (App::environment() == 'testing' || App::environment() == 'homestead' || gethostname() == 'vagrant-firefly-iii') {
$this->call('TestDataSeeder');
}
}