diff --git a/README.md b/README.md index 22e1d7c87d8f..ecc615da5e4c 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/app/Constants.php b/app/Constants.php index b101e801e79d..f5bf758a9c39 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -439,7 +439,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'); diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index fca1fba585b1..b01aff93b20b 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -94,7 +94,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); diff --git a/app/Models/Company.php b/app/Models/Company.php index 41e3cf468cfb..68d541cd4f86 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -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) diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index 41a8a1d3d63c..0894a39e52b5 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -920,6 +920,10 @@ class BasePaymentDriver $amount = $payment->getCompletedAmount(); } + if ($payment->is_deleted) { + return false; + } + if (! $amount) { return false; } diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php index 3ece09757974..95c3f197b9cf 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -148,15 +148,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(); } } diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 2ee4b4de41d1..7f87c9cccdc6 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -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; diff --git a/docs/install.rst b/docs/install.rst index 40723c0218bc..713ace9e14a3 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -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 `_