E-Invoice - Initial commit main feature integration

This commit is contained in:
Dillon Ngo
2025-06-20 09:41:17 +08:00
parent ed4ec29d63
commit b3e8e5ea54
40 changed files with 1798 additions and 21 deletions
@@ -51,6 +51,11 @@ class CompanyModuleResource extends JsonResource
'connections' => $this->connections,
'contact' => new ContactResource ($this->when($this->has('contacts'), $this->contacts->first())),
'debtor' => $this->company->debtor,
'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,
];
}