From cfdc8a31040d035f15002347eb52fa468d5e254a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 1 Jan 2017 20:43:46 +0200 Subject: [PATCH] Add plan for up to 20 users --- app/Http/routes.php | 1 + app/Libraries/Utils.php | 6 +++++- resources/views/accounts/management.blade.php | 10 +++++++--- resources/views/partials/upgrade_modal.blade.php | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index 3093cac6c6..f27a9b9cc4 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -696,6 +696,7 @@ if (!defined('CONTACT_EMAIL')) { define('PLAN_PRICE_ENTERPRISE_MONTHLY_2', env('PLAN_PRICE_ENTERPRISE_MONTHLY_2', 12)); define('PLAN_PRICE_ENTERPRISE_MONTHLY_5', env('PLAN_PRICE_ENTERPRISE_MONTHLY_5', 18)); define('PLAN_PRICE_ENTERPRISE_MONTHLY_10', env('PLAN_PRICE_ENTERPRISE_MONTHLY_10', 24)); + define('PLAN_PRICE_ENTERPRISE_MONTHLY_20', env('PLAN_PRICE_ENTERPRISE_MONTHLY_20', 36)); define('WHITE_LABEL_PRICE', env('WHITE_LABEL_PRICE', 20)); define('INVOICE_DESIGNS_PRICE', env('INVOICE_DESIGNS_PRICE', 10)); diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 4b4ac2341e..6412da69b2 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -243,6 +243,8 @@ class Utils $price = PLAN_PRICE_ENTERPRISE_MONTHLY_5; } elseif ($numUsers <= 10) { $price = PLAN_PRICE_ENTERPRISE_MONTHLY_10; + } elseif ($numUsers <= 20) { + $price = PLAN_PRICE_ENTERPRISE_MONTHLY_20; } else { static::fatalError('Invalid number of users: ' . $numUsers); } @@ -261,8 +263,10 @@ class Utils return 1; } elseif ($max <= 5) { return 3; - } else { + } elseif ($max <= 10) { return 6; + } else { + return 11; } } diff --git a/resources/views/accounts/management.blade.php b/resources/views/accounts/management.blade.php index ff1a21ed06..51fdb40a12 100644 --- a/resources/views/accounts/management.blade.php +++ b/resources/views/accounts/management.blade.php @@ -124,7 +124,8 @@ ->label(trans('texts.users')) ->addOption('1 to 2', 2) ->addOption('3 to 5', 5) - ->addOption('6 to 10', 10) !!} + ->addOption('6 to 10', 10) + ->addOption('11 to 20', 20) !!} {!! Former::select('plan_term') @@ -296,10 +297,13 @@ } else if (numUsers == 5) { $('#plan_term option[value=month]').text({!! json_encode(trans('texts.plan_price_monthly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_5])) !!}); $('#plan_term option[value=year]').text({!! json_encode(trans('texts.plan_price_yearly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_5 * 10])) !!}); - } else { + } else if (numUsers == 10) { $('#plan_term option[value=month]').text({!! json_encode(trans('texts.plan_price_monthly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_10])) !!}); $('#plan_term option[value=year]').text({!! json_encode(trans('texts.plan_price_yearly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_10 * 10])) !!}); - } + } else { + $('#plan_term option[value=month]').text({!! json_encode(trans('texts.plan_price_monthly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_20])) !!}); + $('#plan_term option[value=year]').text({!! json_encode(trans('texts.plan_price_yearly', ['price'=>PLAN_PRICE_ENTERPRISE_MONTHLY_20 * 10])) !!}); + } } } $('#plan_term, #plan, #num_users').change(updatePlanModal); diff --git a/resources/views/partials/upgrade_modal.blade.php b/resources/views/partials/upgrade_modal.blade.php index cc3649fef0..a95060a537 100644 --- a/resources/views/partials/upgrade_modal.blade.php +++ b/resources/views/partials/upgrade_modal.blade.php @@ -167,6 +167,7 @@ +