Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 0a65c07b

Přidáno uživatelem Ondřej Fibich před téměř 7 roky(ů)

Fixes #1076: member expiration date calculation fix for debts.

Zobrazit rozdíly:

application/controllers/members.php
$sign = -1;
}
// ttl = time to live - it is count how many ending conditions
// will have to happen to end cycle
// negative balance needs one extra more
$ttl = ($balance < 0) ? 2 : 1;
// negative balance will drawn by red color, else balance will drawn by green color
$color = ($balance < 0) ? 'red' : 'green';
......
// attributed / deduct fee to / from balance
$balance -= $sign * $fee;
if ($sign == -1 && $balance == 0)
$ttl--;
if ($balance * $sign < 0)
$ttl--;
if ($ttl == 0)
break;
$month += $sign;

Také k dispozici: Unified diff