diff --git a/app/database/migrations/2014_03_20_200300_create_payment_libraries.php b/app/database/migrations/2014_03_20_200300_create_payment_libraries.php index d4c7855a706e..dc8074c913bd 100644 --- a/app/database/migrations/2014_03_20_200300_create_payment_libraries.php +++ b/app/database/migrations/2014_03_20_200300_create_payment_libraries.php @@ -12,19 +12,16 @@ class CreatePaymentLibraries extends Migration { */ public function up() { - Schema::dropIfExists('payment_libraries'); + Schema::dropIfExists('payment_libraries'); - Schema::create('payment_libraries', function($t) - { - $t->increments('id'); - $t->timestamps(); + Schema::create('payment_libraries', function($t) + { + $t->increments('id'); + $t->timestamps(); - $t->string('name'); - $t->boolean('visible')->default(true); - }); - - DB::table('payment_libraries')->insert(['name' => 'Omnipay']); - DB::table('payment_libraries')->insert(['name' => 'PHP-Payments']); + $t->string('name'); + $t->boolean('visible')->default(true); + }); Schema::table('gateways', function($table) { @@ -35,7 +32,7 @@ class CreatePaymentLibraries extends Migration { Schema::table('gateways', function($table) { - $table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade'); + $table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade'); }); } diff --git a/app/database/seeds/ConstantsSeeder.php b/app/database/seeds/ConstantsSeeder.php index 7ebe2a382de9..365312a79c3c 100755 --- a/app/database/seeds/ConstantsSeeder.php +++ b/app/database/seeds/ConstantsSeeder.php @@ -129,8 +129,9 @@ class ConstantsSeeder extends Seeder Currency::create(array('name' => 'Danish Krone', 'code' => 'DKK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); Currency::create(array('name' => 'Israeli Shekel', 'code' => 'ILS', 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); Currency::create(array('name' => 'Singapore Dollar', 'code' => 'SGD', 'symbol' => 'SGD ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Swedish Krona', 'code' => 'SEK', 'symbol' => 'kr', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); + Currency::create(array('name' => 'Swedish Krona', 'code' => 'SEK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); + Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); + Currency::create(array('name' => 'Kenyan Shilling', 'code' => 'KES', 'symbol' => 'KSh ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013')); DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013')); @@ -148,6 +149,9 @@ class ConstantsSeeder extends Seeder DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013')); DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013')); + PaymentLibrary::create(['name' => 'Omnipay']); + PaymentLibrary::create(['name' => 'PHP-Payments']); + /* d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php index 19e3da3aae1a..77fc2f781a89 100644 --- a/app/lang/de/texts.php +++ b/app/lang/de/texts.php @@ -404,5 +404,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index a5b919fff342..a3ee84c2aa6d 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -420,4 +420,8 @@ return array( 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', + + ); \ No newline at end of file diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php index af1ee8f9e90d..466d11ff783a 100644 --- a/app/lang/es/texts.php +++ b/app/lang/es/texts.php @@ -402,5 +402,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php index 881ac3f5a746..ea725a138084 100644 --- a/app/lang/fr/texts.php +++ b/app/lang/fr/texts.php @@ -404,5 +404,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index 66a7aa5968d5..f1d958b94712 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -404,5 +404,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/lang/lt/texts.php b/app/lang/lt/texts.php index f349196f630f..109f66f804eb 100644 --- a/app/lang/lt/texts.php +++ b/app/lang/lt/texts.php @@ -420,6 +420,9 @@ return array( 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', + ); diff --git a/app/lang/nb_NO/texts.php b/app/lang/nb_NO/texts.php index 4e9983b765e1..d62734c9fbf8 100644 --- a/app/lang/nb_NO/texts.php +++ b/app/lang/nb_NO/texts.php @@ -420,4 +420,7 @@ return array( 'deleted_user' => 'Bruker slettet', 'limit_users' => 'Dessverre, vil dette overstiger grensen på ' . MAX_NUM_USERS . ' brukere', + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', + ); \ No newline at end of file diff --git a/app/lang/nl/texts.php b/app/lang/nl/texts.php index 28f4d8302492..8f9ea67de15a 100644 --- a/app/lang/nl/texts.php +++ b/app/lang/nl/texts.php @@ -405,5 +405,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/lang/pt_BR/texts.php b/app/lang/pt_BR/texts.php index d941e9926b35..738a73b7d1ac 100644 --- a/app/lang/pt_BR/texts.php +++ b/app/lang/pt_BR/texts.php @@ -393,5 +393,8 @@ return array( 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', + + 'confirm_email_invoice' => 'Confirm emailing this invoice', + 'confirm_email_quote' => 'Confirm emailing this quote', ); diff --git a/app/models/PaymentLibrary.php b/app/models/PaymentLibrary.php index b8550c212aee..4e790713a096 100644 --- a/app/models/PaymentLibrary.php +++ b/app/models/PaymentLibrary.php @@ -3,6 +3,7 @@ class PaymentLibrary extends Eloquent { protected $table = 'payment_libraries'; + public $timestamps = true; public function gateways() { diff --git a/app/routes.php b/app/routes.php index ea60a74de693..e7271bf1f429 100755 --- a/app/routes.php +++ b/app/routes.php @@ -33,7 +33,7 @@ Route::post('/contact_submit', 'HomeController@doContactUs'); Route::get('/faq', 'HomeController@showFaq'); Route::get('/features', 'HomeController@showFeatures'); Route::get('/testimonials', 'HomeController@showTestimonials'); -Route::get('/compare-online-invoicing-sites', 'HomeController@showCompare'); +Route::get('/compare-online-invoicing', 'HomeController@showCompare'); Route::get('log_error', 'HomeController@logError'); Route::get('invoice_now', 'HomeController@invoiceNow'); diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index 094bb7d728ed..2d634a7687f9 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -723,17 +723,19 @@ } function onEmailClick() { - @if (Auth::user()->confirmed) - if (confirm('Are you sure you want to email this {{ $entityType }}?')) { + if (confirm('{{ trans("texts.confirm_email_$entityType") }}')) { submitAction('email'); } - @else - submitAction('email'); - @endif } function onSaveClick() { - submitAction(''); + if (model.invoice().is_recurring()) { + if (confirm('{{ trans("texts.confirm_email_$entityType") }}')) { + submitAction(''); + } + } else { + submitAction(''); + } } function submitAction(value) { diff --git a/app/views/master.blade.php b/app/views/master.blade.php index 668cdacded22..371b1f7e84d0 100755 --- a/app/views/master.blade.php +++ b/app/views/master.blade.php @@ -32,7 +32,7 @@ $.ajax({ type: 'GET', url: '{{ URL::to('log_error') }}', - data: 'error='+encodeURIComponent(e)+'&url='+encodeURIComponent(window.location) + data: 'error='+encodeURIComponent(e.message + ' - ' + e.filename + ': ' + e.lineno)+'&url='+encodeURIComponent(window.location) }); } catch(err) {} return false; diff --git a/app/views/public/header.blade.php b/app/views/public/header.blade.php index cdde1bffae56..7f6d1c171b20 100644 --- a/app/views/public/header.blade.php +++ b/app/views/public/header.blade.php @@ -135,6 +135,7 @@
  • {{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}
  • {{ link_to('https://www.invoiceninja.com/features', 'Features' ) }}
  • {{ link_to('https://www.invoiceninja.com/plans', 'Plans' ) }}
  • +
  • {{ link_to('https://www.invoiceninja.com/compare-online-invoicing', 'Compare' ) }}
  • {{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}
  • {{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}
  • @@ -214,6 +215,7 @@