diff --git a/README.md b/README.md index 52ad5198ca..bb15e9dc68 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 a38aeae400..34f1457e60 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -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'); diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index 27b689e2c5..e4544fbb4b 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -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); diff --git a/app/Models/Company.php b/app/Models/Company.php index a70ae36750..0981383f35 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 cbd0132448..732e1fc8e1 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -921,6 +921,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 35a28d5d5e..9fea96a801 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -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(); } } diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 2ee4b4de41..7f87c9cccd 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 c03f86dc91..711486bb98 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 `_