mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
ee8391d651
@ -1 +1 @@
|
||||
5.5.114
|
||||
5.5.115
|
@ -24,9 +24,6 @@ class AccountCreated
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public $company;
|
||||
|
@ -25,9 +25,6 @@ class ContactLoggedIn
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $client_contact;
|
||||
|
||||
public $company;
|
||||
|
@ -32,7 +32,7 @@ class CreditWasEmailed
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param Credit $credit
|
||||
* @param CreditInvitation $invitation
|
||||
* @param Company $company
|
||||
* @param array $event_vars
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ class CreditWasRestored
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* @var Client
|
||||
* @var Credit
|
||||
*/
|
||||
public $credit;
|
||||
|
||||
|
@ -23,7 +23,7 @@ class InvoiceWasEmailed
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* @var Invoice
|
||||
* @var InvoiceInvitation
|
||||
*/
|
||||
public $invitation;
|
||||
|
||||
|
@ -30,7 +30,7 @@ class InvoiceWasViewed
|
||||
* @param Company $company
|
||||
* @param array $event_vars
|
||||
*/
|
||||
public function __construct(public InvoiceInvitation $invitation, Company $company, array $event_vars)
|
||||
public function __construct(public InvoiceInvitation $invitation, public Company $company, public array $event_vars)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class MethodDeleted
|
||||
/**
|
||||
* @var ClientGatewayToken
|
||||
*/
|
||||
private $payment_method;
|
||||
public $payment_method;
|
||||
|
||||
public $company;
|
||||
|
||||
|
@ -23,7 +23,7 @@ class RecurringQuoteWasArchived
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* @var Invoice
|
||||
* @var RecurringQuote
|
||||
*/
|
||||
public $recurring_quote;
|
||||
|
||||
@ -34,7 +34,7 @@ class RecurringQuoteWasArchived
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param Invoice $recurring_quote
|
||||
* @param RecurringQuote $recurring_quote
|
||||
* @param Company $company
|
||||
* @param array $event_vars
|
||||
*/
|
||||
|
@ -26,9 +26,6 @@ class UserWasDeleted
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public $creating_user;
|
||||
|
@ -26,9 +26,6 @@ class UserWasRestored
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public $company;
|
||||
|
@ -26,9 +26,6 @@ class UserWasUpdated
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public $creating_user;
|
||||
|
@ -79,7 +79,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* A list of the inputs that are never flashed for validation exceptions.
|
||||
*
|
||||
* @var array
|
||||
* @var array<1, string>
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'current_password',
|
||||
@ -102,6 +102,11 @@ class Handler extends ExceptionHandler
|
||||
}
|
||||
|
||||
if (Ninja::isHosted()) {
|
||||
|
||||
if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) {
|
||||
event(new \Modules\Admin\Events\ThrottledExceptionRaised(auth()->user()->account->key));
|
||||
}
|
||||
|
||||
Integration::configureScope(function (Scope $scope): void {
|
||||
$name = 'hosted@invoiceninja.com';
|
||||
|
||||
@ -202,7 +207,6 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Throwable $exception
|
||||
* @return Response
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function render($request, Throwable $exception)
|
||||
|
@ -36,6 +36,7 @@ class HostedMigrationController extends Controller
|
||||
$account = (new CreateAccount($request->all(), $request->getClientIp()))->handle();
|
||||
$account->hosted_client_count = 100;
|
||||
$account->hosted_company_count = 10;
|
||||
$account->created_at = now()->subYears(2);
|
||||
$account->save();
|
||||
|
||||
MultiDB::findAndSetDbByAccountKey($account->key);
|
||||
|
@ -518,12 +518,6 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
/* If the account is verified, we allow emails to flow */
|
||||
if (Ninja::isHosted() && $this->company->account && $this->company->account->is_verified_account) {
|
||||
//11-01-2022
|
||||
|
||||
/* Continue to analyse verified accounts in case they later start sending poor quality emails*/
|
||||
// if(class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class))
|
||||
// (new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class DeleteCompanyDocuments
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param CompanyWasDeleted $event
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle($event)
|
||||
|
@ -36,7 +36,7 @@ class MailSentListener implements ShouldQueue
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @param MessageSent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(MessageSent $event)
|
||||
|
@ -32,7 +32,7 @@ class PaymentEmailFailureActivity implements ShouldQueue
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @return bool
|
||||
* @return void
|
||||
*/
|
||||
public function handle($event)
|
||||
{
|
||||
@ -41,6 +41,6 @@ class PaymentEmailFailureActivity implements ShouldQueue
|
||||
$payment = $event->payment;
|
||||
|
||||
nlog("i failed emailing {$payment->number}");
|
||||
// nlog(print_r($event->errors,1));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class PurchaseOrderCreatedListener implements ShouldQueue
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @param PurchaseOrderWasCreated $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(PurchaseOrderWasCreated $event)
|
||||
|
@ -64,7 +64,7 @@ use Laracasts\Presenter\PresentableTrait;
|
||||
* @property int|null $hosted_company_count
|
||||
* @property string|null $inapp_transaction_id
|
||||
* @property bool $set_react_as_default_ap
|
||||
* @property int $is_flagged
|
||||
* @property bool $is_flagged
|
||||
* @property int $is_verified_account
|
||||
* @property string|null $account_sms_verification_code
|
||||
* @property string|null $account_sms_verification_number
|
||||
@ -262,6 +262,11 @@ class Account extends BaseModel
|
||||
return $this->hasMany(CompanyUser::class)->where('is_owner', true)->first() ? $this->hasMany(CompanyUser::class)->where('is_owner', true)->first()->user : false;
|
||||
}
|
||||
|
||||
public function tokens()
|
||||
{
|
||||
return $this->hasMany(CompanyToken::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function getPlan()
|
||||
{
|
||||
if (Carbon::parse($this->plan_expires)->lt(now())) {
|
||||
|
@ -415,9 +415,6 @@ class ClientContact extends Authenticatable implements HasLocalePreference
|
||||
*/
|
||||
public function getLoginLink()
|
||||
{
|
||||
// $domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||
|
||||
// return $domain.'/client/key_login/'.$this->contact_key;
|
||||
|
||||
if (Ninja::isHosted()) {
|
||||
$domain = $this->company->domain();
|
||||
@ -428,18 +425,13 @@ class ClientContact extends Authenticatable implements HasLocalePreference
|
||||
switch ($this->company->portal_mode) {
|
||||
case 'subdomain':
|
||||
return $domain.'/client/key_login/'.$this->contact_key;
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain.'/client/key_login/'.$this->contact_key;
|
||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain.'/client/key_login/'.$this->contact_key;
|
||||
break;
|
||||
|
||||
default:
|
||||
return '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,17 +153,13 @@ class PurchaseOrderInvitation extends BaseModel
|
||||
switch ($this->company->portal_mode) {
|
||||
case 'subdomain':
|
||||
return $domain.'/vendor/';
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain.'/vendor/';
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain.'/vendor/';
|
||||
break;
|
||||
|
||||
default:
|
||||
return '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,17 +176,13 @@ class PurchaseOrderInvitation extends BaseModel
|
||||
switch ($this->company->portal_mode) {
|
||||
case 'subdomain':
|
||||
return $domain.'/vendor/'.$entity_type.'/'.$this->key;
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain.'/vendor/'.$entity_type.'/'.$this->key;
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain.'/vendor/'.$entity_type.'/'.$this->key;
|
||||
break;
|
||||
|
||||
default:
|
||||
return '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,25 +11,25 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Helpers\Mail\GmailTransport;
|
||||
use App\Helpers\Mail\Office365MailTransport;
|
||||
use App\Http\Middleware\SetDomainNameDb;
|
||||
use App\Utils\Ninja;
|
||||
use Livewire\Livewire;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Proposal;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\TruthSource;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use Illuminate\Mail\Mailer;
|
||||
use Illuminate\Queue\Events\JobProcessing;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use App\Helpers\Mail\GmailTransport;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\ParallelTesting;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\Queue;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Livewire\Livewire;
|
||||
use App\Http\Middleware\SetDomainNameDb;
|
||||
use Illuminate\Queue\Events\JobProcessing;
|
||||
use App\Helpers\Mail\Office365MailTransport;
|
||||
use Illuminate\Support\Facades\ParallelTesting;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -179,8 +179,23 @@ class ClientService
|
||||
*/
|
||||
public function buildStatementMailableData($pdf) :EmailObject
|
||||
{
|
||||
$email = $this->client->present()->email();
|
||||
|
||||
$email_object = new EmailObject;
|
||||
$email_object->to = [new Address($this->client->present()->email(), $this->client->present()->name())];
|
||||
$email_object->to = [new Address($email, $this->client->present()->name())];
|
||||
|
||||
$cc_contacts = $this->client
|
||||
->contacts()
|
||||
->where('send_email', true)
|
||||
->where('email', '!=', $email)
|
||||
->get();
|
||||
|
||||
foreach ($cc_contacts as $contact) {
|
||||
|
||||
$email_object->cc[] = new Address($contact->email, $contact->present()->name());
|
||||
|
||||
}
|
||||
|
||||
$email_object->attachments = [['file' => base64_encode($pdf), 'name' => ctrans('texts.statement') . ".pdf"]];
|
||||
$email_object->client_id = $this->client->id;
|
||||
$email_object->email_template_subject = 'email_subject_statement';
|
||||
|
@ -15,8 +15,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => '5.5.114',
|
||||
'app_tag' => '5.5.114',
|
||||
'app_version' => '5.5.115',
|
||||
'app_tag' => '5.5.115',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
Loading…
x
Reference in New Issue
Block a user