Forums / Addon Admin Tools / Sales report 2.0

Sales report 2.0

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

Results 281 to 300 of 882
6 Feb 2008, 11:09 AM
#281
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Sales report 2.0

rcrosier:

Has anyone figured out the problem with the totals when you run a report for ONE manufacturer?

On my system, if I run a report for one manufacturer, for a custom date range OR a preset, some of the totals at the top include ALL records for that range, NOT just the ones for that manufacturer. Very difficult to get totals for just one manufacturer.

Does anyone else have this problem?

I looked at the code briefly, but being very green at PHP, I could not find where the problem is.I have tracked down the problem. It's in the sales report class in the build_li_totals function.

This function is very careful only to extract product line information for the products from those manufacturers that you are filtering on. Unfortunately it then goes on to extract order level information, such as discount coupons and gift certs used and shipping costs. Since these are not recorded as being associated with any particular product, neither is there a manufacturer to filter them against and they all make it into the totals.

It's very difficult to see a solution to this. Yes, there's the obvious one of trailing back to the database to examine the products in each order and apportion the order level transactions against those to which they could apply, with appropriate error handling when the information needed is no longer in the database, but this would be horrendously complicated to do.

I have a partial fix, which simply suppresses the order level transactions when the manufacturers filter is in use. Unfortunately I don't have good data to test this with, but have asked a store owner who does to take it for a test drive. If they agree, I'll post the outcome and if appropriate the code change.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

11 Feb 2008, 12:16 AM
#282
jynxy avatar

jynxy

New Zenner

Join Date:
Jul 2005
Posts:
34
Plugin Contributions:
0

Re: Sales report 2.0

Hi i get the following error. can someone please help.

thanks.

Line: 289
Char: 5
Error: 'options' is null or not an object
Code: 0

the code at this line is the following

////////////
// Function : build_select
// Arguments : string "view", element "sort_box"
// Description : performs the leg work of populating the line item sort boxes
// with options according to the search type selected
///////////////
function build_select(view, sort_box) {
sort_box.options.length = 0; <<-- this is line 289
var sort_title = document.getElementById('span_sort_title');

if (view == 'order') {
  // define text above first sort box
  sort_title.innerHTML = 'Sort orders by...';
14 Feb 2008, 11:08 AM
#283
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Sales report 2.0

First off, great contribution. This makes accounting so much easier for Zen Cart owners!

I'm currently running the latest version of Sales Report on Zen Cart 1.3.8a and I think I'm getting a similar error to jynxy.

When loading up the stats_sales_report.php file (via my Zen Cart admin) I receive the following error (displayed by Firefox):

select has no properties
auto_select_input("", "manufacturer", "select")
populate_search(undefined)
onload(load )
for(var i = 0; i < select.options.length; i++) {

When I click the 'Show me the money!' button the report is generated successfully, but I still receive the same error message (as quoted above).

This error message is also displayed when I click on the 'Report Defaults' button.

Anyone know how to fix this?

My Contributions: Zen Lightbox | Best Sellers Reloaded

16 Feb 2008, 7:25 AM
#284
kenwvs avatar

kenwvs

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Sales report 2.0

I am not sure if I am missing something here, but is it possible to list each individual order throughout the month. I can get it to list the totals of each order, but not what each order consisted of.

26 Feb 2008, 7:52 AM
#285
kenwvs avatar

kenwvs

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Sales report 2.0

I am wondering if anyone has modified the sales reports to include the Company Name.

If anyone knows what needs to be modified, it would be appreciated.

Also, is it possible to remove any reference to Gift Certificates in the report, as we don't utilize them.

Thanks,

Ken

26 Feb 2008, 2:25 PM
#286
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

ive installed this and im getting an error with custom dates etc.

i think this is an error due to the code being set so the date is mm-dd-yyyy where ive changed my site to uk which is dd-mm-yyyy

how can i change this mod so it works with UK style dates??


3 Mar 2008, 9:37 AM
#287
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

can someone please help me, i need to edit this modual so that it will work with UK date style instead of US as it is.

Ive edited my site so that dates are in UK style so dd/mm/yyyy not mm/dd/yyyy and this causes errors to appear and incorrect reports. ie 1st may 2007 in uk is 01/05/2007 where that is the 5th Jan in the US and if i want i choose a date range later that 12th of a month i get an error as there are only 12 months in a year not 31.

PLEASE HELP


3 Mar 2008, 10:07 AM
#288
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Sales report 2.0

@kitcorsa

Have you tried changing this line in your admin/includes/languages/english.php file?

define('DATE_FORMAT_SPIFFYCAL', 'MM/dd/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

3 Mar 2008, 11:34 AM
#289
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

an mentioned i have already edited this file as my whole site is in uk dates.

define('DATE_FORMAT_SPIFFYCAL', 'dd/MM/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order

as you can see.

the problem is with the modual as its coded to be in mm/dd/yyyy so as soon as it gets a custom date of 30/12/2007 (uk 30th december 2007) it gives and error as there are not 30 months in a year etc.

the modual needs changing not the zencart files.

id plow my way through this modual and try and change it but i thought someone might have already have had this problem or the creator might know how to fix this problem as im sure im not the first UK person to install this mod.


3 Mar 2008, 12:33 PM
#290
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Sales report 2.0

I'm 99% certain this has been fixed by someone.

Have you seached this thread?

Craig

3 Mar 2008, 12:37 PM
#291
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Sales report 2.0

CES:

I'm 99% certain this has been fixed by someone.

Have you seached this thread?It has. Post 239. Which is why I'm surprised that the change to DATE_FORMAT_SPIFFYCAL didn't work for kitcorsa. I assume he must be using an older version.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

3 Mar 2008, 3:55 PM
#292
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

i have been rading through this post for 10 days now on and off and hadn't got to the stage you have listed above. the problem is the downloads section has the OLD 2.0 version not the 2.2 version this is why i was getting the problem i belive.

going to install the new version now and test.


3 Mar 2008, 3:59 PM
#293
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

installed 2.2 and this sorted the problem. Thanks for posting the number of the post and savimng me anpther week of reading.

..ADMIN..
Please update the file on the downloads section


8 Mar 2008, 12:44 PM
#294
jcun45 avatar

jcun45

New Zenner

Join Date:
Feb 2006
Location:
Amsterdam
Posts:
73
Plugin Contributions:
0

Re: Sales report 2.0

Hi, I have installed the sales report add on and all seemed to work correctly. However, when I look at the report the total price (without tax) is correct but the actual total is wrong. I am adding 19% sales tax but it seems that the report is adding much more. The invoices are all correct it is only the sales report total that is incorrect and adding a bit more. Can someone please help me with this??

This is my customers invoice upon checkout:

1 ea. Westvleteren 12 33cl, 10.2%ABV €9.50
€9.50
Sub-Total:

€0.00
Store Pickup (Walk In):

Total: €9.50

This is the correct price including 19% tax.

In the admin the invoice looks like this:

Date Purchased: Friday 07 March, 2008
Payment Method: Cash on Delivery
Products Model Tax Price (ex) Price (inc) Total (ex) Total (inc)
1 x Westvleteren 12 33cl, 10.2%ABV 19.00% €7.98 €9.50 €7.98 €9.50
Sub-Total: €9.50
Store Pickup (Walk In): €0.00
Total: €9.50

This is also correct.

The sales report looks like this:

Timeframe Num Orders Num Products Goods Value Shipping Discounts Gift Cert. Sold Gift Cert. Used Total
3-7-2008 1 1 | Diff: 1 €7.98 €0.00 €0.00 | Qty: 0 €0.00 | Qty: 0 €0.00 | Qty: 0 €7.98
Prod ID Product Name Re-sort in DESCENDING order 2 Model No. Re-sort in DESCENDING order1 Base Price Qty. Product Total
180 Westvleteren 12 33cl, 10.2%ABV €7.98 1 €9.98

Why is the product total 9.98??? It should be 9.50!

Cheers,

Jeff

Cracked Kettle Amsterdam: Supporting the Independent Brewer, Wine Producer and Distiller.

8 Mar 2008, 8:18 PM
#295
jcun45 avatar

jcun45

New Zenner

Join Date:
Feb 2006
Location:
Amsterdam
Posts:
73
Plugin Contributions:
0

Re: Sales report 2.0

OK, see page 24 for fix (took awhile to get there), great job, it fixed everything! I wonder why this version isn't what would be downloaded in the download page...

Awesome add on, thanks again.

Jeff

Cracked Kettle Amsterdam: Supporting the Independent Brewer, Wine Producer and Distiller.

10 Mar 2008, 2:44 PM
#296
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

jcun45:

OK, see page 24 for fix (took awhile to get there), great job, it fixed everything! I wonder why this version isn't what would be downloaded in the download page...

Awesome add on, thanks again.

Jeff

yeah this is what i menioned above. the download in the download section is an old version.

ADMIN PLEASE UPDATE!


12 Mar 2008, 10:10 AM
#297
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Sales report 2.0

Alex Clarke:

First off, great contribution. This makes accounting so much easier for Zen Cart owners!

I'm currently running the latest version of Sales Report on Zen Cart 1.3.8a and I think I'm getting a similar error to jynxy.

When loading up the stats_sales_report.php file (via my Zen Cart admin) I receive the following error (displayed by Firefox):

When I click the 'Show me the money!' button the report is generated successfully, but I still receive the same error message (as quoted above).

This error message is also displayed when I click on the 'Report Defaults' button.

Anyone know how to fix this?

Just updated to the latest version of this contribution. I too was previously using the old version from the downloads section.

Everything is working fine with the new version, but I still get these errors (as mentioned in my last post). Does anyone else get similar errors?

My Contributions: Zen Lightbox | Best Sellers Reloaded

17 Mar 2008, 11:24 PM
#298
erika_311 avatar

erika_311

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Sales report 2.0

Hi. I LOVE this contribution! I do have a question that I can not find an answer too:

I have a store in which I have 8 designers and I need to give them a report on the products the sell so I can "pay" them, but how do I get the report onto a .pdf or spreadsheet... I have tried but it looks horrible!

Thanks for your help.

20 Mar 2008, 11:35 AM
#299
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Sales report 2.0

you use the export option of a tab dielimited file and just open that in excell, then im sorry to say but you have to spend some time making it look like you want and adding charts etc.

other than that use the layout in the modular and dispay on screen then download a low res pdf converter like primopdf and then click print, primo pdf, and that will create a pdf of the on screen view.


20 Mar 2008, 3:50 PM
#300
erika_311 avatar

erika_311

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Sales report 2.0

Thank you for responding!