Post by MrPhil » Sat May 13, 2017 9:59 pm

Something that came up in viewtopic.php?f=20&t=8918 is that the totals didn't quite match those of another accounting product, because (apparently) adding, multiplication by tax rate (non-integer value), and rounding are not done in the same order between OC and the other product. Actually, this can be seen on a hypothetical page where you get cross totals: add up the columns of item extended prices, apply the tax rate to that subtotal, and get the rounded grand total. If you also apply taxes on each line item, round to display the subtotal (per line), and add up that column, you will likely get a slightly different result than in the first case! The same principle applies across software applications or if you have non-integer quantities (yards of cloth or metres of rope, for example).

You would get the same grand total if you carried through the unrounded values and added up those, but then the total of the rounded display values in a column (a customer checking your math) would not match the grand total.

There are two closely-related feature requests that spring from this. 1) control over the sequence of operations (add/subtract, apply a percentage, rounding) in OC to match what the other application is doing, so there is no discrepancy, and 2) when there are cross totals (as described in the first paragraph), specify which is to be used (or if unrounded values are to be summed) and if there is any difference in the values (this row, or the column total) offer a footnote or pop-up to explain it. This should keep customers from complaining that your store can't do basic math! Unfortunately, this might not be something that an extension can handle, but would have to be core feature.

Newbie

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by IP_CAM » Sun May 14, 2017 1:50 am

Good thinking, but I am not sure, that it will be noted, by one of those in charge.
Better place it on the Github OC Dev-Site, despite the probability, that it may be
closed without comments. ::)
Good Luck!
Ernie

Ernie's OpenShop 1.75 with responsive Bootstrap Themes:
http://www.bigmax.ch - http://www.hitline.info - http://www.openshop.li
Image


User avatar
Newbie

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MrPhil » Tue May 16, 2017 7:34 am

Um, what's the point of having a Features Request discussion if there's no guarantee that the developers will look at it from time to time? If they can't be bothered to look here once in a while, that's quite a problem for the product. This forum/board should be removed, then, to stop misleading people.

Newbie

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by IP_CAM » Tue May 16, 2017 9:06 am

misleading peoples?
sorry, but I am not so sure, what you mean, or expect. This is a simple OC User Forum, nothing else,
and no-one has to pay or donate anything, to be here. So, why should we have rights?! OC comes for free,
and they have a Tech Place for Coders, and this Place here for the Rest, and it's also visited by Coders,
required to frequently freely assist forum users, in order to be allowed here, to offer their Mods and Services.

So, it's possibly just a wrong understanding, but sure not an OC attempt to mislead anyone.Just, to bring you
down to earth. So, better take, what you get, and concentrate on, what brings you further, step by step.
Everything else ist just wasted time... ;)
Good Luck !
Ernie
just a regular Visitor here..., and still a Newbie too... :crazy:

Ernie's OpenShop 1.75 with responsive Bootstrap Themes:
http://www.bigmax.ch - http://www.hitline.info - http://www.openshop.li
Image


User avatar
Newbie

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MrPhil » Tue May 16, 2017 8:31 pm

By "mislead people", what I'm saying is that if you put up a section of your forum called "Feature Requests" and ask people to contribute their thoughts on what features should be added to the product, you should make some effort to regularly read and consider those requests -- and respond in some way to let the posters know that they've been heard. To put up such a section and then ignore it is misleading people into wasting their time thinking that they have a voice and they're contributing, when in fact it's all a massive joke on them (sort of like "democracy" here in the US). I haven't been around here long enough to know if, as you implied in an earlier response, that the developers ignore whatever's posted here, or if in fact they do read and consider the posts here. I hope it's the latter.

Newbie

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by Johnathan » Tue May 16, 2017 10:31 pm

I don't think Daniel reads the Feature Requests forum much (though I don't know for sure) but I'm sure extension developers do when they need to find new ideas, so it's worth keeping up even if they won't be incorporated into the core.

For your need, I don't think there's an extension that does this, though it could be done. It would be complicated, though, so it's probably not likely someone will take it on. If you do need something in the future and don't mind paying for it, you could post a request in the OpenCart "Commercial Support" forum (forum.opencart.com/viewforum.php?f=88), which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area (www.opencart.com/index.php?route=partner/partner).

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by MrPhil » Wed May 17, 2017 12:43 am

For my purposes, I'd probably just add a footnote (with * callout) noting that cross totals may be a penny or two off. It's just that some people, such as in the referenced post, are trying to be consistent with other accounting packages, and could really use it for the totals to come out exactly the same. For this purpose, something that looks like spreadsheet cell entries to exactly specify how numbers are produced could be very useful.

Add: come to think of it, color-coding the background of numbers and maybe some arrowheads could show in what order the numbers were arrived at (i.e., emphasizing that the total of row prices may not equal the highlighted subtotal x tax rounded row). That still wouldn't help with the referenced post's problem, but at least it could satisfy customers about to complain that OC can't add a column of numbers!

Newbie

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by Johnathan » Wed May 17, 2017 10:45 pm

This may not solve your issue, but I did post an edit somewhere (that I now can't find :) ) for rounding taxes that solves an error where the total is 0.01 or 0.02 off. Here's the edit:

Code: Select all

IN:
/catalog/model/total/tax.php (or /catalog/model/extension/total/tax.php)

AFTER:
if ($value > 0) {

ADD:
$value = round($value, 2);

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 4 guests