update rm deadcode

This commit is contained in:
baodev0
2026-09-27 11:42:40 +07:00
parent 82a71244ca
commit 3af59bd9c5
129 changed files with 5194 additions and 2698 deletions
@@ -15,6 +15,7 @@ class InvoiceResource extends JsonResource
'order_num' => $this->whenLoaded('order', fn() => $this->order?->order_num),
'customer' => $this->whenLoaded('customer', fn() => [
'id' => $this->customer->id,
'uuid' => $this->customer->uuid,
'fullname' => $this->customer->fullname,
'email' => $this->customer->email,
]),
@@ -90,6 +90,7 @@ class ServiceClientDetailResource extends JsonResource
'total' => (float) $order->total,
'months' => (int) $orderItem->months,
'billing_label' => $orderItem->billing_label,
'addon_total' => \App\Support\RenewalPricing::addonTotal($this->resource, 1),
] : null,
'vm' => $vm ? [
'id' => $vm->id,
@@ -15,33 +15,33 @@ class ServiceResource extends JsonResource
public function toArray(Request $request): array
{
$billingCycleLabels = [
'monthly' => 'Hàng tháng',
'quarterly' => 'Hàng quý',
'semiannually' => 'Nửa năm',
'annually' => 'Hàng năm',
'biennially' => '2 năm',
'triennially' => '3 năm',
'onetime' => 'Một lần',
'monthly' => 'Hàng tháng',
'quarterly' => 'Hàng quý',
'semi_annually' => 'Nửa năm',
'annually' => 'Hàng năm',
'biennially' => '2 năm',
'triennially' => '3 năm',
'onetime' => 'Một lần',
];
$periodUnits = [
'monthly' => 'month',
'quarterly' => 'quarter',
'semiannually' => 'semi_year',
'annually' => 'year',
'biennially' => 'biennially',
'triennially' => 'triennially',
'onetime' => 'none',
'monthly' => 'month',
'quarterly' => 'quarter',
'semi_annually' => 'semi_year',
'annually' => 'year',
'biennially' => 'biennially',
'triennially' => 'triennially',
'onetime' => 'none',
];
$periodMonths = [
'monthly' => 1,
'quarterly' => 3,
'semiannually' => 6,
'annually' => 12,
'biennially' => 24,
'triennially' => 36,
'onetime' => 0,
'monthly' => 1,
'quarterly' => 3,
'semi_annually' => 6,
'annually' => 12,
'biennially' => 24,
'triennially' => 36,
'onetime' => 0,
];
return [