Log 2671
29/01/2024 2024-01-29 10:25$amounts = explode(‘,’, $_POST[#הסכום#]);
$paymentDate = $_POST[#ישולם בתאריך#];
$currentMonth = date(‘m’);
$totalAmount = 0;
foreach ($amounts as $amount) {
$dateParts = explode(‘/’, $paymentDate);
if ($dateParts[1] == $currentMonth) {
$totalAmount += intval($amount);
}
}
return $totalAmount;