close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to properly add tax of shipping costs?

Thread began 3/09/2010 6:11 am by jernej | Last modified 3/12/2010 8:02 pm by jernej | 765 views | 3 replies

jernej

Thanx. I know how to calculate 20% of the postage, but how to add 20% of the postage to the TAX calculation is my question? Because I have 2 tax-es (8.5 and 20%) and the postage falls into 20% one.

So if I make a postage rule and tick the option to include it into tax, it works. But works only in Taxable total. So taxable total carries the tax for the postage. But I need it to go to the 20% tax rule, not taxable total...

I've come today with some kind of solution (half), to add to my 20% tax rule the postage calculations * 0.20.

I'll write here all my relevant rules, so perhaps you can see what I am trying to do. This works now, but it is not a good solution:

Here are the 3 postages:

<%
function WAEC_eCart1_PostninaPravne1()
totalShipping = 0
if (true AND ((UBound(eCart1.Items) > 0))) then
totalShipping = totalShipping + 1.67'Result
end if
WAEC_eCart1_PostninaPravne1 = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_PostninaPravne2()
totalShipping = 0
if (true AND ((cStr(Session("tip")) = "1") AND (WA_eCart_TotalColumn(eCart1, "Quantity") > 5))) then
totalShipping = totalShipping + 1.67'Result
end if
WAEC_eCart1_PostninaPravne2 = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_PostninaPravne3()
totalShipping = 0
if (true AND ((cStr(Session("tip")) = "1") AND (WA_eCart_TotalColumn(eCart1, "Quantity") > 10))) then
totalShipping = totalShipping + 2.5'Result
end if
WAEC_eCart1_PostninaPravne3 = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>

Here are both taxes:

<%
function WAEC_eCart1_SalesTax8()
totalTax = 0
if (true AND ((WA_eCart_ConditionalTotal(eCart1, "Quantity", "Tax", "0,085") > 0))) then
totalTax = totalTax + (WA_eCart_ConditionalTotal(eCart1, "DDVSkupaj", "Tax", "0,085"))'Result
end if
WAEC_eCart1_SalesTax8 = WA_eCart_FormatNumber(totalTax, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_SalesTax20()
totalTax = 0
if (true AND ((WA_eCart_ConditionalTotal(eCart1, "Quantity", "Tax", "0,2") > 0) OR (( cDbl(WA_eCart_GetShipping(eCart1))>0 )))) then
totalTax = totalTax + (WA_eCart_ConditionalTotal(eCart1, "DDVSkupaj", "Tax", "0,20"))+cDbl(WA_eCart_GetShipping(eCart1))*0.20'Result
end if
WAEC_eCart1_SalesTax20 = WA_eCart_FormatNumber(totalTax, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>

The DDVSkupaj is the [Price] * [Tax] as I have in database neto price and tax value (0.2 or 0.085)

Now this kind of works, but is it smart to add custom function to 20% tax:totalTax = totalTax + (WA_eCart_ConditionalTotal(eCart1, "DDVSkupaj", "Tax", "0,20"))+cDbl(WA_eCart_GetShipping(eCart1))*0.20

As you see I had to use the custom function to add the GetShipping(ecart1)*0.20


The problem I see with ecart here is that it assumes all tax is in one value that is represented in taxable total. Here in Slovenia we have to specify in orders the 8.5% tax and 20% tax SEPARATELY. So taxable total doesn't help and so the check box to incude postage in tax doesn't help me.

I hope it is more clear now, but I am not sure :-)

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...