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

Merge pull request #3827 from turbo124/v2

Fixes for tests
This commit is contained in:
David Bomba 2020-06-22 21:10:47 +10:00 committed by GitHub
commit 6e4e70c931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,10 @@
namespace App\Transformers;
use App\Models\Document;
use App\Models\Quote;
use App\Models\QuoteInvitation;
use App\Transformers\DocumentTransformer;
use App\Transformers\QuoteInvitationTransformer;
use App\Utils\Traits\MakesHash;
@ -59,18 +61,14 @@ class QuoteTransformer extends EntityTransformer
return $this->includeCollection($quote->expenses, $transformer, ENTITY_EXPENSE);
}
public function includeDocuments(quote $quote)
{
$transformer = new DocumentTransformer($this->account, $this->serializer);
$quote->documents->each(function ($document) use ($quote) {
$document->setRelation('quote', $quote);
});
return $this->includeCollection($quote->documents, $transformer, ENTITY_DOCUMENT);
}
*/
public function includeDocuments(Quote $quote)
{
$transformer = new DocumentTransformer($this->serializer);
return $this->includeCollection($quote->documents, $transformer, Document::class);
}
public function transform(Quote $quote)
{
return [