20 lines
449 B
PHP
20 lines
449 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Services\Fees\FeeRefundCalculatorService;
|
|
|
|
class FeeCalculationService
|
|
{
|
|
public function __construct(
|
|
private FeeRefundCalculatorService $refundCalculator
|
|
) {
|
|
}
|
|
|
|
public function calculateRefund(array $students, int $parentId): float
|
|
{
|
|
$result = $this->refundCalculator->calculateRefund($students, $parentId);
|
|
return (float) ($result['refund_amount'] ?? 0);
|
|
}
|
|
}
|