Forums / Addon Admin Tools / Sales report 2.0

Sales report 2.0

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

Results 681 to 700 of 882
12 Feb 2015, 1:42 PM
#681
ri_vier avatar

ri_vier

New Zenner

Join Date:
May 2010
Location:
The Netherlands, Waddinxveen
Posts:
5
Plugin Contributions:
0

Sales report 2.0

Hello,

I have a problem with the goods value.
The program deducts the VAT from the goodsvalue (what is without vat.
Timeframe Num Orders Num Products Goods Value Goods Tax Order Rec. Tax Shipping Discounts Gift Cert. Sold Gift Cert. Used Total
12th-Feb-15 to
12th-Feb-15 1 3 | Diff: 1 €189.60 €50.40 €50.40 €0.00 €0.00 | Qty: 0 €0.00 | Qty: 0 €0.00 | Qty: 0 €240.00

Total value including tax is 290.40.
VAT is 50.40
Goods value is 240

How can I get this correct.
SALES REPORT Version 3.1.0
Thanks in advance for your reaction.

Richard.

16 Feb 2015, 9:05 AM
#682
ri_vier avatar

ri_vier

New Zenner

Join Date:
May 2010
Location:
The Netherlands, Waddinxveen
Posts:
5
Plugin Contributions:
0

Re: Sales report 2.0

Is there any one who can help me please?

16 Feb 2015, 1:45 PM
#683
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Sales report 2.0

ri-vier:

Is there any one who can help me please?

You may just need to pay a developer to code the changes you want.

Jim
Wheaton Website Services

17 Feb 2015, 4:18 PM
#684
bwaikel avatar

bwaikel

New Zenner

Join Date:
Jun 2014
Location:
Indiana, US
Posts:
2
Plugin Contributions:
0

Re: Sales report 2.0

I just installed this excellent add-on and playing around with it I've noticed that when viewing "timeframe statistics" the rollover (rowOver) function doesn't seem to work. The function works just fine when viewing the other three "Displayed Information" options. Anybody know how to fix this?

28 Oct 2015, 1:01 AM
#685
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Sales report 2.0

Manufacturer name or id is not appearing in sale report? Is it possible to display manufacturer id /name in sale report and also sort order for high to low to see which manufacturer sales were highest to lowest?

21 Jan 2016, 9:57 AM
#686
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Sales report 2.0

I use this module a lot so thank you

However today I noticed something odd - I have the table discount module from thatsoftwareguy installed and its not including that data within the reports - it does however include the better together module from thatsoftwareguy ?

Does anyone have any ideas of how I can get it to include both discounts? My totals are off without it you see :)

ZC 154 clean shop from install but with additional mods?

I will ask thatsoftwareguy as well :)

Thank you Sarah

23 Jan 2016, 7:06 PM
#687
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Sales report 2.0

small bug...

in YOUR_ADMIN/includes/classes/sales_report.php, line 213 reads as the first line in the below code and it should read as the second line. not sure how many people are using the exclude products definition, but the sql statement will die the way it is currently written.

best.

if ($_GET['doProdInc']== 'on' && is_array($include_products) && sizeof($include_products) > 0)

// should be

if (($_GET['doProdInc']== 'on' && is_array($include_products) && sizeof($include_products) > 0) || (isset($this->product_filter)))

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

26 Jan 2016, 4:52 PM
#688
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Sales report 2.0

SarahL:

I use this module a lot so thank you

However today I noticed something odd - I have the table discount module from thatsoftwareguy installed and its not including that data within the reports - it does however include the better together module from thatsoftwareguy ?

Does anyone have any ideas of how I can get it to include both discounts? My totals are off without it you see :)

ZC 154 clean shop from install but with additional mods?

I will ask thatsoftwareguy as well :)

Thank you Sarah

Scott helpfully replied with a link to his blog post that resolves this:

http://www.thatsoftwareguy.com/blog/2012/04/03/sales-report-and-my-discounting-mods/

Also for me I also needed to add in

$class == "ot_table_discounts" ||

as well

All working happily now

thank you
Sarah

24 Mar 2016, 9:16 PM
#689
robbinsgj avatar

robbinsgj

New Zenner

Join Date:
Jul 2009
Posts:
48
Plugin Contributions:
0

Re: Sales report 2.0

Getting a 500 error. Tried installing twice. Any ideas?

Not Found

The requested URL /Delta/stats_sales_report.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2 Server at ktm-ets-fuel.com Port 80

24 Mar 2016, 9:22 PM
#690
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Sales report 2.0

robbinsgj:

Getting a 500 error. Tried installing twice. Any ideas?

Not Found

The requested URL /Delta/stats_sales_report.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2 Server at ktm-ets-fuel.com Port 80

First, rename your admin directory. When posting to the forum, always remove that from the path.

Second, is the file actually on your server in the admin directory. 404 means the file was not found.

Jim
Wheaton Website Services

24 Mar 2016, 9:32 PM
#691
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Sales report 2.0

with regards to jim's 2nd statement, i find it highly unlikely that the script is where it is supposed to be. if it was, then the 404 error could be caused by a .htaccess rule or a apache server configuration issue, or something like that. but the odds of that being the case are highly unlikely....

as your admin directory is compromised, i would agree that you should rename it (and change your config file if using v139 or older)

with regards to your specific problem, i think you are probably uploading the files into the wrong directory. i would re-read the install very carefully and try again. the script that the system is complaining about is no doubt part of the plug-in, and you have probably uploaded that file into the wrong spot. which probably means other files are also uploaded incorrectly. just a guess...

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

20 Apr 2016, 3:01 AM
#692
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

Re: Sales report 2.0

Hey all! I'm running Zencart 1.5.4 with Sales Report 3.1.0 and I'm wondering how I can add a "payment method" heading to the report. I have experience with programming but this is my first Zencart site so I'm still finding my way around. Any help would be much appreciated! Great module btw :)

24 Apr 2016, 1:22 PM
#693
carlvt88 avatar

carlvt88

Zen Follower

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

Re: Sales report 2.0

I guess the easy answer would be to modify the PAGE_HEADING in admin/includes/languages/english/stats_sales_report.php. Or, to get fancier, you could modify admin/stats_sales_report.php. Search for where PAGE_HEADING is written out and put a little php logic around it - if $payment_method != false then use it as part of the page header.
Hope this helps...

24 Apr 2016, 9:43 PM
#694
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

Re: Sales report 2.0

So I took what you suggested and stretched it a bit, I almost have it working but I cant seem to populate that column with the payment_method data. For the total's column I copied the code for the num_products as that's fine for that purpose. I've screen caped my report output as well as the section of code that I think populates the table. Please, any help would be awesome! I'll continue working on this and I figure it out i'll be sure to post the solution.

Attachment 16259
Attachment 16258

25 Apr 2016, 12:05 AM
#695
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Sales report 2.0

you need to modify:

YOUR_ADMIN/includes/classes/sales_report.php

from the look of your screen shots, i'm guessing you need to modify the build_li_orders function. here is the function and i've attempted to highlight in red what i think the change would be to address this issue:

   function build_li_orders($oID, $field, $value) {
      $id = $this->timeframe_id;
      // first check to see if we even need to do anything
      if ($this->detail_level == 'order' || $this->detail_level == 'matrix') {
        // create the array if it doesn't already exist
        if (!is_array($this->timeframe[$id]['orders'][$oID]) ) {
          $this->timeframe[$id]['orders'][$oID] = array('oID' => $oID,
                                                        // the $oID key will be reset when we sort the array at
                                                        // display, so we store it as a part of the array as well
                                                        'goods' => 0,
                                                        'num_products' => 0,
                                                        'diff_products' => array(),
                                                        'shipping' => 0,
                                                        'goods_tax' => 0,
                                                        'order_recorded_tax' => 0,
                                                        'discount' => 0,
                                                        'discount_qty' => 0,
                                                        'gc_sold' => 0,
                                                        'gc_sold_qty' => 0,
                                                        'gc_used' => 0,
                                                        'gc_used_qty' => 0,
                                                        'grand' => 0,
                                                        'order_total_validation' => ''
                                                        );

          // get the customer data
          global $db;
          $c_data = $db->Execute("select c.*, o.payment_method from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS . " o
                                  where o.customers_id = c.customers_id
                                  and o.orders_id = '" . $oID . "' limit 1");

          $customers_id = $c_data->fields['customers_id'];
          $first_name = zen_db_output($c_data->fields['customers_firstname']);
          $last_name = zen_db_output($c_data->fields['customers_lastname']);

          $this->timeframe[$id]['orders'][$oID]['customers_id'] = $customers_id;
          $this->timeframe[$id]['orders'][$oID]['first_name'] = $first_name;
          $this->timeframe[$id]['orders'][$oID]['last_name'] = $last_name;
          $this->timeframe[$id]['orders'][$oID]['payment_method'] = $c_data->fields['payment_method'];
        }

        // add the passed $value to the passed $field in the ['orders'] array
        if ($field != 'order_total_validation') {
          $this->timeframe[$id]['orders'][$oID][$field] += $value;
        } else {
          $this->timeframe[$id]['orders'][$oID][$field] = $value;
        }
      }
    }

your other code should then correctly get the payment method. i hope!

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

26 Apr 2016, 11:14 PM
#696
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

Re: Sales report 2.0

That was exactly it! Thanks so much, this is an awesome module and I'm glad we get to keep it.

1 Oct 2016, 2:10 PM
#697
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Sales report 2.0

I'm using different tax classes and I was wondering, is there a way you could see the sales separately. At this moment the system counts them all together, but I would like to able to see them separately.

Like:
I sell item thats 5,5£ (tax 10%) and other one that's 100£ (tax 24).

The systems shows total 24,50£, but I would need it to show it like 0,50£ and 24£.

28 Mar 2017, 4:25 PM
#698
ehdesign avatar

ehdesign

New Zenner

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

Re: Sales report 2.0

I would like to add / edit to limit the sales report to certain categories.

Any ideas?

28 Mar 2017, 5:05 PM
#699
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Sales report 2.0

ehdesign:

I would like to add / edit to limit the sales report to certain categories.

Any ideas?

Follow the same logic as used for the products, Only include specific Product IDs (comma separated list), and add a new checkbox option for categories.

Jim
Wheaton Website Services

7 Jun 2017, 4:58 AM
#700
wolfderby avatar

wolfderby

Zen Follower

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

Re: Sales report 2.0

bbsbcastle:

I know this is a bit old, but I was running into the same problem. The issue is, the report is deducting the sales tax from the product sales, which it should not.

In admin/includes/classes/sales_report.php line 385, I changed it from

$product_price_inc_tax = (zen_add_tax($final_price, $tax) * $quantity) + zen_add_tax($onetime_charges, $tax);

to

$product_price_exc_tax = ($product_price_inc_tax - $product_tax);

Now it calculates correctly. It's a quick hack, but it works. Someone could take the time to make a more elegant solution. I don't understand why it's doing this since Sales Tax is clearly additive to the total.

...so the zen_add_tax( function (see admin/includes/functions/general.php) only adds the price in, if you have DISPLAY_PRICE_WITH_TAX_ADMIN set...

so if you have your zen-cart set-up so that DISPLAY_PRICE_WITH_TAX_ADMIN is 0 or off, your sales tax will appear to be deducted twice, when in fact it was just never really added in admin/includes/classes/sales_report.php line 385

$product_price_inc_tax = (zen_add_tax($final_price, $tax) * $quantity) + zen_add_tax($onetime_charges, $tax);

I changed line 385 to the following

$product_price_inc_tax = zen_round($final_price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($final_price, $tax);
$product_price_inc_tax += zen_round($onetime_charges, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($onetime_charges, $tax);

Now I get VALID instead of DON'T MATCH and my tax revenue does not appear to be missing from the report.