I really like this report but I have found what I believe is another problem with this report.
Besides the “Goods Value” being the (order value – taxes) the report TOTAL is missing the taxes so there seems to be a tax issue in this report. Also the taxes that are subtracted from the “goods value” are taxes before any discount (I have a group discount).
As it stands now the report’s GOODS VALUE = (order subtotal – taxes (before discount)) and the TOTAL = (order subtotal – discount + shipping) no taxes.
I believe that the GOODS VALUE should be the orders sub-total only and the reports TOTAL should be the orders total (order subtotal – discount + taxes (after discount) + shipping).
Again maybe I’m misinterpreting how this report works so here is an example...
ORDER:
Sub-Total: $69.95
Group Discount: -$3.50
FL State and Local Tax (6.5%): $4.32
United Parcel Service (1 x 5.00lbs) (2nd Day Air): $11.93
Total: $82.70
This report shows:
Goods Value = 65.40 (should be 69.95)
Total = 78.38 (should be 82.70)
After several days of trying to figure out how ZC and this report work (I have very little clue) I made some changes to get that results I think the report should give me. Can anyone that knows how this report works and has PHP experience tell me if the changes I made are correct or if they will adversely affect the report in a manner that I’m not aware.
Changes to: admin\includes\classes\sales_report.php
I CHANGED :
Code:
$product_price_exc_tax = ($product_price_inc_tax - $product_tax);
TO:
Code:
$product_price_exc_tax = ($product_price_inc_tax);
I’m obviously screwing with some rules here by changing “$product_price_exc_tax” to equal “$product_price_inc_tax“ but the value used to get the “GOODS VALUE” seems to be "product_price_exc_tax”. So please advice on the consequences of this change.
AND BELOW:
// (goods + tax + shipping + gc_sold) - (discount + gc_used)
I ADDED:
Code:
$order_goods_tax = zen_calculate_tax(($order_goods - ($order_discount + $order_gc_used)), $tax) ;
To get the taxes after any discount.
Now the report gives me what I believe are the correct values for my scenario:
GOODS VALUE = 69.95
TOTAL = 82.70
Can anyone knowledgeable please let me know what they think or if maybe there is some tax setting in ZC that I’m not setting thus getting the results I was getting.
Thanks…