mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 12:17:32 -04:00 
			
		
		
		
	Include Documents in Invoice transformer
This commit is contained in:
		
							parent
							
								
									2f8b79891a
								
							
						
					
					
						commit
						2034c11795
					
				| @ -28,7 +28,7 @@ class InvoiceTransformer extends EntityTransformer | ||||
|         'invitations', | ||||
|         'payments', | ||||
|         'client', | ||||
|         //'expenses',
 | ||||
|         'documents', | ||||
|     ]; | ||||
| 
 | ||||
|     public function __construct($account = null, $serializer = null, $client = null) | ||||
| @ -68,6 +68,12 @@ class InvoiceTransformer extends EntityTransformer | ||||
|         return $this->includeCollection($invoice->expenses, $transformer, ENTITY_EXPENSE); | ||||
|     } | ||||
| 
 | ||||
|     public function includeDocuments(Invoice $invoice) | ||||
|     { | ||||
|         $transformer = new DocumentTransformer($this->account, $this->serializer); | ||||
|         return $this->includeCollection($invoice->documents, $transformer, ENTITY_DOCUMENT); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public function transform(Invoice $invoice) | ||||
|     { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user