E-Invoice - Initial commit main feature integration

This commit is contained in:
Dillon Ngo
2025-06-20 14:34:13 +08:00
parent 8d0fba2d21
commit 1d2eac806e
3 changed files with 30 additions and 3 deletions
+1 -2
View File
@@ -54,8 +54,7 @@ class CompanyModuleResource extends JsonResource
'e_invoice' => $this->company->e_invoice,
'tin' => $this->company->tin,
'msic_code' => $this->company->msic_code,
'address_einvoice' => $this->company->e_invoice ? new AddressResource($this->when($this->has('addresses'), $this->addresses->where('type', AddressType::E_INVOICE)->sortByDesc('created_at')->first())) : null,
'address_einvoice' => $this->company->e_invoice ? new AddressEInvoiceResource($this->when($this->has('addresses'), $this->addresses->where('type', AddressType::E_INVOICE)->sortByDesc('created_at')->first())) : null,
];
}