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 OasisViewInvoiceResource extends JsonResource
{
@@ -17,16 +14,16 @@ class OasisViewInvoiceResource extends JsonResource
public function toArray($request)
{
return [
'id' => $this->id,
'client_id' => $this->client_id,
'name' => $this->client['name'] . ' ' . format_to_currency($this->total_net, $this->currency),
'id' => $this->id,
'client_id' => $this->client_id,
'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",
'clientName' => $this->client['name'],
'mimetype' => 'pdf',
'type' => 'invoice',
'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",
'clientName' => $this->client['name'],
'mimetype' => 'pdf',
'type' => 'invoice',
'created_at' => format_date($this->created_at, '%d. %B. %Y'),
];
}
}
}