Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Rounding total price goes wrong #733

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

simonschaufi
Copy link
Contributor

@simonschaufi simonschaufi commented Jul 10, 2016

FIXES #480

Changes proposed in this pull request:

  • Round duration and wage

Reason for this pull request:

  • Wrong calculation

Needs testing!!!

@simonschaufi simonschaufi added this to the 1.1 milestone Jul 10, 2016
@kevinpapst
Copy link
Member

General thought:

  • Everything should be calculated the same way
  • No calculating in mysql selects
  • Fetch only the raw value with the select: "start-end as duration"
  • Create a formatDuration function in StringUtility class "return sprintf("%01.2f", round($duration / 3600, 2));"
  • Replace all of your adjusted code pieces with the function call StringUtility::formatDuration($duration)

That would be even cleaner :)

@kevinpapst kevinpapst modified the milestones: 1.2, 1.1 Aug 21, 2016
@simonschaufi simonschaufi modified the milestones: 1.2, 1.3 Feb 16, 2018
@simonschaufi simonschaufi modified the milestones: 1.3, 1.4 May 18, 2018
@simonschaufi
Copy link
Contributor Author

@kevinpapst did you really test that?

@kevinpapst
Copy link
Member

Hahaha, I hope you did back in the days. I checked through all my issues and PRs and saw them.
And as I have no plans whatsoever with Kimai 1, I thought that I can approve them as well (they look ok, thats all I can say).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants