Skip to content

Commit

Permalink
sum even after only one week
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Schroeder committed Mar 27, 2017
1 parent 438d6a9 commit 4a38c76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/helpers.js
Expand Up @@ -106,7 +106,7 @@ const buildTable = (records, pattern) => {

if (weekNumber > week) {
// add sum if the week actually changes, but not at the beginning
if (dayCounter >= 1) {
if (week > -1) {
table.push(sumRow(sum, week))
}
sum = workHours
Expand All @@ -121,7 +121,7 @@ const buildTable = (records, pattern) => {
addNotes(table, record)
})
// make sure there is a sum if it was not added before and we have more than one row
if (dayCounter >= 1) {
if (dayCounter >= 0) {
table.push(sumRow(sum, week))
}
return table
Expand Down

0 comments on commit 4a38c76

Please sign in to comment.