32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Domains\Admin\Controllers;
|
|
|
|
use App\Enumerations\TaxExemptionReason;
|
|
use App\Enumerations\VatPricingMode;
|
|
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,
|
|
'vat_pricing_mode' => $this->tenant->vat_pricing_mode,
|
|
'tax_number' => $this->tenant->tax_number,
|
|
'vat_id' => $this->tenant->vat_id,
|
|
'invoice_prefix' => $this->tenant->invoice_prefix,
|
|
// Im Self-Service nicht änderbar: das Präfix bestimmt den Nummernkreis.
|
|
'can_edit_invoice_prefix' => false,
|
|
'exemption_reasons' => TaxExemptionReason::options(),
|
|
'pricing_modes' => VatPricingMode::options(),
|
|
'saveEndpoint' => '/api/v1/admin/tenant/tax',
|
|
]);
|
|
}
|
|
}
|