Added two skips in calculation of amount of expected biddings (depending on share type & share amount).
This commit is contained in:
@ -309,9 +309,18 @@ int TableModel::nExpectedBiddings() const {
|
||||
int result = 0;
|
||||
for (auto i = m_items.begin(), end = m_items.end(); i != end; ++i) {
|
||||
const QString biddingType = (*i)->data(BiddingTypeRole).toString();
|
||||
if (!biddingType.isEmpty()) {
|
||||
result++;
|
||||
if (biddingType.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
const QString shareType = (*i)->data(ShareTypeRole).toString();
|
||||
if (shareType.isEmpty() || shareType == "erarbeitet") {
|
||||
continue;
|
||||
}
|
||||
const double shareAmount = (*i)->data(ShareAmountRole).toDouble();
|
||||
if (shareAmount == 0.0) {
|
||||
continue;
|
||||
}
|
||||
result++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user