Forums / Addon Admin Tools / Sales report 2.0

Sales report 2.0

Started by blindside on 29 Aug 2006, 2:41 AM · Views: 248,184

Results 101 to 120 of 882
8 Nov 2006, 5:58 PM
#101
kellyshults avatar

kellyshults

New Zenner

Join Date:
Oct 2004
Posts:
3
Plugin Contributions:
0

Sales report 2.0

I am having the same problem with the report--- I have included a little snippet, showing what is happening. I tried Kathy's suggestions and turned off the stock counting features in the admin panel.


Prod ID Product Name 2 Model No. 1 Base Price Qty. Product Total
49 Frame Freebie KSHUL_frame $0.00 100 $0.00
144 Simply Christmas KSHUL_simply-christmas $5.99 0 $0.00
117 Fast Scrap - Collection # 1 KSHUL_template-set1 $2.99 100 $299.00
136 Fast Scrap - Collection # 2 KSHUL_templates-set2 $2.99 100 $299.00

144 Simply Christmas KSHUL_simply-christmas $5.99 0 $0.00 ---- on this one I went in and changed the stock to "zero" manually to see what would happen-- and the product Total is now showing up as a zero. So, it IS multiplying the Base Price by the Quantity.

Any idea how to fix this?

Thanks in advance!

Kelly

11 Nov 2006, 8:12 PM
#102
alyxsmom avatar

alyxsmom

New Zenner

Join Date:
May 2006
Posts:
10
Plugin Contributions:
0

Re: Sales report 2.0

Wow Kelly! Thanks for checking that! It sure looks like that's what it is doing huh...

Yes, the way I used to pull the coupon discounts out was by running it by paypal ipn and by going through and manually checking all the invoices with discounts on them. I was trying to say that I 'wished' that it would automatically deduct the coupons/discounts from the sales totals, not that I had ever had that capability.

12 Nov 2006, 1:08 AM
#103
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

kellyshults:

144 Simply Christmas KSHUL_simply-christmas $5.99 0 $0.00 ---- on this one I went in and changed the stock to "zero" manually to see what would happen-- and the product Total is now showing up as a zero. So, it IS multiplying the Base Price by the Quantity.
Well, I learned two new things today. First I learned that the field name "products_quantity" is used for both stock quantity (products table) and quantity purchased (orders_products table). Guess I never noticed it.

Then I learned that, unless specified, field values output by MySQL in a join default to the one in the first listed table, if not specified.

In other words, adding the products table to the query (where the manufacturer is stored) introduced a second field with the same name, resulting in calculating with the wrong quantity. It's always the little things.

So, the bug is found and fixed (finally!). Thanks to kellyshults et. al. for your continued feedback. Like I said I don't use manufacturers, so I never would have found it myself. Your support is definitely appreciated! :thumbsup: I'll submit a new version (rev 104 or higher) later tonight, so look for it in the next day or so (has to get approved).

I love learning! :blink:

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

12 Nov 2006, 3:18 PM
#104
alyxsmom avatar

alyxsmom

New Zenner

Join Date:
May 2006
Posts:
10
Plugin Contributions:
0

Re: Sales report 2.0

FANTASTIC! Thanks for checking on this! Can't wait to get the fixed version.

Thanks so much!

12 Nov 2006, 6:39 PM
#105
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

Just saw that the new version is posted. Enjoy.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

17 Nov 2006, 12:33 PM
#106
wtl avatar

wtl

New Zenner

Join Date:
Nov 2005
Posts:
8
Plugin Contributions:
0

Re: Sales report 2.0

Great news and again a big thanks to Blindside for this excellent sales report, and now consistent & powerful filter by manufacturer!

We are a company that sells by numerous manufacturers and will eliminate all of the excel list sorting to work out how much and by whom!

wantthelook.com (wtl)

17 Nov 2006, 2:26 PM
#107
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

Glad you found it so useful, wtl. There is donation info at the bottom of the README. :wink2:

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

18 Nov 2006, 9:26 PM
#108
docfx avatar

docfx

New Zenner

Join Date:
May 2004
Posts:
78
Plugin Contributions:
0

Re: Sales report 2.0

Haven't seen this specific issue posted. Report appears to be presenting two different values for tax. In attached file, note that 6% tax on 39.90 IS $2.39 and shows and calculated correctly in the timeframe line, BUT same tax is being reported and calculated into the total as only $2.00.

This is on a fresh install of 1.3.5 with the following installed:
superorder2
ty pkg tracker
Sql Backup
cc_accept sidebox
mfgr sidebox
sitemap sidebox fix
column layout
email archive
email addr exporter
encypt passwd
EZ populate
image handler 2
impr attrib controller
paypal session viewer
quick updates
scrolling specials
user tracker

the Imagination Factory & DaVinci Wood Models
https://www.what-if.com & https://www.davincistore.com
Apache2.x (FreeBSD/Linux) PHP 5.x mySQL 5.x

19 Nov 2006, 10:13 AM
#109
krizzle avatar

krizzle

New Zenner

Join Date:
Aug 2006
Location:
Boston MA
Posts:
19
Plugin Contributions:
0

Re: Sales report 2.0

I am having issues with the Sales Report module booting me out of the system when I run a Report. I gather and filter my data by inputting the date ranges, set time frame to "DAILY" and then choose GENERATE REPORT, "Show me the Money".

At that point is generally where the log-in page comes up again. This happens, I would say 90 percent of the time.

Is this related to a Session setting in the Admin CP?

Thanks again,
Kristen

19 Nov 2006, 9:41 PM
#110
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

docfx:

Haven't seen this specific issue posted. Report appears to be presenting two different values for tax. In attached file, note that 6% tax on 39.90 IS $2.39 and shows and calculated correctly in the timeframe line, BUT same tax is being reported and calculated into the total as only $2.00.
Do you have any products ignored? From the comments in the language file, pay attention to the bolded portion...

//////////////////////////////////////////////////////////
// EXCLUDE SPECIFIED PRODUCTS
// Prevents specified products from appearing on the sales
// report at all.  **ADDING PRODUCTS TO THIS DEFINE WILL
// IMPACT TOTALS CALCULATIONS!**
//
// The value of the product will be excluded from totals
// for gc_sold, gc_sold_qty, goods, num_products, and
// diff_products.
//
[B]// The values for gc_used, gc_used_qty, discount,
// discount_qty, tax, and shipping all come from the
// orders_total table, and so CANNOT be excluded based
// on product ID.
[/B]//
// If an order is made up entirely of excluded products,
// and has no shipping, discounts, tax, or used gift
// certificates, it will have a total of 0.  In this
// situation, the order will not be displayed in the results.

krizzle:

I am having issues with the Sales Report module booting me out of the system when I run a Report. I gather and filter my data by inputting the date ranges, set time frame to "DAILY" and then choose GENERATE REPORT, "Show me the Money".

At that point is generally where the log-in page comes up again. This happens, I would say 90 percent of the time.

Is this related to a Session setting in the Admin CP?
Possibly. The report does nothing with session settings, and this issue has been reported many times by many users across different pages in the Admin. Do some forum searching to look for possible solutions.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

19 Nov 2006, 10:42 PM
#111
docfx avatar

docfx

New Zenner

Join Date:
May 2004
Posts:
78
Plugin Contributions:
0

Re: Sales report 2.0

thanks blindside for the reply. Unfortunately, no... there are no excluded products. I had run into that tidbit in an earlier thread and have already removed the items in there from the rev 95 version I had previously installed. I've sinced upgraded it to rev 104.

This is a test cart w/ only the one product. The /admin/includes/languages/stats_sales_report.php file shows:
define('EXCLUDE_PRODUCTS', serialize(array( )) );

The error in the report appears to be specific to one section of the report. Tax is shown correctly in the timeframe header section, NOT correctly when '+Product Line Items' is selected, shown correctly when '+Order Line Items' is selected, and correct in the grand total section. If I had to guess, it might be coming from the /admin/includes/classes/sales_report.php script, where it seems that tax is getting calculated.

I've completed a 2nd test w/ similar, albeit worse results.
1st order, 2 items @ $19.95 = 39.90 + 6% (should be $2.39) +ship of $0. Prod line shows $2.00
2nd order, 4 items @ 19.95 = 79.80 + 6% (4.79) + ship of $7. Prod line shows a tax of $5.00

The grey timeframe report sections both show tax correct. The brown prod sections do not, the green total shows correct. If I didn't know better, it looks to be rounding to an even dollar amount.

the Imagination Factory & DaVinci Wood Models
https://www.what-if.com & https://www.davincistore.com
Apache2.x (FreeBSD/Linux) PHP 5.x mySQL 5.x

20 Nov 2006, 12:56 AM
#112
krizzle avatar

krizzle

New Zenner

Join Date:
Aug 2006
Location:
Boston MA
Posts:
19
Plugin Contributions:
0

Re: Sales report 2.0

yes, i've been looking...thanks.

21 Nov 2006, 6:59 PM
#113
wapnoj avatar

wapnoj

New Zenner

Join Date:
Oct 2006
Posts:
65
Plugin Contributions:
0

Re: Sales report 2.0

This is a great mod with a lot of promise, however as docfx said it has some issues calculating the tax. Also I can not seem to see the shipping costs in the reports either. In a perfect world I would like to see the products name, sub total, tax, shipping, and total. right now with no shipping costs and the miscalulated tax it is not usefull for my purposes. does anyone have a fix for this? If not any alternatives?

Thanks

21 Nov 2006, 7:35 PM
#114
wapnoj avatar

wapnoj

New Zenner

Join Date:
Oct 2006
Posts:
65
Plugin Contributions:
0

Re: Sales report 2.0

I notice that when I use +order line Items that the tax is correct and shipping is also included, but using that method I can not sort by product as I can using the +product line Items. My point is that Im hoping that the answer to the miscalculated tax and lack of shipping lies in the +order line item as it seems to be fine.

4 Dec 2006, 3:26 AM
#115
m8trixdg avatar

m8trixdg

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

Re: Sales report 2.0

Great job on Sales Report Blindside.

Do you know if when I click on an order line I can get it to open in a new window instead of the same window?

Also I tried changing the DisplayInformation to +order by default but it does not work. Any ideas. I changed it in the language file.

Thanks.

4 Dec 2006, 10:29 PM
#116
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

@ docfx & wapnoj:
I went through the code and couldn't find anything that would cause the tax discrepancy you are seeing. However, I did realize that the Sales Report uses zen_calculate_tax() to process the tax values per product, and remembered that the most recent version of Zen Cart had bug fixes to rounding errors with taxes. So, what version are running? If it's not v1.3.6, at least download it and pull the latest version of zen_calculate_tax() into your installation. You'll need to edit includes/function/functions_taxes.php.

m8trixdg:

Great job on Sales Report Blindside.
Thanks! :happy:
Do you know if when I click on an order line I can get it to open in a new window instead of the same window?
Yes it's possible but will require some editing and some JavaScript chops. You have to edit the admin/stats_sales_report.php file. Look for the following comment code:

<!--ORDER LINE ITEM HEADER-->

Then, go down about 20 lines from there and find this line:

<tr class="lineItemRow" <?php echo $rollover; ?> onclick="document.location.href=<?php echo '\'' . zen_href_link(FILENAME_ORDERS, 'oID=' . $o_data['oID'] . '&action=edit', 'NONSSL') . '\''; ?>">

See, because it's an "onclick" event, you can't just use target="_blank". You'll need to include a popup window JS function, then wrap everything inside the onclick within it. So it would look something like the following (new stuff in bold)...

<tr class="lineItemRow" <?php echo $rollover; ?> onclick="[B]mypopup([/B]document.location.href=<?php echo '\'' . zen_href_link(FILENAME_ORDERS, 'oID=' . $o_data['oID'] . '&action=edit', 'NONSSL') . '\''; ?>[B])[/B]">

Also I tried changing the DisplayInformation to +order by default but it does not work. Any ideas. I changed it in the language file.
It must match exactly as it appears in the comments next to the default defines. For order line items you need the following...

define('DEFAULT_DETAIL_LEVEL', 'order'); // ['timeframe'], 'product', 'order', 'matrix'

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

6 Dec 2006, 2:44 PM
#117
redheads avatar

redheads

Zen Follower

Join Date:
May 2006
Posts:
119
Plugin Contributions:
0

Re: Sales report 2.0

Quick question that may be a 'silly' one but... here goes... after reading the forums for several hours on this matter I have no better ideas than to bug you
;-)

If I run the sales report and do not see the 'tax' column does that mean there was no tax charged? I do not even see a column for tax, though screen shots of this mod imply that I should see a column for taxes even if they =0

So, since I do not see a column, what do I need to check, or... where did I go wrong...?

I was using the 'old' version of this mod and recently upgraded - not sure if it used to show up (though I THOUGHT it did) but now it is time to run those reports and I can find no tax info. Any help would be appreciated, especially if it is some dumb move on my own part which led to this.

:-)
Thanks!

6 Dec 2006, 3:38 PM
#118
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Sales report 2.0

redheads:

Quick question that may be a 'silly' one but... here goes... after reading the forums for several hours on this matter I have no better ideas than to bug you ;-)
Well it's a good thing I don't have anything better to do. :P
If I run the sales report and do not see the 'tax' column does that mean there was no tax charged? I do not even see a column for tax, though screen shots of this mod imply that I should see a column for taxes even if they =0
Incorrect. Tax columns do not display if there are no taxes at all for the given timeframe. So if your timeframe has 3 orders, and 1 has taxes, all will show the tax columns. However if all three orders have no taxes, no tax column is displayed.
So, since I do not see a column, what do I need to check, or... where did I go wrong...?
You went wrong with your tax setup, since it would seem that taxes aren't being charged on your orders in the first place. A quick look at your order details for one of these orders would confirm. Hit the FAQ section and look up the tax documents.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

6 Dec 2006, 3:52 PM
#119
redheads avatar

redheads

Zen Follower

Join Date:
May 2006
Posts:
119
Plugin Contributions:
0

Re: Sales report 2.0

So if your timeframe has 3 orders, and 1 has taxes, all will show the tax columns. However if all three orders have no taxes, no tax column is displayed.

Ok, that is what I needed to know. Thanks!:D

You went wrong with your tax setup, since it would seem that taxes aren't being charged on your orders in the first place. A quick look at your order details for one of these orders would confirm. Hit the FAQ section and look up the tax documents.

Or that we did not sell to anyone in CA that week - I hope that is the problem, :unsure: certainly possible. Will track it down and pay the tax folks. :ohmy:
THANK YOU!!

6 Dec 2006, 3:58 PM
#120
redheads avatar

redheads

Zen Follower

Join Date:
May 2006
Posts:
119
Plugin Contributions:
0

Re: Sales report 2.0

Oh, and since you have nothing else to do... LOL

Is it also true that I should have some way of reporting/sorting by state? That would simplify this tax search, and it seems quite a few people mentioned sorting by state... am I on the right mod? I did read every thread in the forum last night and might be a bit lost - :P

Thanks!