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 641 to 660 of 882
31 Jan 2014, 11:41 PM
#641
aalthouse avatar

aalthouse

New Zenner

Join Date:
Oct 2012
Posts:
5
Plugin Contributions:
0

Sales report 2.0

Thanks for this module; it has helped me with my reporting needs quite a bit and saved me from running SQL against the db. Here's a bug report and a request:

v1.5 original (no upgrade)
When exporting the report as a CSV, it appears to drop the "Goods Tax" column header. (I just need to add one space to the right in the header row to bring it in-line as a workaround.) I tested it on Chrome and IE and it seems to be consistent. I searched this thread to see if anyone else has reported it and didn't find anything, so sorry if this is a known issue.

Also it would be nice to have a way to omit specific order statuses, such as Cancelled from being returned, similar to the way you can choose to omit a payment method.

Regards,

Aaron

1 Feb 2014, 12:01 AM
#642
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Sales report 2.0

I don't get any canceled orders returned. For some reason all deleted or orders with a $0.00 total are skipped.

Also this report does not match the emailed receipt on a consistent basis. Usually the report is off $15-20 for every 30 orders.

3 Feb 2014, 6:28 PM
#643
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

Anyone having issues with the "Last Year" option displaying THIS YEAR (2014) and NOT 2013??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Feb 2014, 10:32 PM
#644
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Re: Sales report 2.0

DivaVocals:

Anyone having issues with the "Last Year" option displaying THIS YEAR (2014) and NOT 2013??
I can confirm, I'm seeing "THIS YEAR (2014)" with Sales Report version 3.1.0 under Zen Cart 1.5.1.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

3 Feb 2014, 11:06 PM
#645
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

lhungil:

I can confirm, I'm seeing "THIS YEAR (2014)" with Sales Report version 3.1.0 under Zen Cart 1.5.1.

Well I'm stumped on a fix.. (tried a few things.. none worked) sigh

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

4 Feb 2014, 12:45 AM
#646
carlvt88 avatar

carlvt88

Zen Follower

Join Date:
Aug 2007
Location:
Williston, Vermont
Posts:
180
Plugin Contributions:
0

Re: Sales report 2.0

Found the error - needs day and date in the mktime command:
stats_sales_report.php line 532:

sprintf(SEARCH_DATE_LAST_YEAR, date("Y", mktime(0,0,0,1,1,date("y")-1)));
4 Feb 2014, 1:11 AM
#647
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

carlvt88:

Found the error - needs day and date in the mktime command:
stats_sales_report.php line 532:

sprintf(SEARCH_DATE_LAST_YEAR, date("Y", mktime(0,0,0,1,1,date("y")-1)));

I found this code in line 457 not 532.. Made the change and it made no difference..


          <td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date("Y", mktime(0,0,0,1,1,date("y")-1))); ?></td>

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

4 Feb 2014, 1:17 AM
#648
carlvt88 avatar

carlvt88

Zen Follower

Join Date:
Aug 2007
Location:
Williston, Vermont
Posts:
180
Plugin Contributions:
0

Re: Sales report 2.0

@aalthouse - I can see where the tax column is messed up. In the function output_csv, if there is any tax, the variable $display_tax is set to true. Now, when the columns are printed out an extra header is included:

            if ($display_tax) echo TABLE_HEADING_TAX . CSV_SEPARATOR;

but two extra data are written:

              if ($display_tax) {
                echo $o_data['goods_tax'] . CSV_SEPARATOR;
                echo $o_data['order_recorded_tax'] . CSV_SEPARATOR;
              }

Just need to add both elements to the header:

            if ($display_tax) {
                echo TABLE_HEADING_TAX . CSV_SEPARATOR;
                echo TABLE_HEADING_ORDER_RECORDED_TAX . CSV_SEPARATOR;
            }

Slightly different for the type of report detail (timeframe, order, or product), but the same concept holds for all.

4 Feb 2014, 1:44 AM
#649
carlvt88 avatar

carlvt88

Zen Follower

Join Date:
Aug 2007
Location:
Williston, Vermont
Posts:
180
Plugin Contributions:
0

Re: Sales report 2.0

While I was looking at it, I found another problem in the csv data - if you're looking at 'timeframe' level of detail, the taxes aren't written to the csv file. In sales_report.php line 992, add 'echo' to these lines:

            if ($display_tax) {
              echo $timeframe['total']['goods_tax'] . CSV_SEPARATOR;
              echo $timeframe['total']['order_recorded_tax'] . CSV_SEPARATOR;
            }
4 Feb 2014, 3:24 PM
#650
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

DivaVocals:

I found this code in line 457 not 532.. Made the change and it made no difference..

          <td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date("Y", mktime(0,0,0,1,1,date("y")-1))); ?></td>
Try changing that line to read
          <td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date('Y', strtotime('-1 year'))); ?></td>
4 Feb 2014, 4:12 PM
#651
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

lat9:

Try changing that line to read

          <td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date('Y', strtotime('-1 year'))); ?></td>

Still no dice and this is a variation of the code I eluded to in my earlier post that I tried and failed..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Feb 2014, 8:25 PM
#652
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

Here's what worked for me:

<td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date("Y") - 1 ); ?></td>
8 Feb 2014, 12:28 AM
#653
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

lat9:

Here's what worked for me:

<td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date("Y") - 1 ); ?></td> ```

Yahtzee!! This did the trick!! You are the best!

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

8 Feb 2014, 1:23 PM
#654
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

Thanks, Diva.:blush: Sometimes the simplest solutions are the best!

8 Feb 2014, 2:17 PM
#655
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sales report 2.0

lat9:

Thanks, Diva.:blush: Sometimes the simplest solutions are the best!

Yep!! I agree!

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Mar 2014, 5:23 PM
#656
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Sales report 2.0

RE: Last year (2014)

Worked! Thank you so much!

lat9:

Here's what worked for me:

<td class="smallText" id="td_last_year"><?php echo zen_draw_radio_field('date_preset', 'last_year', false) . sprintf(SEARCH_DATE_LAST_YEAR, date("Y") - 1 ); ?></td> ```
7 Mar 2014, 5:54 PM
#657
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

My pleasure ...

7 Mar 2014, 9:38 PM
#658
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Sales report 2.0

I have a feature request for the next iteration of this great module. If there could be a function to select attributes it would make this sooooo much better. Perhaps an option to show all attribute variations and sales and an ability to select a certain product to see it's attribute sales. I think a lot of people could use and really benefit from this. If it would take a contribution for the amount of time and effort involved please PM me to discuss, I am more than happy to do this.


Zen Cart and it's community are the best!!

5 Jun 2014, 9:01 PM
#659
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: Sales report 2.0

I'm using 1.3.9f and I'd like to add a total cost column to this report and also a profit column, but I can't figure out where to edit the php... I already added a product cost field to my products, so I have that data. Any guidance would be appreciated. Thanks!

8 Jun 2014, 1:31 AM
#660
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: Sales report 2.0

So I'm pretty sure the math is done in includes/admin/classes/sales_report.php to answer my own question.

Does anyone know my states sales tax causes a "DON'T MATCH!" with the Output Order Total Validation Column checked? Aside from maybe the obvious of the order total not including the sales tax... like DON'T MATCH! 5.99 : 6.41 (We have 7% sales tax in PA)