24 lines
740 B
PHP
24 lines
740 B
PHP
<?php
|
|
|
|
namespace App\Domains\Admin\Controllers;
|
|
|
|
use App\Enumerations\TaxExemptionReason;
|
|
use App\Scopes\CommonController;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class TenantTaxGetController extends CommonController
|
|
{
|
|
public function __invoke(Request $request): JsonResponse
|
|
{
|
|
return response()->json([
|
|
'tax_liable' => $this->tenant->tax_liable,
|
|
'vat_rate' => $this->tenant->vat_rate,
|
|
'tax_exemption_reason' => $this->tenant->tax_exemption_reason,
|
|
'tax_exemption_note' => $this->tenant->tax_exemption_note,
|
|
'exemption_reasons' => TaxExemptionReason::options(),
|
|
'saveEndpoint' => '/api/v1/admin/tenant/tax',
|
|
]);
|
|
}
|
|
}
|