Create invoice form part 1.

This commit is contained in:
Peter Papp
2021-04-30 17:53:19 +02:00
parent 5167ae520e
commit 3c3e82758d
51 changed files with 1890 additions and 763 deletions

View File

@@ -1,10 +1,7 @@
<?php
namespace App\Http\Resources\Oasis;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class OasisInvoiceResource extends JsonResource
{
@@ -18,17 +15,17 @@ class OasisInvoiceResource extends JsonResource
{
return [
'data' => [
'id' => $this->id,
'type' => 'invoice',
'id' => $this->id,
'type' => 'invoice',
'attributes' => [
'name' => $this->client['name'] . ' ' . format_to_currency($this->total_net, $this->currency),
'name' => $this->client['name'] . ' ' . format_to_currency($this->total_net, $this->currency),
'invoiceNumber' => $this->invoice_number,
'total' => format_to_currency($this->total_net, $this->currency),
'file_url' => "/oasis/invoice/$this->id",
'mimetype' => 'pdf',
'created_at' => format_date($this->created_at, '%d. %B. %Y'),
'total' => format_to_currency($this->total_net, $this->currency),
'file_url' => "/oasis/invoice/$this->id",
'mimetype' => 'pdf',
'created_at' => format_date($this->created_at, '%d. %B. %Y'),
],
],
];
}
}
}