Closed (won't fix)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Reports
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2011 at 12:10 UTC
Updated:
25 Sep 2013 at 07:13 UTC
Hi,
I've recently updated to 2.7 and since then the total revenue in the exported file is messed up, also for older months. The average order column shows correct amount.
For instance at admin/store/reports/sales/year the tottal revenue for March would show €9.999,99 then in the exported CSV it would show 9999.99485
I've noticed that online 848 of uc_reports.admin.inc the uc_price() function has been removed which would round amounts to two decimals. Is this by error?
Cheers
Comments
Comment #1
longwaveThis was deliberately changed in #630058: CSV should have only figures, without any formatting so the reports are more accurate and easier to use in Excel. Perhaps we should ensure the numbers are rounded, though?
Comment #2
bartezz commentedHey longwave,
Thanx for the fast reply. I do think rounded numbers would be better indeed.
Also a problem that arrises now that the currency symbol has been dropped is that opening the .csv in Excel causes drama... Excel tries to interpret the numbers, adds thousands and decimal marks, etc. This was prevented before because of the currency symbol. Ofcourse this is an Excel problem and one should take great care when opening the csv in Excel.
But to make things more easy for users throughout the world would it be possible to set the decimal mark for csv exports somewhere? This would prevent much hassle to those who are less experienced :)
Cheers
Comment #3
longwaveExcel *should* be interpreting the numbers, and is why this was changed in the first place; you can use the Excel formatting features to remove or change these if you want.
Comment #4
bartezz commentedHi longwave,
Yeah it should :) But I think because of the decimal mark differences between countries and this the Excel settings both my and my clients's Excel change this 9999.99485 to this 999.999.485
If I change the csv in notepad to 9999,99485 and then open in Excel it gets converted to 9.999,99485
Probably because Excel is setup to use a comma as a decimal mark. That's why I was asking if we could make it a setting.
Cheers
Comment #5
longwaveWell, we already have currency format settings, so we probably just want to use those without the symbol. Hopefully the title covers what needs to be done now :)
Comment #6
tr commentedComment #7
longwaveWe would be better off converting reports to Views in #568854: Replace uc_reports with Views where users could export them in many different ways.