Hi everyone!

This bug is somehow related to #1178224: Payment-Tab not removed on order with value 0 at the uc_free_order module... But as of writing comment #1 there, I start to think, that the bug there is caused by a malfunction of the uc_taxes-module.

The situation (if you read the other bug and comment #1, you might as well skip that part):

The product I'll always use
-> Price: 14,90 Euro
-> Taxes: 19% (2,38 Euro)
-> Price without taxes: 12,52 Euro

uc_free_order uses

$('#edit-panes-payment-current-total').click(function() { free_order_check_total(this.value); });

to decide how much the value of an order is. This function is basically called every time /taxes/calculate returns new values.

When I open /cart/checkout, I'll get the following to results:
14.9000019
17.2789938

OK, the first one is the product with taxes, the second one seems to be price-with-taxes + taxes - that's completly senseless.

Now, I add an 100% rebate coupon. /taxes/calculate is - of course - called one again:
4.758993799999999
2.3800019

Note, that a line-item with -12,52€ / -2,38€ / -14,90€ (price with taxes / taxes / price without taxes) is created.

So as far as I understand, 4.758993799999999 is that "2 x taxes"-thing, then the tax-value of the coupon (egally 2,38 Euro) gets distraced. That leaves the value of #edit-panes-payment-current-total to 2,38 Euro, even tough in the payment preview-pane we have 0,00€ / 0,00€ / 0,00€.

That is the first kind of strange behavior, but there is more...

If I leave /cart/checkout and return, I still have my cart with my rebate-coupon and a total value of 0,00 Euro.

But in background, /taxes/calculate gets called either way.
0.0012018999999999
0.001201899999999867
2.3801938
0.001201899999999867
2.3801938
0.0012019000000002044

Well, I realy dont know, whats happening here and what gets calculated, but fact is, that the last result is a correct (rounded) 0,00 Euro you'd expect from a cart with a 100% rebate coupon.

To conclude after this long text (sorry guys): I thing there might be something wrong with the uc_taxes-module.

Comments

tr’s picture

Status: Active » Closed (cannot reproduce)

No additional reports or further information. If you still see this behavior with just core Ubercart (no free order module, no coupon module) please provide instructions to reproduce.