diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 2cd63747f..348e5bbc7 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -703,18 +703,27 @@ class AccountController extends \BaseController $user->phone = trim(Input::get('phone')); $user->save(); } - + /* Logo image file */ if ($file = Input::file('logo')) { $path = Input::file('logo')->getRealPath(); File::delete('logo/'.$account->account_key.'.jpg'); - $image = Image::make($path)->resize(200, 120, true, false); - Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath()); + $image = Image::make($path); + $mimeType = $file->getMimeType(); + + if ($image->width == 200 && $mimeType == 'image/jpeg') { + $file->move('logo/', $account->account_key . '.jpg'); + } else { + $image->resize(200, 120, true, false); + Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath()); + } + + //$image = Image::make($path)->resize(200, 120, true, false); + //Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath()); } Event::fire('user.refresh'); - Session::flash('message', trans('texts.updated_settings')); return Redirect::to('company/details'); diff --git a/app/lang/da/texts.php b/app/lang/da/texts.php index a178594d9..536b9292b 100644 --- a/app/lang/da/texts.php +++ b/app/lang/da/texts.php @@ -493,5 +493,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', + ); diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php index 32b01db00..cd3abbd98 100644 --- a/app/lang/de/texts.php +++ b/app/lang/de/texts.php @@ -483,6 +483,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', ); diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php index c325342ad..ea0f84d14 100644 --- a/app/lang/es/texts.php +++ b/app/lang/es/texts.php @@ -463,5 +463,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', + ); \ No newline at end of file diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php index c8f64dd94..1539d7216 100644 --- a/app/lang/fr/texts.php +++ b/app/lang/fr/texts.php @@ -484,5 +484,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', + ); \ No newline at end of file diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index f0f0e9009..a1332c3ad 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -486,6 +486,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', ); diff --git a/app/lang/lt/texts.php b/app/lang/lt/texts.php index c3d3cbf1a..d67d743a4 100644 --- a/app/lang/lt/texts.php +++ b/app/lang/lt/texts.php @@ -494,6 +494,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', ); diff --git a/app/lang/nb_NO/texts.php b/app/lang/nb_NO/texts.php index 06e5c1d28..e93105b73 100644 --- a/app/lang/nb_NO/texts.php +++ b/app/lang/nb_NO/texts.php @@ -492,6 +492,12 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', + ); \ No newline at end of file diff --git a/app/lang/nl/texts.php b/app/lang/nl/texts.php index c3a2d6873..3243fd07d 100644 --- a/app/lang/nl/texts.php +++ b/app/lang/nl/texts.php @@ -487,6 +487,12 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', + ); \ No newline at end of file diff --git a/app/lang/pt_BR/texts.php b/app/lang/pt_BR/texts.php index 3b8db1cbd..83751837c 100644 --- a/app/lang/pt_BR/texts.php +++ b/app/lang/pt_BR/texts.php @@ -474,6 +474,11 @@ return array( 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', + 'invoice_history' => 'Invoice History', + 'quote_history' => 'Quote History', + 'current_version' => 'Current version', + 'select_versiony' => 'Select version', + 'view_history' => 'View History', diff --git a/app/views/invoices/view.blade.php b/app/views/invoices/view.blade.php index cd17e1fec..e8337001c 100755 --- a/app/views/invoices/view.blade.php +++ b/app/views/invoices/view.blade.php @@ -24,9 +24,9 @@
@if ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring) -