diff --git a/app/filters.php b/app/filters.php index 8ad7d5ae42fd..129ab5df25d2 100755 --- a/app/filters.php +++ b/app/filters.php @@ -29,7 +29,7 @@ App::before(function($request) } else if (Auth::check()) { - $locale = Session::get(SESSION_LOCALE, DEFUALT_LOCALE); + $locale = Session::get(SESSION_LOCALE, DEFAULT_LOCALE); App::setLocale($locale); } }); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index b9e214172944..acb0ab6796f1 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -291,7 +291,7 @@ return array( // Pro Plan 'pro_plan' => [ - 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', + 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', 'remove_logo_link' => 'Click here', ], diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index 59e4c1d69813..19c9ea443085 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -145,7 +145,7 @@ return array( 'status' => 'Stato', 'invoice_total' => 'Totale Fattura', 'frequency' => 'Frequenza', - 'start_date' => 'Daata Inizio', + 'start_date' => 'Data Inizio', 'end_date' => 'Data Fine', 'transaction_reference' => 'Riferimento Transazione', 'method' => 'Metodo', diff --git a/app/models/Account.php b/app/models/Account.php index bc500de3d6f0..1afdedb9dfb0 100755 --- a/app/models/Account.php +++ b/app/models/Account.php @@ -178,7 +178,7 @@ class Account extends Eloquent Session::put(SESSION_DATE_PICKER_FORMAT, $this->date_format ? $this->date_format->picker_format : DEFAULT_DATE_PICKER_FORMAT); Session::put(SESSION_DATETIME_FORMAT, $this->datetime_format ? $this->datetime_format->format : DEFAULT_DATETIME_FORMAT); Session::put(SESSION_CURRENCY, $this->currency_id ? $this->currency_id : DEFAULT_CURRENCY); - Session::put(SESSION_LOCALE, $this->language_id ? $this->language->locale : DEFUALT_LOCALE); + Session::put(SESSION_LOCALE, $this->language_id ? $this->language->locale : DEFAULT_LOCALE); } public function getInvoiceLabels() diff --git a/app/ninja/repositories/TaxRateRepository.php b/app/ninja/repositories/TaxRateRepository.php index b7a7e4f9eb3b..a6cc5616498c 100755 --- a/app/ninja/repositories/TaxRateRepository.php +++ b/app/ninja/repositories/TaxRateRepository.php @@ -16,7 +16,7 @@ class TaxRateRepository continue; } - if (!Utils::parseFloat($record->rate) || !trim($record->name)) + if (!isset($record->name) || !Utils::parseFloat($record->rate) || !trim($record->name)) { continue; } diff --git a/app/routes.php b/app/routes.php index f5a0eab6a4c3..adf911df98d0 100755 --- a/app/routes.php +++ b/app/routes.php @@ -60,12 +60,12 @@ Route::group(array('before' => 'auth'), function() Route::get('force_inline_pdf', 'UserController@forcePDFJS'); Route::get('account/getSearchData', array('as' => 'getSearchData', 'uses' => 'AccountController@getSearchData')); - Route::get('account/enable_pro_plan', 'AccountController@enableProPlan'); - Route::get('company/{section?}', 'AccountController@showSection'); + Route::get('company/{section?}', 'AccountController@showSection'); Route::post('company/{section?}', 'AccountController@doSection'); Route::post('user/setTheme', 'UserController@setTheme'); Route::post('remove_logo', 'AccountController@removeLogo'); - + Route::post('account/go_pro', 'AccountController@enableProPlan'); + Route::resource('clients', 'ClientController'); Route::get('api/clients', array('as'=>'api.clients', 'uses'=>'ClientController@getDatatable')); Route::get('api/activities/{client_id?}', array('as'=>'api.activities', 'uses'=>'ActivityController@getDatatable')); @@ -229,7 +229,7 @@ define('DEFAULT_DATE_FORMAT', 'M j, Y'); define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy'); define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a'); define('DEFAULT_QUERY_CACHE', 120); // minutes -define('DEFUALT_LOCALE', 'en'); +define('DEFAULT_LOCALE', 'en'); define('GATEWAY_PAYPAL_EXPRESS', 17); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 20a7b9ae72eb..8131abcbb4e4 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -286,7 +286,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index 652ae40bbfe1..00c4d3a2a9b4 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -274,8 +274,9 @@ - @if (false && !Auth::user()->isPro()) - {{ trans('texts.pro_plan.remove_logo', ['link'=>link_to('account/enable_pro_plan', trans('texts.pro_plan.remove_logo_link'))]) }} + @if (!Auth::user()->isPro()) + {{ trans('texts.pro_plan.remove_logo_link') }} + {{ trans('texts.pro_plan.remove_logo') }} @endif - - {{ Former::close() }} + + + {{ Former::open('account/go_pro') }} + + {{ Former::close() }} +