update email template
This commit is contained in:
@@ -95,7 +95,7 @@ class CustomerBillingService
|
||||
{
|
||||
$customer = $this->resolveCustomer($uuid);
|
||||
|
||||
return $this->orderRepository->filter(['client' => $customer->id], ['customer', 'payment', 'invoice']);
|
||||
return $this->orderRepository->filter(['client' => $customer->id], ['customer', 'payment', 'invoices']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,6 +114,6 @@ class CustomerBillingService
|
||||
// (dùng ở getOrders) được xoá theo — xem ghi chú ở updateInvoice.
|
||||
$this->orderRepository->update($orderId, $data);
|
||||
|
||||
return $order->refresh()->load(['payment', 'invoice']);
|
||||
return $order->refresh()->load(['payment', 'invoices']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ class CustomerServiceProvisioningService
|
||||
);
|
||||
|
||||
$billingCycle = $data['billing_cycle'] ?? 'monthly';
|
||||
$months = $this->cycleToMonths($billingCycle);
|
||||
$months = OrderHelper::cycleToMonths($billingCycle);
|
||||
|
||||
$pricing = $product->pricings->where('billing_cycle', $billingCycle)->first();
|
||||
// Số tiền đã thanh toán: admin nhập tay để khớp với thực tế (có thể lệch giá niêm yết do khuyến mãi/thoả thuận)
|
||||
@@ -392,16 +392,4 @@ class CustomerServiceProvisioningService
|
||||
});
|
||||
}
|
||||
|
||||
private function cycleToMonths(?string $cycle): int
|
||||
{
|
||||
return match ($cycle) {
|
||||
'monthly' => 1,
|
||||
'quarterly' => 3,
|
||||
'semi_annually' => 6,
|
||||
'annually' => 12,
|
||||
'biennially' => 24,
|
||||
'triennially' => 36,
|
||||
default => 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user