Closed (fixed)
Project:
Tax by taxonomy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2007 at 12:10 UTC
Updated:
30 Dec 2007 at 21:41 UTC
EG: a product costs 100, tax is 21% i order 5 of em, so that makes a total of 5*(100) + 5*(100*21%) = 605.
The module forgets the 5* on the taxes(the quantity) and calculates this way:
5*(100) + (100*21%) = 521
for my site i fixed this this way:
in the checkoutapi function i added this (after case 'review':):
$cartitems = cart_get_items();
foreach($cartitems as $item) {
$quantities[$item->nid] = $item->qty;
}
and i changed this:
$taxes[$tid] += ($node->price * (int)$term->name) / 100
into
$taxes[$tid] += ((($node->price * (int)$term->name) / 100) * ($quantities[$node->nid]));
Comments
Comment #1
robertgarrigos commentedthanks. commited to .dev
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.