@@ -171,8 +171,10 @@ class base {
171171 projects [ time . project_namespace ] += time . seconds ;
172172 days [ dateGrp ] [ time . project_namespace ] [ time . iid ] += time . seconds ;
173173
174- spent += time . seconds ;
175-
174+ if ( Math . sign ( time . seconds ) === 1 ) {
175+ spent += time . seconds ;
176+ }
177+
176178 if ( free ) {
177179 spentFree += time . seconds ;
178180 }
@@ -208,15 +210,15 @@ class base {
208210 this . projects = _ . mapObject ( projects , project => this . config . toHumanReadable ( project , 'stats' ) ) ;
209211 this . stats = {
210212 'total estimate' : this . config . toHumanReadable ( totalEstimate , 'stats' ) ,
211- 'total spent' : this . config . toHumanReadable ( totalSpent , 'stats' ) ,
213+ 'total spent' : this . config . toHumanReadable ( spent , 'stats' ) ,
212214 'spent' : this . config . toHumanReadable ( spent , 'stats' ) ,
213215 'spent free' : this . config . toHumanReadable ( spentFree , 'stats' ) ,
214216 } ;
215217 this . totalEstimate = totalEstimate ;
216218 this . spent = spent ;
217219 this . spentFree = spentFree ;
218220 this . spentHalfPrice = spentHalfPrice ;
219- this . totalSpent = totalSpent ;
221+ this . totalSpent = spent ;
220222 this . timesWarnings = timesWarnings ;
221223 this . daysNew = daysNew ;
222224 }
@@ -242,4 +244,4 @@ class base {
242244 }
243245}
244246
245- module . exports = base ;
247+ module . exports = base ;
0 commit comments