Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin report: Monthly Sales & Tax


zzfritz

Recommended Posts

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Even with the new 1.54, I still get this error:

 

Warning: fopen(temp.csv) [function.fopen]: failed to create stream: Permission denied in /home/fiverbjp/public_html/scart/admin/stats_monthly_sales.php on line 45

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/fiverbjp/public_html/scart/admin/stats_monthly_sales.php:45) in /home/fiverbjp/public_html/scart/admin/includes/functions/sessions.php on line 67

 

Anyone? Thanks!

Link to comment
Share on other sites

v1.54x works beautifully!

 

Thanks ZZFRITZ!

 

I am running 2.2 CVS for those of you out there. I also added the false statement to the $csv which fixed that issue.

 

Rock on.

Link to comment
Share on other sites

  • 3 weeks later...

Im getting this error when I click the link in the Reports Box

Fatal error: Call to undefined function: tep_array_merge() in /home/kartings/public_html/admin/stats_monthly_sales.php on line 129

Anyone know what could be causing it? I installed everything correctly but I did not really know where to place the line of code in the application_top.php so I just created its own slot:

// Used In Monthly Sales Report V1.54

define('FILENAME_STATS_MONTHLY_SALES', 'stats_monthly_sales.php');

Any suggestions??

Link to comment
Share on other sites

Ah, the pesky "standards update" removed the private function tep_array_merge in favor of array_merge available in PHP4.

 

The script has been revised to reflect this change, and version 1.55 of the contribution is posted here:

 

http://www.oscommerce.com/community/contributions,539

 

Regarding insertion of file name defines in application.top, that will work but there should be new instructions in keeping with the design change this month: all the filenames have been moved out of application.top into a new file named filenames.php. Most of us choose to keep the alphabetic order of these defines.

Link to comment
Share on other sites

Now I get these errors:

Warning: fopen(temp.csv) [function.fopen]: failed to create stream: Permission denied in /home/nunya/public_html/admin/stats_monthly_sales.php on line 46

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/nunya/public_html/admin/stats_monthly_sales.php:46) in /home/nunya/public_html/admin/includes/functions/sessions.php on line 67

 

I replaced all the files with the new ones and made sure that permissions were set. I dont know what else to do, its a no win situation for me.

Link to comment
Share on other sites

Can someone confirm this mod calculates the sales price at time of sale and not current price?

 

I seem to remember reading somewhere this mod bases sale price on current product price - so could be quite inaccurate?

Link to comment
Share on other sites

  • 1 month later...

I've installed this contribution and came up with some strange results. My Tax Paid column shows the correct tax being paid, but my Taxable Sales Column show 0.00, and all the sales amounts appear under the Exempt Sales column.

 

What do I do to fix this?

 

Helen

Link to comment
Share on other sites

nipsy and hcho10 are not alone. I too am experience like results. All fields, with the expection of "taxable sales", appear to be calculating properly. Taxable sales continues to report $0. I've ensured proper set of my tax/store zones...and still nothing. I've spent hours troubleshooting...and I'm not finding where the problem is. Help!!

 

2.2 ms1

Link to comment
Share on other sites

I am the author of this contribution.

 

In the current version of this report (1.55), the "taxable sales" column is calculated as the sum of order subtotals for orders shipped within the store's own zone. This should produce correct results for stores having a single tax zone for the store's home location. The assumption is stated in the "install.txt" accompanying the contribution: "Taxable vs exempt sales totals are based on the store zone."

 

But for stores having more than one tax zone, or imposing tax for zones other than the store's own location, the "taxable sales" column will not be correct. Even for these stores, however, the "tax paid" column will accurately reflect the sum of taxes on the orders.

 

The logic currently employed is very simple: as the entries in the orders_total table are scanned, the subtotal entries are added either to the exempt or taxed column based on whether the order delivery state is identical to the store zone. Perhaps the column headings should read "shipped within zone" and "shipped out of zone".

 

The original goal of this report was merely to summarize by month the gross sales and the elements of the order totals (subtotal, shipping, tax, low order fee, and other), by reading only the orders_total table. I added the taxable and exempt columns simply because these could be summarized for the simplest case. The logic to determine taxable vs. exempt sales for other cases is much more complex and requires probing around in other database tables.

Link to comment
Share on other sites

Thanks zzFritz, but my set-up is exactly as you've described. A single tax zone store only imposing a single tax within that one zone. And my store config is associated this the same zone as my tax zone.

 

The problem: All sales, regardless of zone, are being subtotaled in the out of zone column. While the in zone column is $0

 

On the surface it appears that the store zone, for a yet to be identified reason, is not being picked-up/id'd/associated with in zone/out of zone calcs.

 

Will continue to investigate....

Link to comment
Share on other sites

To distinguish taxable from exempt orders, the report logic compares the value of the delivery_state field in the (orders table entries) against the store zone, as returned by the tep_get_zone_name function.

 

There was a revision to that function call several months ago, adding two parameters. I suspect this is the culprit.

 

What did work in version 1.5 of the report was the call

tep_get_zone_name(STORE_ZONE)

 

My best guess at the correct new call (I could find no public documentation of the change or specification for the new parameters) is this

tep_get_zone_name(tep_get_country_name($country_id), STORE_ZONE, STORE_ZONE)

but maybe that is wrong. Perhaps someone more familiar than I am with the core functions could see the problem.

Link to comment
Share on other sites

Just install the Lastest version 1.55a, but I got

 

Access Denied

 

No right Permission access

Please contact your Web Adminstrator to request more access or if you found any problem

 

Any idea ? Did I do anything wrong ?

 

thanks

Link to comment
Share on other sites

  • 3 months later...

zzfritz:

 

I saw a similar error in an earlier posting:

---------------------

2000 - You have an error in your SQL syntax near '(o.date_purchased), month(o.date_purchased) order by o.date_purchased desc' at line 1

 

select sum(ot.value) gross_sales, monthname(o.date_purchased) row_month, year(o.date_purchased) row_year, month(o.date_purchased) i_month, dayofmonth(o.date_purchased) row_day from TEP_orders o left join TEP_orders_total ot on (o.orders_id = ot.orders_id) where ot.class = 'ot_subtotal' group by year(o.date_purchased), month(o.date_purchased) order by o.date_purchased desc

 

[TEP STOP]

------------------

 

However, I have installed 1.55a and have mySQL 3.23.39

 

Any assistance would be appreciated . . .

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I installed the 1.55 version and it works fine, except for a slight problem: I use COD module which charges every COD order 3,15?. This shows in Monthly sales & Tax as Gift vouchers and the sum of it is not added to the total sales.

 

Any hints for how to fix this, please?

Link to comment
Share on other sites

  • 11 months later...

Quote from Instructions:

This admin report provides a summary of monthly or daily totals:

order totals

order subtotals

subtotals of orders not taxed

subtotals of orders taxed

sales tax collected

shipping/handling charges

low order fees (if used)

gift vouchers (or other add-on order total class, if used)

 

Does that mean, that the Gift Vouchers Column will also take into account the Discount Coupons?

 

.....since I just installed and site is not live yet......maybe someone already knows.....

Link to comment
Share on other sites

  • 2 weeks later...

I'm having a small problem with this. I installed it and it's working great. Only thing is I have one order that has its shipping amount in the gift voucher column. All the other shipping charges are in the shipping column. I figured I would turn off Gift Vouchers...but I can't find it to turn it off. It is nowhere in my admin panel. I am using 2.2 - MS2.

 

I have looked through this board for help and none of their suggestions worked because gift vouchers is not in my version of OSC. And I don't have a add_application_top.php file. I have a application_top.php file but Gift Voucher nor GV or anything pertaining to a gift voucher could be found there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...