Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoice - Print and preview results are not the same when no users are selected #1114

Closed
rarvin opened this issue Sep 16, 2019 · 11 comments · Fixed by #1129
Closed

Invoice - Print and preview results are not the same when no users are selected #1114

rarvin opened this issue Sep 16, 2019 · 11 comments · Fixed by #1129
Labels
Milestone

Comments

@rarvin
Copy link

rarvin commented Sep 16, 2019

Describe the bug
The print results displayed in the invoice view and the preview results shown are not the same. The print view results seems accurate.

Options used for the invoice export are invoice document - timesheet; sum calculation: user (one entry per user)

To Reproduce
Steps to reproduce the behavior:

  1. Go to invoice, choose the customer, trigger an invoice
  2. Click on Preview
  3. See the values shown in the said view; click on print and see the report generated and compare the values the values dont match.

Even when a project is chosen the results are not the same between views. But when the activity was also additionally chosen the results matched.

Additionally the issue seems to be present only when no users are chosen. If one were to choose a customer and a said user and run the invoice the results between print and preview are the same. I have tried with multiple users also and the results are the same. Issue seems to be present when no users are selected.

Same issue is present with the javascript option on and off, so this is not causing the issue.

Screenshots
Unable to share screen shots since it contains customer data.

@infeeeee
Copy link
Contributor

If you hover your mouse over the preview button it shows 'Limited to 500 entries':
image

Issue seems to be present when no users are selected.

It only happens when there are more than 500 entries. If less than 500 you will see the same

I think this intended to work this way, it's a feature not a bug :)

@rarvin
Copy link
Author

rarvin commented Sep 17, 2019 via email

@kevinpapst
Copy link
Member

One entry per user actually does not mean it renders one entry per user, it means it renders one entry per hourly/fixed rate per user. So you could have actually generated multiple entries per user.

But I guess the real reason is:

  • Not the merged end result is currently limited, but the initial data.
  • That means: the query is limited to 500 results, 500 entries are fetched from the database and then merged.

I guess thats the case here, but I can't confirm as I don't know how many records were filtered.

@rarvin
Copy link
Author

rarvin commented Sep 17, 2019 via email

@kevinpapst
Copy link
Member

kevinpapst commented Sep 18, 2019

You can change the value here:
https://github.com/kevinpapst/kimai2/blob/master/src/Controller/InvoiceController.php#L71

I will think about how that can be handled better.
Maybe limiting the preview for invoices should be removed altogether as it produces invalid results.
I just didn't test with such an amount of records.

@kevinpapst kevinpapst added the bug label Sep 18, 2019
@kevinpapst kevinpapst added this to the 1.4 milestone Sep 18, 2019
@rarvin
Copy link
Author

rarvin commented Sep 19, 2019 via email

@kevinpapst
Copy link
Member

Thanks for the confirmation, then I remove that functionality from invoice.

@kevinpapst kevinpapst mentioned this issue Sep 20, 2019
3 tasks
@rarvin
Copy link
Author

rarvin commented Sep 20, 2019

@kevinpapst kindly do not remove the invoice preview functionality altogether I am happy changing the value and seeing the results. If you remove it completely you could take away a very critical functionality that I tend to use all the time. I request you to please retain it. Maybe remove it for general users and provide this as a toggle which users like me could enable and use. This is a sincere request.

@kevinpapst
Copy link
Member

I just remove the limitation to 500 results, so the bug will be gone. The preview will definitely stay!

@rarvin
Copy link
Author

rarvin commented Sep 20, 2019

@kevinpapst Thank you.

@lock
Copy link

lock bot commented Nov 19, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Nov 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants