make 0 the smallest reimbursed amount
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
2e74fd1c65
commit
0ecabe1e47
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in New Issue