update admin payments and billings page - add address and postcode

This commit is contained in:
edmondlang
2022-08-05 23:40:59 +08:00
parent 2b1fca6b2e
commit b984f931e1
4 changed files with 20 additions and 11 deletions
@@ -3,6 +3,7 @@
namespace App\Http\Resources;
use App\Classes\Modules\Companies\Services\FetchesCompanyServices;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\BankAccountType;
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Classes\ValueObjects\Constants\DocumentType;
@@ -41,6 +42,7 @@ class CompanyModuleResource extends JsonResource
'name' => $this->name,
'reference' => $this->reference,
'address' => new AddressResource($defaultAddress),
'billingAddress' => new AddressResource($this->addresses()->where('type', AddressType::BILLING)->first()),
'company' => new CompanyResource($this->whenLoaded('company')),
'remarks' => RemarkResource::collection($this->remarks),
'marking' => $marking,