mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 22:54:36 -04:00
Fixes for tests
This commit is contained in:
parent
b1e36f1e98
commit
5bd17ba6d1
@ -11,8 +11,10 @@
|
|||||||
|
|
||||||
namespace App\Transformers;
|
namespace App\Transformers;
|
||||||
|
|
||||||
|
use App\Models\Document;
|
||||||
use App\Models\Quote;
|
use App\Models\Quote;
|
||||||
use App\Models\QuoteInvitation;
|
use App\Models\QuoteInvitation;
|
||||||
|
use App\Transformers\DocumentTransformer;
|
||||||
use App\Transformers\QuoteInvitationTransformer;
|
use App\Transformers\QuoteInvitationTransformer;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
@ -59,18 +61,14 @@ class QuoteTransformer extends EntityTransformer
|
|||||||
|
|
||||||
return $this->includeCollection($quote->expenses, $transformer, ENTITY_EXPENSE);
|
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)
|
public function transform(Quote $quote)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user