1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-18 23:42:25 +02:00

Minor fixes

This commit is contained in:
Hillel Coren 2019-12-03 11:27:30 +02:00
parent 893d200e2c
commit 17c36b351d
8 changed files with 12 additions and 15 deletions

View File

@ -11,7 +11,7 @@
### We're on Slack, join us at [slack.invoiceninja.com](http://slack.invoiceninja.com)
All Pro and Enterprise features from the hosted app are included in the open-source code. We offer a $20 per year white-label license to remove our branding for personal use.
All Pro and Enterprise features from the hosted app are included in the open-source code. We offer a $30 per year white-label license to remove our branding for personal use.
The self-host zip includes all third party libraries whereas downloading the code from GitHub requires using Composer to install the dependencies.

View File

@ -419,7 +419,7 @@ if (! defined('APP_NAME')) {
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('WHITE_LABEL_PRICE', env('WHITE_LABEL_PRICE', 30));
define('INVOICE_DESIGNS_PRICE', env('INVOICE_DESIGNS_PRICE', 10));
define('USER_TYPE_SELF_HOST', 'SELF_HOST');

View File

@ -95,7 +95,7 @@ class StartupCheck
Session::put(SESSION_COUNTER, ++$count);
if (Utils::isNinja()) {
if ($coupon = request()->coupon && ! $company->hasActivePlan()) {
if (($coupon = request()->coupon) && ! $company->hasActivePlan()) {
if ($code = config('ninja.coupon_50_off')) {
if (hash_equals($coupon, $code)) {
$company->applyDiscount(.5);

View File

@ -103,7 +103,7 @@ class Company extends Eloquent
public function hasActivePlan()
{
return Carbon::parse($this->plan_expires) >= Carbon::today();
return $this->plan_expires && Carbon::parse($this->plan_expires) >= Carbon::today();
}
public function hasExpiredPlan($plan)

View File

@ -921,6 +921,10 @@ class BasePaymentDriver
$amount = $payment->getCompletedAmount();
}
if ($payment->is_deleted) {
return false;
}
if (! $amount) {
return false;
}

View File

@ -142,15 +142,8 @@ class AccountRepository
$query->whereRegistered(true);
})->count();
if ($count > 10 && $errorEmail = env('ERROR_EMAIL')) {
\Mail::raw($ip, function ($message) use ($ip, $errorEmail) {
$message->to($errorEmail)
->from(CONTACT_EMAIL)
->subject('Duplicate company for IP: ' . $ip);
});
if ($count >= 15) {
abort();
}
if ($count >= 15) {
abort();
}
}

View File

@ -193,7 +193,7 @@ class PaymentService extends BaseService
$successful = 0;
foreach ($payments as $payment) {
if (Auth::user()->can('edit', $payment)) {
if (Auth::user()->can('edit', $payment) && !$payment->is_deleted) {
$amount = ! empty($params['refund_amount']) ? floatval($params['refund_amount']) : null;
$sendEmail = ! empty($params['refund_email']) ? boolval($params['refund_email']) : false;
$paymentDriver = false;

View File

@ -42,7 +42,7 @@ You can either download the zip file below or checkout the code from our GitHub
https://download.invoiceninja.com
.. Note:: All Pro and Enterprise features from our hosted app are included in both the zip file and the GitHub repository. We offer a $20 per year white-label license to remove our branding.
.. Note:: All Pro and Enterprise features from our hosted app are included in both the zip file and the GitHub repository. We offer a $30 per year white-label license to remove our branding.
- Release Notes: `github.com/invoiceninja/invoiceninja/releases <https://github.com/invoiceninja/invoiceninja/releases>`_