Files
alrahma_sunday_school_api/app/Services/FeeCalculationService.php
T
2026-06-09 00:03:03 -04:00

20 lines
445 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);
}
}