Add description when fetch document item

The endpoint GET /api/documents/{id} return a list of items but the item
haven't the description. With this update will return the description of
a item.

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2023-07-02 23:13:09 -03:00
parent f2fd54060a
commit 8a46abcdfc
No known key found for this signature in database
GPG Key ID: B7AB4B76A7CA7318

View File

@ -22,6 +22,7 @@ class DocumentItem extends JsonResource
'document_id' => $this->document_id, 'document_id' => $this->document_id,
'item_id' => $this->item_id, 'item_id' => $this->item_id,
'name' => $this->name, 'name' => $this->name,
'description' => $this->description,
'price' => $this->price, 'price' => $this->price,
'price_formatted' => money($this->price, $this->document->currency_code, true)->format(), 'price_formatted' => money($this->price, $this->document->currency_code, true)->format(),
'total' => $this->total, 'total' => $this->total,