Reviewed & tested by the community
Project:
Ubercart Payment Method Adjustments
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
30 Jun 2010 at 09:33 UTC
Updated:
11 Jan 2013 at 20:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
Juhani commentedI've got the same issue. Not sure, is the puzzle in Ubercart 2 VAT support module or in this one.
Comment #2
p4trizio commentedI still have to solve this... the problem is that I have no idea where to begin.
Did you post a request on ubercart tax support?
Comment #3
p4trizio commentedIf anyone would like to try, I created a demo account on http://www.bellearti.net/en
user: demo
psw: demo
Many things are in Italian language, sorry for that
Comment #4
Juhani commentedHi, I've opened an issue http://drupal.org/node/844722
Comment #5
p4trizio commentedDoes anyone else have this issue with PMA and Tax module?
I worked around studying code on both modules without any improvement...
Comment #6
smartango commentedhave a look here
http://www.ubercart.org/issue/3442/checkout_calculations_not_same_review...
(fix uc_pma.js , and comment how I think module should be changed)
Comment #7
smartango commentedNo, seriously, the problem is line_item for payment method is not set when taxes module apply taxes, I workaround this with this code in uc_pma.module (uc_pma_order func):
this change $arg1 var, so when it is uc_taxes_order turn, it will find a line_items (there is something I do not like here, and I wonder why shipping module works correctly with taxes, while pma dont ...)
Comment #8
checker commentedI have also problems with pma + tax on the checkout page in payment pane. The payment adjustment is displayed but without taxes. On the total line in review page is everything correct with taxes.
payment_method_adjustment_description() has no mechanism to alter payment prices with taxes.
Could someone help me how to get a price includng taxes?
Comment #9
checker commentedI think it should be a bug issue because also of the other problems with pma + tax.
Comment #10
cyu commentedI created the D5 version of this module, port to D6 was by Longwave. I'm not very familiar with the workings of this module on D6, but if someone has a clean patch that is tested and ready for commit, I will commit it. The patch in #7 scares me a bit and suggests that the fix doesn't need to happen in this module, but needs to happen in Tax code.
If someone is deeply invested in this module and wished to maintain the D6 branch, that would be fine too.
Comment #11
kecinzer commentedI figured this problem out with my Recycling Fee module. Just set weight of the module (in "system" table) to something under zero (I set -2).
This caueses, that during review its function for store line_items called earlier that tax function and tax will be calculated corect.
Comment #12
longwaveThere are two issues at play here. Firstly, uc_pma and uc_taxes both do their work in hook_order, so uc_pma's module weight must be lower than uc_taxes in order for tax to be calculated on the PMA line item. This problem will affect modules other than uc_pma, and is already noted at #603356: uc_taxes module's weight should be set heavier on install. The attached patch sets uc_pma's weight to -1 so it will run before uc_taxes.
Secondly, uc_pma does not update the $order object correctly during uc_pma_order. The patch in #7 would fix this, but in the attached patch I just put the line item data straight into the $order object using the data that is already available rather than hitting the database.
When testing the attached patch, please note you must run update.php to update the module weight.
@checker: yours is a slightly different issue that is only applicable when running uc_vat as well, however I think another issue should be opened for this, as it is more problematic to fix - the adjustment may not be taxed if the user is outside the EU, so we cannot just assume that the adjustment price should be taxed in all cases.
Comment #13
longwaveUpdated patch attached, which includes support for uc_price() and can dynamically reload the adjustment descriptions during checkout. This handles cases where tax rules may apply to certain countries only, so the price can change depending on the user's country selection at checkout.
Comment #14
smartango commentedComment #15
smartango commentedyes! it works, I still have a problem with number format, I added $adjustment = str_replace(variable_get('uc_currency_dec', '.'), '.', $adjustment);
at line 233 of patched module ie. in function _payment_method_adjustment:
...
if (strstr($adjustment, '%')) {
$percent = TRUE;
$adjustment = str_replace('%', '', $adjustment);
$adjustment = str_replace(variable_get('uc_currency_dec', '.'), '.', $adjustment);
$adjustment /= 100;
}
and all work in Italy ;)
Comment #16
fenstratThe patch in #13 does what it says on the box. RTBC.
However it won't need the hook_update_N() function which lowers uc_pma's module weight as #603356: uc_taxes module's weight should be set heavier on install has been committed.
Comment #17
Barna commented