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

Fixes for tests

This commit is contained in:
David Bomba 2020-06-22 20:56:31 +10:00
parent b1e36f1e98
commit 5bd17ba6d1

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 [