make 0 the smallest reimbursed amount
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-10-19 17:02:34 +02:00
parent 2e74fd1c65
commit 0ecabe1e47
+5
View File
@@ -204,6 +204,11 @@ foreach ($use as $d => $day) { // calculate for each day
$reimb_day[$d] = $reimb_day[$d] - $maxamount_full * $rate_dinner;
}
// Avoid negative amounts
if ($reimb_day[$d] < 0) {
$reimb_day[$d] = 0;
}
// add on top of total reimbursement
$reimb_total = $reimb_total + $reimb_day[$d];