mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Include quotes in observer
This commit is contained in:
parent
9e1418cb11
commit
de4aaabcc9
@ -237,9 +237,12 @@ class Import implements ShouldQueue
|
||||
//company size check
|
||||
if ($this->company->invoices()->count() > 500 || $this->company->products()->count() > 500 || $this->company->clients()->count() > 500) {
|
||||
$this->company->is_large = true;
|
||||
$this->company->save();
|
||||
}
|
||||
|
||||
|
||||
$this->company->client_registration_fields = \App\DataMapper\ClientRegistrationFields::generate();
|
||||
$this->company->save();
|
||||
|
||||
$this->setInitialCompanyLedgerBalances();
|
||||
|
||||
// $this->fixClientBalances();
|
||||
|
@ -30,9 +30,9 @@ class QuoteObserver
|
||||
->where('event_id', Webhook::EVENT_CREATE_QUOTE)
|
||||
->exists();
|
||||
|
||||
$quote->load('client');
|
||||
|
||||
if ($subscriptions) {
|
||||
$quote->load('client');
|
||||
WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote, $quote->company);
|
||||
}
|
||||
}
|
||||
@ -49,10 +49,10 @@ class QuoteObserver
|
||||
->where('event_id', Webhook::EVENT_UPDATE_QUOTE)
|
||||
->exists();
|
||||
|
||||
$quote->load('client');
|
||||
|
||||
|
||||
if ($subscriptions) {
|
||||
$quote->load('client');
|
||||
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote, $quote->company);
|
||||
}
|
||||
|
||||
@ -71,6 +71,7 @@ class QuoteObserver
|
||||
->exists();
|
||||
|
||||
if ($subscriptions) {
|
||||
$quote->load('client');
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote, $quote->company);
|
||||
}
|
||||
}
|
||||
|
@ -165,6 +165,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'markdown_enabled' => (bool) $company->markdown_enabled,
|
||||
'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place,
|
||||
'report_include_drafts' => (bool) $company->report_include_drafts,
|
||||
'client_registration_fields' => (array) $company->client_registration_fields,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
@csrf
|
||||
|
||||
<div class="grid grid-cols-12 gap-4 mt-10">
|
||||
@if($company->client_registration_fields)
|
||||
@foreach($company->client_registration_fields as $field)
|
||||
@if($field['required'])
|
||||
<div class="col-span-12 md:col-span-6">
|
||||
@ -96,6 +97,7 @@
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between items-center mt-8">
|
||||
|
Loading…
x
Reference in New Issue
Block a user