mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Add plan for up to 20 users
This commit is contained in:
parent
9cfdfe3099
commit
cfdc8a3104
@ -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));
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) !!}
|
||||
</div>
|
||||
|
||||
{!! 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);
|
||||
|
@ -167,6 +167,7 @@
|
||||
<option value="2">1 to 2 {{ trans('texts.users') }}</option>
|
||||
<option value="5">3 to 5 {{ trans('texts.users') }}</option>
|
||||
<option value="10">6 to 10 {{ trans('texts.users') }}</option>
|
||||
<option value="20">11 to 20 {{ trans('texts.users') }}</option>
|
||||
</select>
|
||||
<p> </p>
|
||||
<ul>
|
||||
@ -208,6 +209,8 @@
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_5 }};
|
||||
} else if (numUsers == 10) {
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_10 }};
|
||||
} else if (numUsers == 20) {
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_20 }};
|
||||
}
|
||||
var label = "{{ trans('texts.freq_monthly') }}";
|
||||
} else {
|
||||
@ -218,6 +221,8 @@
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_5 * 10 }};
|
||||
} else if (numUsers == 10) {
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_10 * 10 }};
|
||||
} else if (numUsers == 20) {
|
||||
var enterprisePrice = {{ PLAN_PRICE_ENTERPRISE_MONTHLY_20 * 10 }};
|
||||
}
|
||||
var label = "{{ trans('texts.freq_annually') }}";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user