diff --git a/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php b/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php index 5a8ed681bc..c7104ef88c 100644 --- a/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php +++ b/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php @@ -26,11 +26,11 @@ class SupportHidingQuantity extends Migration { Schema::table('invoices', function($table) { - $table->decimal('custom_value1', 13, 2); - $table->decimal('custom_value2', 13, 2); + $table->decimal('custom_value1', 13, 2)->default(0); + $table->decimal('custom_value2', 13, 2)->default(0); - $table->boolean('custom_taxes1'); - $table->boolean('custom_taxes2'); + $table->boolean('custom_taxes1')->default(0); + $table->boolean('custom_taxes2')->default(0); }); } diff --git a/app/database/seeds/PaymentLibrariesSeeder.php b/app/database/seeds/PaymentLibrariesSeeder.php index b9dbf578be..e540e7390e 100644 --- a/app/database/seeds/PaymentLibrariesSeeder.php +++ b/app/database/seeds/PaymentLibrariesSeeder.php @@ -20,14 +20,14 @@ class PaymentLibrariesSeeder extends Seeder // check that moolah exists if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) { DB::table('gateways')->update(['recommended' => 0]); - DB::table('gateways')->insert([ + Gateway::create(array( 'name' => 'moolah', 'provider' => 'AuthorizeNet_AIM', 'sort_order' => 1, 'recommended' => 1, 'site_url' => 'https://invoiceninja.mymoolah.com/', 'payment_library_id' => 1 - ]); + )); } /* @@ -50,4 +50,4 @@ class PaymentLibrariesSeeder extends Seeder */ } -} \ No newline at end of file +} diff --git a/app/models/Gateway.php b/app/models/Gateway.php index 0d884f2e1f..5589255841 100755 --- a/app/models/Gateway.php +++ b/app/models/Gateway.php @@ -2,7 +2,7 @@ class Gateway extends Eloquent { - public $timestamps = false; + public $timestamps = true; protected $softDelete = false; public function paymentlibrary() @@ -53,4 +53,4 @@ class Gateway extends Eloquent return $fields; } -} \ No newline at end of file +}