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;
|
int result = 0;
|
||||||
for (auto i = m_items.begin(), end = m_items.end(); i != end; ++i) {
|
for (auto i = m_items.begin(), end = m_items.end(); i != end; ++i) {
|
||||||
const QString biddingType = (*i)->data(BiddingTypeRole).toString();
|
const QString biddingType = (*i)->data(BiddingTypeRole).toString();
|
||||||
if (!biddingType.isEmpty()) {
|
if (biddingType.isEmpty()) {
|
||||||
result++;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user