close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Applying German tax rules

Thread began 12/14/2010 5:16 pm by henrik.schlegel400884 | Last modified 6/16/2011 6:00 am by Cologne | 1265 views | 7 replies |

Henrik

Applying German tax rules

There were some threads before in the forum dealing with that subject but I found no solution for what I want to do.

In Germany it is usual praxis if you sell to 'normal' customers (not biz to biz) that the tax is included in the displayed price (Grand Total).

So, I would like the calculated tax just be a displayed amount and not adding itself to subtotal and shipping!

Let's give an example. Let's say we have a shopping cart with:

1 CD - Price: Euro 25.00

Sub-total: Euro 25.00
Shipping: Euro 4.00

Tax (included in Grand Total): Euro 4.63
Grand Total: Euro 29.00

This would be an usual German Invoice. You add the sub-total and shipping and get the Grand Total. The tax is 19 percent of Grand Total (in other words: Grand Total times 0.15967) and will just be displayed.

This is what I try to achieve in the shopping cart, confirm and checkout success pages. It seems to me that can't be achieved with the calculation of the "eCart Object Tax Rule". Because the calculated tax always adds to the sub-total and shipping.

So I have the following idea:

In the "eCart Object Tax Rule" I have calculated the correct tax amount. So the Shopping Cart is correct - except the Grand Total. This is to high - precisely at the amount of the tax.


This is the code which displayes the Grand Total in the Shopping Cart:

<?php echo WA_eCart_DisplayMoney($eCart_en, $eCart_en->GrandTotal()); ?>

If I could change this code - that it subtract the Tax from the Grand Total - the Grand Total would be correct!

The tax is displayed with this code:

<?php echo WA_eCart_DisplayMoney($eCart_en, $eCart_en->GetTax()); ?>


I am just at the beginning with php and don't know how this can be done. (I hope it can! ...)

So, if somebody could help me on this ...
This would be great and highly apreciated!
:-)

Thanks!
Henrik

Sign in to reply to this post

Henrik

Found solution

There is a more elegante way to display the correct Grand Total.

In the Bindings Panel in the eCart clumn there is a record "PreTaxSubTotal".
That value holds the correct amount.

Best is to insert that code becide the php-code of the "Grand Total" of the page -
and then copy&paste the part you need to bring the "PreTaxSubTotal"-value in the "old Grand Total"-code. Then delete the "PreTaxSubTotal" field - you just brought in.

The new code looks (in my case) like this:

<?php echo WA_eCart_DisplayMoney($eCart_en, $eCart_en->GetTaxableTotal()); ?>

It displays now the correct value.

Sign in to reply to this post

Henrik

I was wrong - that doesn't work

Unfortunately my "solution" is not working trough the whole process!

Although it is shown now the correct value as Grand Total on the cart-, confirm- and checkout_success-pages, because I display the "TaxableTotal" instead of the real Grand Total ...

The problem is that the real Grand Total value is further used under the surface.
It is inserted as the OrderAmount in the database and is also submitted to PayPal and thatswhy will be charched from the costumer.

So, instead trying to change that, I think it's more easy going back to my first idea and trying to solve the issue in that way ...

So, I think the questions are:

Where and how will the Grand Total be calculated ? and

Is it possible to distract the calculated tax from the Grand Total and how ?

Many thanks for any help on this!

Maybe there is also another solution to accomplish that ... (?)

It would be great if I could get an advice here!
Thanks!

Henrik

PS: If anybody could post back soon, this would be highly appreciated.
Because I am starting to run out of time for that project...
Thanks!

Sign in to reply to this post

Dani Chankhour

Instead of using eCart to calculate your tax, you might want to calculate the tax on your own. This way eCart will always have the correct grand total. So on the confirm pages you can just calculate the tax on your own by multiplying the grand total by the 19 percent.

Sign in to reply to this post

Henrik

Thanks, Dani!

If I calculate the tax on my own.
How can I calculate and display the Tax (GrandTotal times 0.15966385) ?

If the GrandTotal is displayed so:

<?php echo WA_eCart_DisplayMoney($eCart_en, $eCart_en->GrandTotal()); ?>

How can I multiply the GrandTotal by 0.15966385 ?
How would the code look like?

Thank you!

Sign in to reply to this post

Ray BorduinWebAssist

<?php echo WA_eCart_DisplayMoney($eCart_en, $eCart_en->GrandTotal()*0.15966385); ?>

Sign in to reply to this post

Henrik

Thank you!

Sign in to reply to this post

Cologne

Hello Henrik,

why do you take (Grand Total times 0.15967) to get 19% tax? wont it be 0.19?

just found it :-)


K-12952.xhtml?currentModule=home


Cheers
Denis

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...