Log 2503
06/01/2024 2024-01-06 23:51$date9 = “01/09/2023”;
$from = strtotime(str_replace(“/”, “-“, #תאריך כניסה לצהרון@#));
$from_bitul = strtotime(str_replace(“/”, “-“, #תאריך הביטול בפועל@#));
$to = strtotime(str_replace(“/”, “-“, $date9));
$datediff = $from – $to;
$dated_Bitul = $from_bitul – $to;
$result = round($datediff / (60 * 60 * 24));
$result_bitul = round($dated_Bitul / (60 * 60 * 24));
$monthly = #סכום לתשלום חודשי#;
$Entry_date = #תאריך כניסה לצהרון@#;
$darga = #דרגה ספטמבר נוסחא#;
$zero = “0”;
$bitul = #תאריך הביטול בפועל@#;
if (($result $zero) or ($result <= $zero && empty($bitul) == true)){
if ($darga == 3){
return $monthly-522;
}
elseif ($darga == 4){
return $monthly-455;
}
elseif ($darga == 5){
return $monthly-383;
}
elseif ($darga == 6){
return $monthly-315;
}
elseif ($darga == 7){
return $monthly-243;
}
elseif ($darga == 8){
return $monthly-176;
}
elseif ($darga == 99){
return $monthly-425;
}
elseif ($darga == 100){
return $monthly-455;
}
elseif ($darga == 12){
return $monthly-0;
}
}
else {
return 0;
}