mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for observers
This commit is contained in:
parent
4c321d41c3
commit
d236dd6ff6
@ -177,36 +177,44 @@ class DemoMode extends Command
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating invoice for client #'.$client->id);
|
||||
$this->createInvoice($client);
|
||||
|
||||
for($y=0; $y<($this->count); $y++){
|
||||
$this->info("creating invoice #{$y} for client #".$client->id);
|
||||
$this->createInvoice($client);
|
||||
}
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating credit for client #'.$client->id);
|
||||
$this->createCredit($client);
|
||||
for($y=0; $y<($this->count); $y++){
|
||||
$this->info("creating credit #{$y} for client #".$client->id);
|
||||
$this->createCredit($client);
|
||||
}
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating quote for client #'.$client->id);
|
||||
$this->createQuote($client);
|
||||
for($y=0; $y<($this->count); $y++){
|
||||
$this->info("creating quote #{$y} for client #".$client->id);
|
||||
$this->createQuote($client);
|
||||
}
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating expense for client #'.$client->id);
|
||||
$this->info("creating expense for client #".$client->id);
|
||||
$this->createExpense($client);
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating vendor for client #'.$client->id);
|
||||
$this->info("creating vendor for client #".$client->id);
|
||||
$this->createVendor($client);
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating task for client #'.$client->id);
|
||||
$this->info("creating task for client #".$client->id);
|
||||
$this->createTask($client);
|
||||
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating project for client #'.$client->id);
|
||||
$this->info("creating project for client #".$client->id);
|
||||
$this->createProject($client);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Jobs\Util;
|
||||
|
||||
use App\Models\Subscription;
|
||||
use App\Transformers\ArraySerializer;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
@ -45,7 +44,7 @@ class WebhookHandler implements ShouldQueue
|
||||
|
||||
//info("i got past the check");
|
||||
|
||||
$subscriptions = Webhook::where('company_id', $this->entity->company_id)
|
||||
$subscriptions = \App\Models\Webhook::where('company_id', $this->entity->company_id)
|
||||
->where('event_id', $this->event_id)
|
||||
->get();
|
||||
|
||||
|
@ -14,7 +14,6 @@ namespace App\Observers;
|
||||
use App\Events\Client\ClientWasCreated;
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Client;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Webhook;
|
||||
|
||||
class ClientObserver
|
||||
|
@ -13,7 +13,6 @@ namespace App\Observers;
|
||||
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Webhook;
|
||||
|
||||
class ExpenseObserver
|
||||
|
@ -13,7 +13,6 @@ namespace App\Observers;
|
||||
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Webhook;
|
||||
|
||||
class InvoiceObserver
|
||||
|
@ -14,7 +14,6 @@ namespace App\Observers;
|
||||
use App\Events\Payment\PaymentWasCreated;
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Webhook;
|
||||
|
||||
class PaymentObserver
|
||||
|
@ -13,7 +13,6 @@ namespace App\Observers;
|
||||
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Quote;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Webhook;
|
||||
|
||||
class QuoteObserver
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Jobs\Util\WebhookHandler;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Task;
|
||||
use App\Models\Webhook;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user