修复生活缴费可能为负数的问题

hmxc
张萌 4 years ago
parent 0c2168601a
commit 2d2af9fe23

@ -125,6 +125,12 @@ class _LifePayPageState extends State<LifePayPage> {
_selectYears.remove(index);
_totalCost -= (_selectPay[index].payTotal ?? 0.0);
_count -= (_selectPay[index].payCount ?? 0);
if (_count < 0) {
_count = 0;
}
if (_totalCost < 0) {
_totalCost = 0;
}
} else {
_selectYears.add(index);
_totalCost += (_selectPay[index].payTotal ?? 0.0);

Loading…
Cancel
Save