Skip to content

Commit

Permalink
Merge pull request #39 from NewcastleRSE/dev
Browse files Browse the repository at this point in the history
fixed bug when reducing project durations
  • Loading branch information
markdturner authored Oct 8, 2024
2 parents 9a07173 + b67893d commit 0a13e3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/timesheet/services/timesheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ module.exports = ({ strapi }) => ({

rse.children.forEach(month => {

let billableTime = month.children.reduce((total, project) => project.amount > 0 ? total + project.duration : 0, 0)
let billableTime = month.children.reduce((total, project) => project.amount > 0 ? total + project.duration : total + 0, 0)

const start = DateTime.fromFormat(month.name, 'MMM yyyy').startOf('month'),
end = start.month === DateTime.now().month && start.year === DateTime.now().year ? DateTime.now() : start.endOf('month')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2024-10-07T11:54:13.386Z"
"x-generation-date": "2024-10-08T20:36:17.037Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down

0 comments on commit 0a13e3d

Please sign in to comment.