| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Http\Resources;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class UnitAccountPayableResource extends JsonResource
- {
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'origin' => $this->origin,
- 'franchisee_account_receive_id' => $this->franchisee_account_receive_id,
- 'history' => $this->history,
- 'value' => (float) $this->value,
- 'paid_value' => (float) $this->paid_value,
- 'discount' => (float) $this->discount,
- 'fine' => (float) $this->fine,
- 'due_date' => $this->due_date?->format('Y-m-d'),
- 'payment_date' => $this->payment_date?->format('Y-m-d'),
- 'status' => $this->status,
- 'obs' => $this->obs,
- 'invoice_url' => $this->franchiseeAccountReceive?->invoice_url,
- ];
- }
- }
|