1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge remote-tracking branch 'upstream/v5-develop' into v2-frontend-refactor

This commit is contained in:
Benjamin Beganović 2020-11-01 19:26:43 +01:00
commit 7f3c4ada5a
523 changed files with 208226 additions and 364302 deletions

View File

@ -19,3 +19,4 @@ DB_HOST=127.0.0.1
NINJA_ENVIRONMENT=hosted
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
TRAVIS=true
API_SECRET=superdoopersecrethere

View File

@ -55,10 +55,5 @@ NINJA_ENVIRONMENT=selfhost
PHANTOMJS_KEY='a-demo-key-with-low-quota-per-ip-address'
PHANTOMJS_SECRET=
SELF_UPDATER_REPO_VENDOR = invoiceninja
SELF_UPDATER_REPO_NAME = invoiceninja
SELF_UPDATER_USE_BRANCH = v2
SELF_UPDATER_MAILTO_ADDRESS = user@example.com
SELF_UPDATER_MAILTO_NAME = "John Doe"
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
SENTRY_LARAVEL_DSN=https://cc7e8e2c678041689e53e409b7dba236@sentry.invoicing.co/5

View File

@ -1 +1 @@
5.0.22
5.0.23

View File

@ -322,7 +322,7 @@ class CheckData extends Command
$total_invoice_payments = 0;
foreach ($client->invoices as $invoice) {
$total_amount = $invoice->payments->sum('pivot.amount');
$total_amount = $invoice->payments->sum('pivot.amount');
$total_refund = $invoice->payments->sum('pivot.refunded');
$total_invoice_payments += ($total_amount - $total_refund);
@ -330,7 +330,7 @@ class CheckData extends Command
foreach($client->payments as $payment)
{
$credit_total_applied += $payment->paymentables->where('paymentable_type', App\Models\Credit::class)->sum(\DB::raw('amount'));
$credit_total_applied += $payment->paymentables->where('paymentable_type', App\Models\Credit::class)->sum(DB::raw('amount'));
}
if($credit_total_applied < 0)
@ -484,9 +484,9 @@ class CheckData extends Command
} else {
$company_id = 'company_id';
}
$records = \DB::table($table)
$records = DB::table($table)
->join($tableName, "{$tableName}.id", '=', "{$table}.{$field}_id")
->where("{$table}.{$company_id}", '!=', \DB::raw("{$tableName}.company_id"))
->where("{$table}.{$company_id}", '!=', DB::raw("{$tableName}.company_id"))
->get(["{$table}.id"]);
if ($records->count()) {

View File

@ -11,8 +11,6 @@
namespace App\Console\Commands;
use App\Console\Commands\TestData\CreateTestCreditJob;
use App\Console\Commands\TestData\CreateTestQuoteJob;
use App\DataMapper\CompanySettings;
use App\DataMapper\DefaultSettings;
use App\Events\Invoice\InvoiceWasCreated;
@ -73,10 +71,11 @@ class CreateSingleAccount extends Command
protected $count;
protected $gateway;
/**
* Create a new command instance.
*
* @return void
* @param InvoiceRepository $invoice_repo
*/
public function __construct(InvoiceRepository $invoice_repo)
{
@ -242,7 +241,7 @@ class CreateSingleAccount extends Command
$settings = $client->settings;
$settings->currency_id = "1";
$settings->use_credits_payment = "always";
$client->settings = $settings;
$country = Country::all()->random();
@ -301,7 +300,7 @@ class CreateSingleAccount extends Command
private function createInvoice($client)
{
$faker = \Faker\Factory::create();
$faker = Factory::create();
$invoice = InvoiceFactory::create($client->company->id, $client->user->id); //stub the company and user_id
$invoice->client_id = $client->id;
@ -350,7 +349,7 @@ class CreateSingleAccount extends Command
private function createCredit($client)
{
$faker = \Faker\Factory::create();
$faker = Factory::create();
$credit = Credit::factory()->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
@ -375,7 +374,7 @@ class CreateSingleAccount extends Command
private function createQuote($client)
{
$faker = \Faker\Factory::create();
$faker = Factory::create();
$quote = Quote::factory()->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
$quote->date = $faker->date();
@ -434,7 +433,7 @@ class CreateSingleAccount extends Command
$item->custom_value4 = $product->custom_value4;
$line_items[] = $item;
return $line_items;
}

View File

@ -11,8 +11,6 @@
namespace App\Console\Commands;
use App\Console\Commands\TestData\CreateTestCreditJob;
use App\Console\Commands\TestData\CreateTestQuoteJob;
use App\DataMapper\CompanySettings;
use App\DataMapper\DefaultSettings;
use App\Events\Invoice\InvoiceWasCreated;
@ -72,7 +70,7 @@ class CreateTestData extends Command
/**
* Create a new command instance.
*
* @return void
* @param InvoiceRepository $invoice_repo
*/
public function __construct(InvoiceRepository $invoice_repo)
{
@ -474,7 +472,7 @@ class CreateTestData extends Command
private function createInvoice($client)
{
$faker = \Faker\Factory::create();
$faker = Factory::create();
$invoice = InvoiceFactory::create($client->company->id, $client->user->id); //stub the company and user_id
$invoice->client_id = $client->id;
@ -524,12 +522,8 @@ class CreateTestData extends Command
private function createCredit($client)
{
// for($x=0; $x<$this->count; $x++){
// dispatch(new CreateTestCreditJob($client));
// }
$faker = \Faker\Factory::create();
$faker = Factory::create();
$credit = Credit::factory()->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
@ -568,11 +562,8 @@ class CreateTestData extends Command
private function createQuote($client)
{
// for($x=0; $x<$this->count; $x++){
// dispatch(new CreateTestQuoteJob($client));
// }
$faker = \Faker\Factory::create();
$faker = Factory::create();
//$quote = QuoteFactory::create($client->company->id, $client->user->id);//stub the company and user_id
$quote = Quote::factory()->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);

View File

@ -57,8 +57,6 @@ class DemoMode extends Command
{
use MakesHash, GeneratesCounter;
private $count;
protected $name = 'ninja:demo-mode';
/**
* The name and signature of the console command.
@ -266,7 +264,7 @@ class DemoMode extends Command
// }
$client = $company->clients->random();
$this->createExpense($client, $u2->id);
$this->createExpense($client);
//$this->info("creating expense for client #".$client->id);
@ -439,11 +437,7 @@ class DemoMode extends Command
private function createCredit($client, $assigned_user_id = null)
{
// for($x=0; $x<$this->count; $x++){
// dispatch(new CreateTestCreditJob($client));
// }
$faker = \Faker\Factory::create();
$credit = Credit::factory()->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);

View File

@ -13,6 +13,7 @@ namespace App\Console\Commands;
use App\Models\Design;
use Illuminate\Console\Command;
use stdClass;
class DesignUpdate extends Command
{
@ -52,7 +53,7 @@ class DesignUpdate extends Command
$invoice_design = new $class();
$invoice_design->document();
$design_object = new \stdClass;
$design_object = new stdClass;
$design_object->includes = $invoice_design->getSectionHTML('style');
$design_object->header = $invoice_design->getSectionHTML('header');
$design_object->body = $invoice_design->getSectionHTML('body');

View File

@ -18,7 +18,11 @@ use App\Models\Company;
use App\Models\CompanyToken;
use App\Models\User;
use App\Utils\Traits\MakesHash;
use DirectoryIterator;
use Faker\Factory;
use Faker\Generator;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class ImportMigrations extends Command
{
@ -38,7 +42,7 @@ class ImportMigrations extends Command
protected $description = 'Massively import the migrations.';
/**
* @var \Faker\Generator
* @var Generator
*/
private $faker;
@ -49,7 +53,7 @@ class ImportMigrations extends Command
*/
public function __construct()
{
$this->faker = \Faker\Factory::create();
$this->faker = Factory::create();
parent::__construct();
}
@ -63,7 +67,7 @@ class ImportMigrations extends Command
{
$path = $this->option('path') ?? storage_path('migrations/import');
$directory = new \DirectoryIterator($path);
$directory = new DirectoryIterator($path);
foreach ($directory as $file) {
if ($file->getExtension() === 'zip') {
@ -89,7 +93,7 @@ class ImportMigrations extends Command
'company_id' => $company->id,
'account_id' => $account->id,
'name' => 'test token',
'token' => \Illuminate\Support\Str::random(64),
'token' => Str::random(64),
]);
$user->companies()->attach($company->id, [

View File

@ -18,6 +18,7 @@ use Composer\Installer;
use Composer\IO\NullIO;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Log;
use Symfony\Component\Console\Input\ArrayInput;
class PostUpdate extends Command
@ -41,10 +42,11 @@ class PostUpdate extends Command
* Execute the console command.
*
* @return mixed
* @throws \Exception
*/
public function handle()
{
set_time_limit(0);
info('running post update');
@ -52,13 +54,13 @@ class PostUpdate extends Command
try {
Artisan::call('migrate', ['--force' => true]);
} catch (Exception $e) {
\Log::error("I wasn't able to migrate the data.");
Log::error("I wasn't able to migrate the data.");
}
try {
Artisan::call('optimize');
} catch (Exception $e) {
\Log::error("I wasn't able to optimize.");
Log::error("I wasn't able to optimize.");
}
/* For the following to work, the web user (www-data) must own all the directories */
@ -67,7 +69,7 @@ class PostUpdate extends Command
$input = new ArrayInput(array('command' => 'install', '--no-dev' => 'true'));
$application = new Application();
$application->setAutoExit(false);
$application->setAutoExit(false);
$application->run($input);
echo "Done.";

View File

@ -26,6 +26,7 @@ use App\Models\ClientContact;
use App\Models\Company;
use App\Models\Invoice;
use App\Models\User;
use Faker\Factory;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Mail;
@ -70,7 +71,7 @@ class SendTestEmails extends Command
private function sendTemplateEmails($template)
{
$faker = \Faker\Factory::create();
$faker = Factory::create();
$message = [
'title' => 'Invoice XJ-3838',
@ -82,7 +83,7 @@ class SendTestEmails extends Command
$user = User::whereEmail('user@example.com')->first();
if (! $user) {
$account = Account::factory()->create();
$user = User::factory()->create([

View File

@ -1,136 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Console\Commands\TestData;
use App\Events\Invoice\InvoiceWasCreated;
use App\Events\Payment\PaymentWasCreated;
use App\Factory\InvoiceFactory;
use App\Factory\InvoiceItemFactory;
use App\Factory\PaymentFactory;
use App\Helpers\Invoice\InvoiceSum;
use App\Listeners\Credit\CreateCreditInvitation;
use App\Models\Client;
use App\Models\Payment;
use App\Models\PaymentType;
use App\Models\Product;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Carbon;
class CreateTestCreditJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, MakesHash;
protected $client;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Client $client)
{
$this->client = $client;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$faker = \Faker\Factory::create();
$credit = Credit::factory()->create(['user_id' => $this->client->user->id, 'company_id' => $this->client->company->id, 'client_id' => $this->client->id]);
//$invoice = InvoiceFactory::create($this->client->company->id, $this->client->user->id);//stub the company and user_id
//$invoice->client_id = $this->client->id;
// $invoice->date = $faker->date();
$dateable = Carbon::now()->subDays(rand(0, 90));
$credit->date = $dateable;
$credit->line_items = $this->buildLineItems(rand(1, 10));
$credit->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$credit->tax_name1 = 'GST';
$credit->tax_rate1 = 10.00;
}
if (rand(0, 1)) {
$credit->tax_name2 = 'VAT';
$credit->tax_rate2 = 17.50;
}
if (rand(0, 1)) {
$credit->tax_name3 = 'CA Sales Tax';
$credit->tax_rate3 = 5;
}
$credit->save();
$invoice_calc = new InvoiceSum($credit);
$invoice_calc->build();
$credit = $invoice_calc->getCredit();
$credit->save();
event(new CreateCreditInvitation($credit, $credit->company, Ninja::eventVars()));
}
private function buildLineItems($count = 1)
{
$line_items = [];
for ($x = 0; $x < $count; $x++) {
$item = InvoiceItemFactory::create();
$item->quantity = 1;
//$item->cost = 10;
if (rand(0, 1)) {
$item->tax_name1 = 'GST';
$item->tax_rate1 = 10.00;
}
if (rand(0, 1)) {
$item->tax_name1 = 'VAT';
$item->tax_rate1 = 17.50;
}
if (rand(0, 1)) {
$item->tax_name1 = 'Sales Tax';
$item->tax_rate1 = 5;
}
$product = Product::all()->random();
$item->cost = (float) $product->cost;
$item->product_key = $product->product_key;
$item->notes = $product->notes;
$item->custom_value1 = $product->custom_value1;
$item->custom_value2 = $product->custom_value2;
$item->custom_value3 = $product->custom_value3;
$item->custom_value4 = $product->custom_value4;
$line_items[] = $item;
}
return $line_items;
}
}

View File

@ -1,129 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Console\Commands\TestData;
use App\Events\Invoice\InvoiceWasCreated;
use App\Events\Payment\PaymentWasCreated;
use App\Factory\InvoiceFactory;
use App\Factory\InvoiceItemFactory;
use App\Factory\PaymentFactory;
use App\Helpers\Invoice\InvoiceSum;
use App\Jobs\Quote\CreateQuoteInvitations;
use App\Models\Client;
use App\Models\Payment;
use App\Models\PaymentType;
use App\Models\Product;
use App\Utils\Traits\MakesHash;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Carbon;
class CreateTestQuoteJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, MakesHash;
protected $client;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Client $client)
{
$this->client = $client;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$faker = \Faker\Factory::create();
$quote = Quote::factory()->create(['user_id' => $this->client->user->id, 'company_id' => $this->client->company->id, 'client_id' => $this->client->id]);
$quote->date = $faker->date();
$quote->line_items = $this->buildLineItems(rand(1, 10));
$quote->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$quote->tax_name1 = 'GST';
$quote->tax_rate1 = 10.00;
}
if (rand(0, 1)) {
$quote->tax_name2 = 'VAT';
$quote->tax_rate2 = 17.50;
}
if (rand(0, 1)) {
$quote->tax_name3 = 'CA Sales Tax';
$quote->tax_rate3 = 5;
}
$quote->save();
$quote_calc = new InvoiceSum($quote);
$quote_calc->build();
$quote = $quote_calc->getQuote();
$quote->service()->markSent()->save();
CreateQuoteInvitations::dispatch($quote, $quote->company);
}
private function buildLineItems($count = 1)
{
$line_items = [];
for ($x = 0; $x < $count; $x++) {
$item = InvoiceItemFactory::create();
$item->quantity = 1;
//$item->cost = 10;
if (rand(0, 1)) {
$item->tax_name1 = 'GST';
$item->tax_rate1 = 10.00;
}
if (rand(0, 1)) {
$item->tax_name1 = 'VAT';
$item->tax_rate1 = 17.50;
}
if (rand(0, 1)) {
$item->tax_name1 = 'Sales Tax';
$item->tax_rate1 = 5;
}
$product = Product::all()->random();
$item->cost = (float) $product->cost;
$item->product_key = $product->product_key;
$item->notes = $product->notes;
$item->custom_value1 = $product->custom_value1;
$item->custom_value2 = $product->custom_value2;
$item->custom_value3 = $product->custom_value3;
$item->custom_value4 = $product->custom_value4;
$line_items[] = $item;
}
return $line_items;
}
}

View File

@ -38,7 +38,7 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @param Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)

View File

@ -15,6 +15,7 @@ use App\DataMapper\ClientSettings;
use App\DataMapper\CompanySettings;
use App\Models\Client;
use App\Utils\TranslationHelper;
use stdClass;
/**
* ClientSettings.
@ -44,7 +45,7 @@ class ClientSettings extends BaseSettings
* prevents missing properties from not being returned
* and always ensure an up to date class is returned.
*
* @return \stdClass
* @param $obj
*/
public function __construct($obj)
{
@ -54,9 +55,9 @@ class ClientSettings extends BaseSettings
/**
* Default Client Settings scaffold.
*
* @return \stdClass
* @return stdClass
*/
public static function defaults() : \stdClass
public static function defaults() : stdClass
{
$data = (object) [
'entity' => (string) Client::class,
@ -70,9 +71,9 @@ class ClientSettings extends BaseSettings
/**
* Merges settings from Company to Client.
*
* @param \stdClass $company_settings
* @param \stdClass $client_settings
* @return \stdClass of merged settings
* @param stdClass $company_settings
* @param stdClass $client_settings
* @return stdClass of merged settings
*/
public static function buildClientSettings($company_settings, $client_settings)
{

View File

@ -13,6 +13,7 @@ namespace App\DataMapper;
use App\DataMapper\CompanySettings;
use App\Utils\Traits\MakesHash;
use stdClass;
/**
* CompanySettings.
@ -497,7 +498,7 @@ class CompanySettings extends BaseSettings
* prevents missing properties from not being returned
* and always ensure an up to date class is returned.
*
* @return \stdClass
* @param $obj
*/
public function __construct($obj)
{
@ -506,9 +507,9 @@ class CompanySettings extends BaseSettings
/**
* Provides class defaults on init.
* @return object
* @return stdClass
*/
public static function defaults():\stdClass
public static function defaults(): stdClass
{
$config = json_decode(config('ninja.settings'));
@ -537,9 +538,10 @@ class CompanySettings extends BaseSettings
* need to provide a fallback catch on old settings objects which will
* set new properties to the object prior to being returned.
*
* @param object $data The settings object to be checked
* @param $settings
* @return stdClass
*/
public static function setProperties($settings):\stdClass
public static function setProperties($settings): stdClass
{
$company_settings = (object) get_class_vars(self::class);
@ -554,7 +556,7 @@ class CompanySettings extends BaseSettings
public static function notificationDefaults()
{
$notification = new \stdClass;
$notification = new stdClass;
$notification->email = ['all_notifications'];
return $notification;

View File

@ -13,6 +13,7 @@ namespace App\DataMapper;
use App\Models\Client;
use App\Models\User;
use stdClass;
/**
* Class DefaultSettings.
@ -25,11 +26,11 @@ class DefaultSettings extends BaseSettings
public static $per_page = 25;
/**
* @return \stdClass
* @return stdClass
*
* //todo user specific settings / preferences.
*/
public static function userSettings() : \stdClass
public static function userSettings() : stdClass
{
return (object) [
// class_basename(User::class) => self::userSettingsObject(),
@ -37,9 +38,9 @@ class DefaultSettings extends BaseSettings
}
/**
* @return \stdClass
* @return stdClass
*/
private static function userSettingsObject() : \stdClass
private static function userSettingsObject() : stdClass
{
return (object) [
// 'per_page' => self::$per_page,

View File

@ -148,12 +148,10 @@ class EmailTemplateDefaults
public static function emailPaymentTemplate()
{
$converter = new CommonMarkConverter([
'html_input' => 'strip',
'allow_unsafe_links' => false,
]);
return $converter->convertToHtml(self::transformText('payment_message'));
$payment_message = '<p>'.self::transformText('payment_message').'</p><br><br><p>$view_link</p>';
return $payment_message;
}
@ -166,12 +164,11 @@ class EmailTemplateDefaults
public static function emailPaymentPartialTemplate()
{
$converter = new CommonMarkConverter([
'html_input' => 'strip',
'allow_unsafe_links' => false,
]);
return $converter->convertToHtml(self::transformText('payment_message'));
$payment_message = '<p>'.self::transformText('payment_message').'</p><br><br><p>$view_link</p>';
return $payment_message;
}
public static function emailPaymentPartialSubject()

View File

@ -13,6 +13,7 @@ namespace App\DataMapper;
use App\DataMapper\CompanySettings;
use App\Utils\Traits\MakesHash;
use stdClass;
/**
* FreeCompanySettings.
@ -140,7 +141,7 @@ class FreeCompanySettings extends BaseSettings
* prevents missing properties from not being returned
* and always ensure an up to date class is returned.
*
* @return \stdClass
* @param $obj
*/
public function __construct($obj)
{
@ -148,9 +149,9 @@ class FreeCompanySettings extends BaseSettings
/**
* Provides class defaults on init.
* @return object
* @return stdClass
*/
public static function defaults():\stdClass
public static function defaults(): stdClass
{
$config = json_decode(config('ninja.settings'));

View File

@ -38,7 +38,9 @@ class AccountCreated
/**
* Create a new event instance.
*
* @return void
* @param $user
* @param $company
* @param $event_vars
*/
public function __construct($user, $company, $event_vars)
{
@ -50,7 +52,7 @@ class AccountCreated
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -41,6 +41,8 @@ class ClientWasArchived
* Create a new event instance.
*
* @param Client $client
* @param Company $company
* @param array $event_vars
*/
public function __construct(Client $client, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class ClientWasArchived
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -35,6 +35,8 @@ class ClientWasCreated
* Create a new event instance.
*
* @param Client $client
* @param Company $company
* @param array $event_vars
*/
public function __construct(Client $client, Company $company, array $event_vars)
{

View File

@ -34,6 +34,8 @@ class ClientWasDeleted
* Create a new event instance.
*
* @param Client $client
* @param Company $company
* @param array $event_vars
*/
public function __construct(Client $client, Company $company, array $event_vars)
{

View File

@ -34,6 +34,8 @@ class ClientWasRestored
* Create a new event instance.
*
* @param Client $client
* @param Company $company
* @param array $event_vars
*/
public function __construct(Client $client, Company $company, array $event_vars)
{

View File

@ -34,6 +34,8 @@ class ClientWasUpdated
* Create a new event instance.
*
* @param Client $client
* @param Company $company
* @param array $event_vars
*/
public function __construct(Client $client, Company $company, array $event_vars)
{

View File

@ -42,7 +42,7 @@ class CompanyDocumentsDeleted
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -39,7 +39,9 @@ class ContactLoggedIn
/**
* Create a new event instance.
*
* @return void
* @param ClientContact $client_contact
* @param $company
* @param $event_vars
*/
public function __construct(ClientContact $client_contact, $company, $event_vars)
{
@ -51,7 +53,7 @@ class ContactLoggedIn
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -31,6 +31,8 @@ class CreditWasArchived
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -31,6 +31,8 @@ class CreditWasCreated
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -31,6 +31,8 @@ class CreditWasDeleted
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -30,6 +30,8 @@ class CreditWasEmailed
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -34,6 +34,8 @@ class CreditWasMarkedSent
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -33,7 +33,9 @@ class CreditWasRestored
/**
* Create a new event instance.
*
* @param Client $client
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -31,6 +31,8 @@ class CreditWasUpdated
* Create a new event instance.
*
* @param Credit $credit
* @param Company $company
* @param array $event_vars
*/
public function __construct(Credit $credit, Company $company, array $event_vars)
{

View File

@ -41,6 +41,8 @@ class DesignWasArchived
* Create a new event instance.
*
* @param Design $design
* @param Company $company
* @param array $event_vars
*/
public function __construct(Design $design, Company $company, array $event_vars)
{
@ -54,7 +56,7 @@ class DesignWasArchived
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -13,6 +13,7 @@ namespace App\Events\Design;
use App\Models\Company;
use App\Models\Design;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
/**
@ -35,6 +36,8 @@ class DesignWasCreated
* Create a new event instance.
*
* @param Design $design
* @param Company $company
* @param array $event_vars
*/
public function __construct(Design $design, Company $company, array $event_vars)
{
@ -48,7 +51,7 @@ class DesignWasCreated
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return PrivateChannel
*/
public function broadcastOn()
{

View File

@ -13,6 +13,7 @@ namespace App\Events\Design;
use App\Models\Company;
use App\Models\Design;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
/**
@ -35,6 +36,8 @@ class DesignWasDeleted
* Create a new event instance.
*
* @param Design $design
* @param Company $company
* @param array $event_vars
*/
public function __construct(Design $design, Company $company, array $event_vars)
{
@ -48,7 +51,7 @@ class DesignWasDeleted
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return PrivateChannel
*/
public function broadcastOn()
{

View File

@ -13,6 +13,7 @@ namespace App\Events\Design;
use App\Models\Company;
use App\Models\Design;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
/**
@ -35,6 +36,8 @@ class DesignWasRestored
* Create a new event instance.
*
* @param Design $design
* @param Company $company
* @param array $event_vars
*/
public function __construct(Design $design, Company $company, array $event_vars)
{
@ -48,7 +51,7 @@ class DesignWasRestored
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return PrivateChannel
*/
public function broadcastOn()
{

View File

@ -13,6 +13,7 @@ namespace App\Events\Design;
use App\Models\Company;
use App\Models\Design;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
/**
@ -35,6 +36,8 @@ class DesignWasUpdated
* Create a new event instance.
*
* @param Design $design
* @param Company $company
* @param array $event_vars
*/
public function __construct(Design $design, Company $company, array $event_vars)
{
@ -48,7 +51,7 @@ class DesignWasUpdated
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return PrivateChannel
*/
public function broadcastOn()
{

View File

@ -41,6 +41,8 @@ class DocumentWasArchived
* Create a new event instance.
*
* @param Document $document
* @param Company $company
* @param array $event_vars
*/
public function __construct(Document $document, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class DocumentWasArchived
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -35,6 +35,8 @@ class DocumentWasCreated
* Create a new event instance.
*
* @param Document $document
* @param Company $company
* @param array $event_vars
*/
public function __construct(Document $document, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class DocumentWasDeleted
* Create a new event instance.
*
* @param Document $document
* @param Company $company
* @param array $event_vars
*/
public function __construct(Document $document, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class DocumentWasRestored
* Create a new event instance.
*
* @param Document $document
* @param Company $company
* @param array $event_vars
*/
public function __construct(Document $document, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class DocumentWasUpdated
* Create a new event instance.
*
* @param Document $document
* @param Company $company
* @param array $event_vars
*/
public function __construct(Document $document, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class ExpenseWasArchived
* Create a new event instance.
*
* @param Expense $expense
* @param Company $company
* @param array $event_vars
*/
public function __construct(Expense $expense, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class ExpenseWasCreated
* Create a new event instance.
*
* @param Expense $expense
* @param Company $company
* @param array $event_vars
*/
public function __construct(Expense $expense, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class ExpenseWasDeleted
* Create a new event instance.
*
* @param Expense $expense
* @param Company $company
* @param array $event_vars
*/
public function __construct(Expense $expense, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class ExpenseWasRestored
* Create a new event instance.
*
* @param Expense $expense
* @param Company $company
* @param array $event_vars
*/
public function __construct(Expense $expense, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class ExpenseWasUpdated
* Create a new event instance.
*
* @param Expense $expense
* @param Company $company
* @param array $event_vars
*/
public function __construct(Expense $expense, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasArchived
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasCancelled
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasCreated
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasDeleted
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -34,7 +34,9 @@ class InvoiceWasEmailed
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param InvoiceInvitation $invitation
* @param Company $company
* @param array $event_vars
*/
public function __construct(InvoiceInvitation $invitation, Company $company, array $event_vars)
{

View File

@ -40,6 +40,9 @@ class InvoiceWasEmailedAndFailed
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param string $errors
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, string $errors, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasMarkedSent
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasPaid
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -38,6 +38,8 @@ class InvoiceWasRestored
*
* @param Invoice $invoice
* @param $fromDeleted
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, $fromDeleted, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class InvoiceWasReversed
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -37,6 +37,8 @@ class InvoiceWasUpdated
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(Invoice $invoice, Company $company, array $event_vars)
{

View File

@ -34,7 +34,9 @@ class InvoiceWasViewed
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param InvoiceInvitation $invitation
* @param Company $company
* @param array $event_vars
*/
public function __construct(InvoiceInvitation $invitation, Company $company, array $event_vars)
{

View File

@ -35,7 +35,10 @@ class InvitationWasViewed
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param $entity
* @param $invitation
* @param $company
* @param $event_vars
*/
public function __construct($entity, $invitation, $company, $event_vars)
{

View File

@ -38,6 +38,8 @@ class MethodDeleted
* Create a new event instance.
*
* @param ClientGatewayToken $payment_method
* @param Company $company
* @param array $event_vars
*/
public function __construct(ClientGatewayToken $payment_method, Company $company, array $event_vars)
{
@ -49,7 +51,7 @@ class MethodDeleted
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -35,6 +35,8 @@ class PaymentCompleted
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentFailed
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasArchived
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasCreated
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasDeleted
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasEmailed
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,7 +35,9 @@ class PaymentWasEmailedAndFailed
/**
* PaymentWasEmailedAndFailed constructor.
* @param Payment $payment
* @param $company
* @param array $errors
* @param array $event_vars
*/
public function __construct(Payment $payment, $company, array $errors, array $event_vars)
{

View File

@ -37,7 +37,9 @@ class PaymentWasRefunded
* Create a new event instance.
*
* @param Payment $payment
* @param $refund_amount
* @param float $refund_amount
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, float $refund_amount, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasRestored
*
* @param Payment $payment
* @param $fromDeleted
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, $fromDeleted, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasUpdated
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class PaymentWasVoided
* Create a new event instance.
*
* @param Payment $payment
* @param Company $company
* @param array $event_vars
*/
public function __construct(Payment $payment, Company $company, array $event_vars)
{

View File

@ -30,7 +30,9 @@ class ProductWasArchived
/**
* Create a new event instance.
*
* @return void
* @param Product $product
* @param Company $company
* @param array $event_vars
*/
public function __construct(Product $product, Company $company, array $event_vars)
{

View File

@ -33,7 +33,10 @@ class ProductWasCreated
/**
* Create a new event instance.
*
* @return void
* @param Product $product
* @param $input
* @param Company $company
* @param array $event_vars
*/
public function __construct(Product $product, $input, Company $company, array $event_vars)
{

View File

@ -31,7 +31,9 @@ class ProductWasDeleted
/**
* Create a new event instance.
*
* @return void
* @param Product $product
* @param Company $company
* @param array $event_vars
*/
public function __construct(Product $product, Company $company, array $event_vars)
{

View File

@ -30,7 +30,9 @@ class ProductWasUpdated
/**
* Create a new event instance.
*
* @return void
* @param Product $product
* @param Company $company
* @param array $event_vars
*/
public function __construct(Product $product, Company $company, array $event_vars)
{

View File

@ -37,7 +37,10 @@ class QuoteWasApproved
/**
* Create a new event instance.
*
* @return void
* @param ClientContact $contact
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(ClientContact $contact, Quote $quote, Company $company, array $event_vars)
{

View File

@ -27,7 +27,9 @@ class QuoteWasArchived
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -30,7 +30,9 @@ class QuoteWasCreated
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -30,7 +30,9 @@ class QuoteWasDeleted
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -33,7 +33,10 @@ class QuoteWasEmailed
/**
* Create a new event instance.
*
* @param $quote
* @param Quote $quote
* @param string $notes
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, string $notes, Company $company, array $event_vars)
{

View File

@ -37,6 +37,8 @@ class QuoteWasEmailedAndFailed
* QuoteWasEmailedAndFailed constructor.
* @param Quote $quote
* @param array $errors
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, array $errors, Company $company, array $event_vars)
{

View File

@ -31,7 +31,9 @@ class QuoteWasMarkedApproved
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -31,7 +31,9 @@ class QuoteWasMarkedSent
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -30,7 +30,9 @@ class QuoteWasRestored
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -31,7 +31,9 @@ class QuoteWasUpdated
/**
* Create a new event instance.
*
* @return void
* @param Quote $quote
* @param Company $company
* @param array $event_vars
*/
public function __construct(Quote $quote, Company $company, array $event_vars)
{

View File

@ -12,6 +12,7 @@
namespace App\Events\Quote;
use App\Models\Company;
use App\Models\QuoteInvitation;
use Illuminate\Queue\SerializesModels;
/**

View File

@ -35,6 +35,8 @@ class TaskWasArchived
* Create a new event instance.
*
* @param Task $task
* @param Company $company
* @param array $event_vars
*/
public function __construct(Task $task, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class TaskWasCreated
* Create a new event instance.
*
* @param Task $task
* @param Company $company
* @param array $event_vars
*/
public function __construct(Task $task, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class TaskWasDeleted
* Create a new event instance.
*
* @param Task $task
* @param Company $company
* @param array $event_vars
*/
public function __construct(Task $task, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class TaskWasRestored
* Create a new event instance.
*
* @param Task $task
* @param Company $company
* @param array $event_vars
*/
public function __construct(Task $task, Company $company, array $event_vars)
{

View File

@ -35,6 +35,8 @@ class TaskWasUpdated
* Create a new event instance.
*
* @param Task $task
* @param Company $company
* @param array $event_vars
*/
public function __construct(Task $task, Company $company, array $event_vars)
{

View File

@ -40,7 +40,9 @@ class UserLoggedIn
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserLoggedIn
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -40,7 +40,9 @@ class UserWasArchived
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserWasArchived
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -40,7 +40,9 @@ class UserWasCreated
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserWasCreated
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -40,7 +40,9 @@ class UserWasDeleted
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserWasDeleted
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -40,7 +40,9 @@ class UserWasRestored
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserWasRestored
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

View File

@ -40,7 +40,9 @@ class UserWasUpdated
/**
* Create a new event instance.
*
* @return void
* @param User $user
* @param Company $company
* @param array $event_vars
*/
public function __construct(User $user, Company $company, array $event_vars)
{
@ -52,7 +54,7 @@ class UserWasUpdated
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
* @return Channel|array
*/
public function broadcastOn()
{

Some files were not shown because too many files have changed in this diff Show More