mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for including company.quotes (#3173)
This commit is contained in:
parent
d797799196
commit
8eb3c75eb4
@ -21,12 +21,13 @@ use App\Models\CompanyUser;
|
||||
use App\Models\GroupSetting;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Product;
|
||||
use App\Models\Quote;
|
||||
use App\Models\TaxRate;
|
||||
use App\Models\User;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* Class AccountTranCompanyTransformersformer.
|
||||
* Class CompanyTransformer.
|
||||
*/
|
||||
class CompanyTransformer extends EntityTransformer
|
||||
{
|
||||
@ -57,7 +58,8 @@ class CompanyTransformer extends EntityTransformer
|
||||
'company_user',
|
||||
'groups',
|
||||
'company_gateways',
|
||||
'activities'
|
||||
'activities',
|
||||
'quotes',
|
||||
];
|
||||
|
||||
|
||||
@ -150,6 +152,13 @@ class CompanyTransformer extends EntityTransformer
|
||||
return $this->includeCollection($company->invoices, $transformer, Invoice::class);
|
||||
}
|
||||
|
||||
public function includeQuotes(Company $company)
|
||||
{
|
||||
$transformer = new QuoteTransformer($this->serializer);
|
||||
|
||||
return $this->includeCollection($company->quotes, $transformer, Quote::class);
|
||||
}
|
||||
|
||||
public function includeAccount(Company $company)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user