mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 07:54:30 -04:00
Fixes for conflicts
This commit is contained in:
commit
f59c2dc57f
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Factory;
|
namespace App\Factory;
|
||||||
|
|
||||||
|
use App\Models\CompanyUser;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
class UserFactory
|
class UserFactory
|
||||||
|
@ -308,6 +308,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
private function preFlightChecksFail()
|
private function preFlightChecksFail()
|
||||||
{
|
{
|
||||||
|
|
||||||
/* If we are migrating data we don't want to fire any emails */
|
/* If we are migrating data we don't want to fire any emails */
|
||||||
if($this->nmo->company->is_disabled && !$this->override)
|
if($this->nmo->company->is_disabled && !$this->override)
|
||||||
return true;
|
return true;
|
||||||
@ -324,6 +325,9 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
if(Ninja::isHosted() && $this->company->account && $this->company->account->emailQuotaExceeded())
|
if(Ninja::isHosted() && $this->company->account && $this->company->account->emailQuotaExceeded())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if(Ninja::isHosted() && $this->company->account && $this->nmo->company->account->is_flagged)
|
||||||
|
return true;
|
||||||
|
|
||||||
/* Ensure the user has a valid email address */
|
/* Ensure the user has a valid email address */
|
||||||
if(!str_contains($this->nmo->to_user->email, "@"))
|
if(!str_contains($this->nmo->to_user->email, "@"))
|
||||||
return true;
|
return true;
|
||||||
|
@ -373,8 +373,8 @@ class Account extends BaseModel
|
|||||||
|
|
||||||
public function getDailyEmailLimit()
|
public function getDailyEmailLimit()
|
||||||
{
|
{
|
||||||
if(Carbon::createFromTimestamp($this->created_at)->diffInDays() == 0)
|
if($this->is_flagged)
|
||||||
return 7;
|
return 0;
|
||||||
|
|
||||||
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
||||||
return 20;
|
return 20;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddFlagToAccountsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('accounts', function (Blueprint $table) {
|
||||||
|
$table->boolean('is_flagged')->default(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user