Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/widgets/kmymoneybriefschedule.cpp
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | 103 | if (m_date < QDate::currentDate()) { | |||
---|---|---|---|---|---|
104 | if (sched.isOverdue()) { | 104 | if (sched.isOverdue()) { | ||
105 | QDate startD = (sched.lastPayment().isValid()) ? | 105 | QDate startD = (sched.lastPayment().isValid()) ? | ||
106 | sched.lastPayment() : | 106 | sched.lastPayment() : | ||
107 | sched.startDate(); | 107 | sched.startDate(); | ||
108 | 108 | | |||
109 | if (m_date.isValid()) | 109 | if (m_date.isValid()) | ||
110 | startD = m_date; | 110 | startD = m_date; | ||
111 | 111 | | |||
112 | int days = startD.daysTo(QDate::currentDate()); | 112 | auto days = startD.daysTo(QDate::currentDate()); | ||
113 | int transactions = sched.paymentDates(startD, QDate::currentDate()).count(); | 113 | int transactions = sched.paymentDates(startD, QDate::currentDate()).count(); | ||
114 | 114 | | |||
115 | text += "<br><font color=red>"; | 115 | text += "<br><font color=red>"; | ||
116 | text += i18np("%1 day overdue", "%1 days overdue", days); | 116 | text += i18np("%1 day overdue", "%1 days overdue", days); | ||
117 | text += QString(" "); | 117 | text += QString(" "); | ||
118 | text += i18np("(%1 occurrence.)", "(%1 occurrences.)", transactions); | 118 | text += i18np("(%1 occurrence.)", "(%1 occurrences.)", transactions); | ||
119 | text += "</color>"; | 119 | text += "</color>"; | ||
120 | } | 120 | } | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |