Jump to content



Latest News: (loading..)

- - - - -

Monthly Sales & Tax version 2


  • Please log in to reply
55 replies to this topic

#1   zzfritz

zzfritz
  • Members
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 07 April 2004 - 06:17 AM

This is the support thread for version 2 of the Monthly Sales & Tax report contribution, announced here:

http://forums.oscommerce.com/index.php?showtopic=86986

Edited by zzfritz, 12 April 2004 - 01:39 AM.


#2   ISG

ISG
  • Members
  • 1 posts
  • Real Name:Ernst Weinlig

Posted 07 April 2004 - 03:11 PM

Hello Fritz,

I have some trouble using this great contribution with a german shop.

This is an order:

Quote

Artikel Artikel-Nr. MwSt. Preis (exkl.) Preis (inkl.) Total (exkl.) Total (inkl.)
Article xxxxxx 7% 27,99EUR 29,95EUR 27,99EUR 29,95EUR (includes VAT 7%)
Sub-Total: 29,95EUR (includes VAT, in this case only 7%)
Cash on Delivery Fee: 12,00EUR (includes VAT 16%)
German Post (Dispatch to IT: (1 x 3.3 kg)): 19,85EUR (includes VAT 16%)
Total: 61,80EUR (includes VAT 7 & 16%)
enthaltene MwSt. 7%: 1,96EUR (means VAT 7%)
enthaltene MwSt. 16%: 4,40EUR (means VAT 16%)

an this will be reportet:

Quote

Month Apr
Day 7
Gross 56.16
Income Product 29.95
sales Nontaxed -29.95
sales Taxed 59.90
sales Taxes 6.36
collected Shipping & Handling 19.85
GiftVouchers 12.00

If I understand it correctly,
gross must be 61.80, not 56.16
Income Product is correct: 29.95
sales Nontaxed must be 0, not -29.95
sales Taxed must be 61.80, not 59.90
sales Taxes is correct: 6.36
collected Shipping & Handling is correct too: 19.85
GiftVouchers must be an extra col named COD, value is correct: 12.00

Can you help us germans?

Thank you, Ralf

#3   zzfritz

zzfritz
  • Members
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 08 April 2004 - 12:29 AM

The miscalculations have been corrected in v 2.0.1, just uploaded:

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

This upload includes the missing language files, for whose omission I apologize.  Please share your corrections and improvements to the translations.

To rename the "extra" column, edit the define statement in the language file for TABLE_HEADING_OTHER at about line 41.

#4   talon177

talon177
  • Members
  • 409 posts
  • Real Name:Talon

Posted 08 April 2004 - 01:34 AM

Great mod!

#5   asasson

asasson
  • Members
  • 20 posts
  • Real Name:Amitai

Posted 08 April 2004 - 04:57 AM

Hi Fritz,
I am having a problem with saving the csv file.
I changed the permissions on the file stats_monthly_sales.php that didn't help either. I think that it might be because I am on a shared SSL or may be something else but it keeps telling me that: (alert box)
"IE cannot download stats_monthly_sales.php from host"
"IE could not open this site, this site is either unavailable or cannot be found"

you probably know what message I'm refering to...

any ways, other then that it is a lovely reporting tool and I'm sure that it will help me shed some light on how my store is doing.

Thank you,
Amitai

#6   kooyan

kooyan
  • Members
  • 58 posts
  • Real Name:Stefan Fritsche

Posted 08 April 2004 - 01:50 PM

Thanks for your great work. I tried to install the actual Version 2.0.1 on MS 1 and it worked but the output made sometimes no sense, also the drilled down page showed nonsense  ;) .

I use your report for MS 1 so it is not so important, but let me ask you, was it your intention to let this also work with MS1 or only MS2?

Thanks a lot.


Stefan Fritsche
www.klosterbrauerei.com

#7   Wicked

Wicked
  • Members
  • 2 posts
  • Real Name:Martin Knops

Posted 08 April 2004 - 09:13 PM

ISG, on Apr 7 2004, 03:11 PM, said:

Hello Fritz,

I have some trouble using this great contribution with a german shop.

This is an order:

Quote

Artikel Artikel-Nr. MwSt. Preis (exkl.) Preis (inkl.) Total (exkl.) Total (inkl.)
Article xxxxxx 7% 27,99EUR 29,95EUR 27,99EUR 29,95EUR (includes VAT 7%)
Sub-Total: 29,95EUR (includes VAT, in this case only 7%)
Cash on Delivery Fee: 12,00EUR (includes VAT 16%)
German Post (Dispatch to IT: (1 x 3.3 kg)): 19,85EUR (includes VAT 16%)
Total: 61,80EUR (includes VAT 7 & 16%)
enthaltene MwSt. 7%: 1,96EUR (means VAT 7%)
enthaltene MwSt. 16%: 4,40EUR (means VAT 16%)

an this will be reportet:

Quote

Month Apr
Day 7
Gross 56.16
Income Product 29.95
sales Nontaxed -29.95
sales Taxed 59.90
sales Taxes 6.36
collected Shipping & Handling 19.85
GiftVouchers 12.00

If I understand it correctly,
gross must be 61.80, not 56.16
Income Product is correct: 29.95
sales Nontaxed must be 0, not -29.95
sales Taxed must be 61.80, not 59.90
sales Taxes is correct: 6.36
collected Shipping & Handling is correct too: 19.85
GiftVouchers must be an extra col named COD, value is correct: 12.00

Can you help us germans?

Thank you, Ralf
I also have this probblem (version2.01) in english, german and dutch

I realy want this contribution to work because it is a super contribution!!!!

I hope you can help!!

#8   99darkgreenGT

99darkgreenGT
  • Members
  • 143 posts
  • Real Name:chris

Posted 08 April 2004 - 09:31 PM

great contrib.  exactly what i was looking for!

#9   kooyan

kooyan
  • Members
  • 58 posts
  • Real Name:Stefan Fritsche

Posted 08 April 2004 - 10:15 PM

I saw Wicked and ISG also have the same problem. I forgot to mention it is also a german shop if this matter. Especially the minus calculation was suprising me :) .

sales Nontaxed -29.95

HTH
Stefan Fritsche
www.klosterbrauei.com

#10   99darkgreenGT

99darkgreenGT
  • Members
  • 143 posts
  • Real Name:chris

Posted 09 April 2004 - 03:04 AM

one suggestion.

can you make it report how many items have been sold within a given day?  perhaps, listing each item sold that day and the price?

i'm not php inclined so i have no idea how to do it.  any help would be appreciated!

#11   zzfritz

zzfritz
  • Members
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 09 April 2004 - 03:21 AM

To Chris, this is and will remain only a financial reporting tool and not a marketing tracker.  I agree that the marketing report would be valuable, but it should not be piggybacked onto this one which is already crowded enough.

To Wicked and the Germans, the language is not the problem but perhaps the difference I had not anticipated is in the way your order totals are composed.  My assumption in the financial calculations was that ot_total is the sum of all the other entries for the order (ot_subtotal, ot_tax, ot_shipping, ot_loworderfee, etc).  If that is not correct, I need to be educated.  Maybe we could private message and share some data for testing.

kooyan, version 2.0.1 should work on both MS1 and MS2 since the structure of the orders and orders_total tables is the same.

I will keep plugging away with this.  

The next enhancement that I am testing is a popup window that shows the breakdown of taxes for each month or day.  If you have more than one tax class (for instance, two different VATs or maybe a sales tax and a luxury tax), the subtotal for each will be given.  The main purpose of this report is to assist stores in maintaining and reporting the sales and tax data required by their jurisdiction's taxing authority.

#12   goring_gap

goring_gap
  • Members
  • 116 posts
  • Real Name:Simon
  • Location:UK

Posted 09 April 2004 - 07:06 PM

I get the same as asasson...

Quote

"IE cannot download stats_monthly_sales.php from host"

when I use the save CSV button.  I am also on a shared host and using SSL. Any ideas?

cheers
Simon

#13   Farrukh

Farrukh
  • Members
  • 480 posts
  • Real Name:Farrukh Saeed

Posted 10 April 2004 - 01:14 PM

I have used it and downloaded the CSV file and it worked though I was not on SSL Connetion.

#14   goring_gap

goring_gap
  • Members
  • 116 posts
  • Real Name:Simon
  • Location:UK

Posted 10 April 2004 - 01:25 PM

The data is great and the remainder of the contribution works fine for me. As a work around, I've just taken out the 'save csv' button for now.

In admin/stats_monthly_sales.php
<?php };
  };
// done with report body
//
// button for Save CSV
/* Doesn't work for me - causes download of stats_monthly_sales.php instead.
if ($num_rows>0 && !$print) {
?>
<tr>
    <td class="smallText" colspan="4"><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method=post><input type='hidden' name='csv' value='<?php echo $csv_accum; ?>'><input type='hidden' name='saveas' value='sales_report_<?php
   	 //suggested file name for csv, include year and month if detail
   	 //include status if selected, end with date and time of report
    if ($sel_month<10) $sel_month_2 = "0" . $sel_month; 
    else $sel_month_2 = $sel_month;
    if ($sel_month<>0) echo $sel_year . $sel_month_2 . "_";
    if (strpos($orders_status_text,' ')) echo substr($orders_status_text, 0, strpos($orders_status_text,' ')) . "_" . date("YmdHi"); else echo $orders_status_text . "_" . date("YmdHi"); 
    ?>'><input type="submit" value="<?php echo TEXT_BUTTON_REPORT_SAVE;?>"></form>
    </td>
</tr>
<?php }; 
*/
// end button for Save CSV ?>
If anyone sorts it out please let me know and I will do the same.

cheers
Simon

#15   talon177

talon177
  • Members
  • 409 posts
  • Real Name:Talon

Posted 10 April 2004 - 10:49 PM

Anyone using BTS with this and getting this error?

Warning: Cannot modify header information - headers already sent by (output started at /catalog/admin/includes/languages/english.php:1) in /catalog/admin/includes/functions/general.php on line 22

on line 22 of general.php it shows    

header('Location: ' . $url);

Thanks.

#16   zzfritz

zzfritz
  • Members
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 12 April 2004 - 01:36 AM

Talon's well known error message is the one indicating some script has a space or extra new line character at the end.  Probably happened when editing.

For those having a failure on the Save CSV, I am reviewing the coding standards for SSL since this is most likely where I failed to anticipate the compatibility problems.

#17   zzfritz

zzfritz
  • Members
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 12 April 2004 - 02:05 AM

Version 2.1 is released today, as announced here:
http://forums.oscommerce.com/index.php?act...ndpost&p=345315

Reluctantly I removed the "taxed" and "nontaxed" columns, which were among the original reasons I wrote the report in the first place.  These were meaningful only for stores which assessed tax on some order but not on others, and there are too many variations and uncertainties to be accommodated without the ability to configure the report.  Someday (please, Harald) reports will be modules with configurablity.

Now there is no assumption about the relationship of the orders_total components, so the report should make sense for all stores.

Translations of the language files for german and espanol would be appreciated, and included in the next release.

Edited by zzfritz, 12 April 2004 - 02:08 AM.


#18   talon177

talon177
  • Members
  • 409 posts
  • Real Name:Talon

Posted 12 April 2004 - 04:14 AM

Thanks for the update, and info.

#19   valley

valley
  • Members
  • 259 posts
  • Real Name:Sreedharan Pillai
  • Location:Wombourne, U.K.

Posted 12 April 2004 - 05:22 AM

Hello Fritz

Many thanks for your great contribution which adds real
and important usability to OSC.
For real merchants, sooner or later, accounts for taxation
becomes a serious issue.
Our accountant loves this report and the TAXABLE AND
NON TAXABLE columns you added are really important.

All the drill down features are great financial tools.

I will for now stick with your previous version.

#20   Kraven_UK

Kraven_UK
  • Members
  • 10 posts
  • Real Name:Mark

Posted 12 April 2004 - 09:10 AM

Fritz,

I've just updated to V2.1 and I must say I really think you should put the TAX and NOTAX colums back in.

It's nice to see that the GROSS amount is now correct though.

I know this may be a little hard but I have a couple of suggestions that may help a few people.

1, GROSS amount - as V2.1
2, NON TAXED sales amount - Value of sales without TAX
3, TAXED sales amount - Value of sales without TAX
4, TAX Collected - as previous

Steps 2 & 3 would give a true NET amount, where in V2 the NET amount of TAXED sales was showing the GROSS amount of the sale.

I also have other suggestions if you are interested, I just wish I knew enough about PHP to do them myself  :blink: