It is possible to override line item callbacks with hook_line_item_data_alter(), but uc_taxes_order() does not respect this and always calls its own function directly.

The attached patch fixes this; this is required for a patch I am working on in uc_vat that fully supports uc_coupon discounts on stores that use mixed tax rates.

CommentFileSizeAuthor
uc_taxes_line_item_alter.patch787 byteslongwave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Tax adjustment features have now been committed to uc_vat and uc_coupon, so discounted orders can now have their VAT calculated correctly, but this patch is still required, so I added an option to uc_vat where the user can indicate that they have applied this patch. It would be nice to get this committed so users don't have to run a patched Ubercart!

jazzitup’s picture

That's great news, longwave! Is there a chance uc_vat could also support uc_discount module as well?

longwave’s picture

Status: Needs review » Fixed

Committed to both 6.x and 7.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Wolfke2800’s picture

Is the patch still valid for 6.x-2.6? I can't get it to work.

Netbeans says "The patch cannot be applied in the selected context".

fenstrat’s picture

@Wolfke2800 this patch is not needed as it is already part of 6.x-2.6