Jump to content

Oplossing voor tax (btw) probleem (dutch uitleg)


Guest EJS

Recommended Posts

Ook ik ben een hele tijd bezig geweest om het 19% BTW verhaal goed in CC te krijgen. Ik kreeg ook steeds in de winkelwagen bij BTW te zien N/A, als ik de prijzen incl BTW wou hebben in de shop. Maar ik heb nu eindelijk een oplossing voor dit probleem gevonden.

Wat heb ik gedaan, in de Admin back heb ik bij algemene instellingen de optie BTW bij de prijzen inbegrepen? op NEE gezet. Je zult denken maar de prijzen moeten toch incl BTW worden, maar dat komt straks gewoon goed,

Vervolgens heb ik de code in /includes/content/cart.inc.php veranderd.

Zoek de vogende tekst op in /includes/content/cart.inc.php

		$view_cart->assign("LANG_SHIPPING",$lang['front']['cart']['shipping']);



	



	$view_cart->assign("VAL_SHIPPING",$shippingPrice);



	



	$view_cart->assign("LANG_TAX",$lang['front']['cart']['tax']);




voeg onder deze tekst de volgende regel bij




//Tax hack by EJS

	$tax = $subTotal / 119 * 19 + $basket['shipCost'] / 119 * 19;




Kleine uitleg over de regel hierboven. er staat eigenlijk btw = subtotaal : 119 X 19 + verzendkosten : 119 X 19



Het is dus eigenlijk gewoon de juiste rekensom om de btw uit te rekenen wat in het subtotaal bedrag en in de verzend kosten zit, en deze neer te zetten bij de BTW in de winkelwagen.



Zoek nu de onderstaande regel op (staat is lager) 




$grandTotal = $subTotal + $tax + $basket['shipCost'];




En verander die in




$grandTotal = $subTotal + $basket['shipCost'];

Kleine uitleg: hier zeg je dat het totaal van de winkelwagen is het subtotaal + de verzendkosten. Aangezien de BTW al in die twee bedragen zit moet je die dus verwijderen (anders klopt het totaal niet meer).

Save nu de file en upload hem weer naar de server.

Als je dit allemaal hebt gedaan, dan kun je bij je producten gewoon de bedragen incl BTW invullen, en zal je in je winkelmandje bij subtotaal en verzendkosten de bedragen incl BTW zien staan, bij totaalwinkelwagen het totale bedrag incl BTW, en bij BTW dus het BTW bedrag wat over het geheel bedrag zit aan BTW.

Hopelijk hebben jullie wat aan deze uitleg

Sorry dat ik dit bericht in het Nederlands post, maar mijn engels is niet echt best. Maar ik wou dit toch delen met andere. Mischien is er iemand die deze posting wilt vertalen in het engels ??

Suc6 er mee

Link to comment
Share on other sites

Guest steefman

Aangezien ik hier al heel lang naar op zoek ben en het super werkt, hier voor mijn dank zal ik het even proberen te vertalen.

******

Also i was working on the 19% isseu for a long time to get it right in CC, because my items are including tax.

I Also had the problem that the cart displayed N/A at the tax part.

So here is the solution :

Go to the store settings and put the settings to TAX not included..

Dont worry it wil come together in the end ;)

Next open /includes/content/cart.inc.php

en search for :

$view_cart->assign("LANG_SHIPPING",$lang['front']['cart']['shipping']);



	



	$view_cart->assign("VAL_SHIPPING",$shippingPrice);



	



	$view_cart->assign("LANG_TAX",$lang['front']['cart']['tax']);




add directly below that the next line




//Tax hack by EJS

	$tax = $subTotal / 119 * 19 + $basket['shipCost'] / 119 * 19;




Find next this line ( a little bit lower)




$grandTotal = $subTotal + $tax + $basket['shipCost'];




and change it into




$grandTotal = $subTotal + $basket['shipCost'];

now save it and upload the file..

you can add now items incl. the tax price, the code wil count it back and calculate the tax price over the items and the shipping cost..

Oke ill hope its understandeble with my bad translation skills hahahahaahahah

Thnx EJS for the code, was looking a long time for this one.

Link to comment
Share on other sites

  • 4 months later...
  • 5 months later...
Guest Tazmanian79

Aan de hand van de hack van EJS heb ik dit nog aangepast. En deze keer voor de Belgen :-)

Open het bestand cart.inc.php

Om het subtotaal te bereken ZONDER BTW:

Zoek

		$subTotal = $subTotal + ($price * $quantity);




En vervang door


		$subTotal = $subTotal + ($price * $quantity) * 100 / 121;




Om de BTW te berekenen op de producten en de transportkosten



Zoek


	$view_cart->assign("LANG_TAX",$lang['front']['cart']['tax']);




En plaats hieronder


				$tax = ($subTotal * 21 / 100) + ($basket['shipCost'] * 21 / 100);

Bij het ingeven van de transportkosten moet je dan wel zeggen dat er GEEN btw op wordt berekend!

Link to comment
Share on other sites

  • 2 weeks later...
Guest Brivtech

Yes, it is a good program, and is certainly here to stay, especially with Version 4 on full steam ahead.

Ek kan nie Hollands praat nie, maar ek is heutemaal tweetalig in Afrikaans! :sourcerer:

Link to comment
Share on other sites

  • 2 weeks later...
  • 11 months later...
  • 1 month later...
Guest 4CoolPlay

Hallo EJS,

Bedankt voor je code !! Ik ben een startende CubeCart-user en bij mij werkt het prima!! MAAR!!

Hierop volgt bij mij bij afrekenen via Paypal het volgende:

Paypal rekent als bedrag:

Het bedrag van het artikel (waar de BTW al bij inbegrepen is) + alle BTW (artikelen en verzending) + nog een keer dezelfde verzendkosten.

Enig idee?

Link to comment
Share on other sites

  • 1 year later...
Guest Disser24_NL

Nederlands:

Ik kan het mis hebben maar volgens mij klopt de formule niet.

Neem bijvoorbeeld als subtotaal 100. Dan is het 100/119= 0,84 en 0,84 x 19= 15,97 terwijl dat 19 zou moeten zijn (19% van 100 is 19).

Volgens mij moet dus de volgende formule worden gebruikt: subtotaal x 19 / 100 >> 100 x 19= 1900 en 1900/100= 19

English:

I think that the taken formula is wrong. If the subtotal is 100, then the tax is 100/119 x 19 = 15,97. It should be 19 though.

In my opinion the right formula is subtotal x 19 / 100

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