diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 2cd63747f874..348e5bbc75a0 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 a178594d9bbb..536b9292b8b7 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 32b01db0002e..cd3abbd98530 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 c325342adb4b..ea0f84d14630 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 c8f64dd9443b..1539d7216223 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 f0f0e900909c..a1332c3ad927 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 c3d3cbf1a8b6..d67d743a495a 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 06e5c1d28c4c..e93105b736d8 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 c3a2d6873de9..3243fd07dfd9 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 3b8db1cbd54a..83751837ccb3 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 cd17e1fecebf..e8337001ccdb 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) -