This is essentially a backport of #1155656: Allow per-line-item tax adjustments.. Allows discounts to function when there are mixed tax rates in the US (i.e. without uc_vat enabled).

CommentFileSizeAuthor
#1 1538920-tax-adjustment.patch702 byteswodenx

Comments

wodenx’s picture

Status: Active » Needs review
StatusFileSize
new702 bytes
longwave’s picture

Status: Needs review » Postponed (maintainer needs more info)

The D7 code does not divide by $tax->rate; why is that different here?

D7 patch for reference: http://drupal.org/files/issues/1155656-uc_taxes-line-item-adjustment.patch

wodenx’s picture

Status: Postponed (maintainer needs more info) » Needs review

I think when you originally created this for uc_vat, that's the way uc_vat used it. The hook was designed to return the tax (=taxable_amount * tax_rate) -- but uc_taxes collects the whole taxable amount and applies the rate at the end, so when i re-implemented for D7, I changed the hook to return the taxable amount. Can't make that change in D6 without breaking uc_vat integration, so we need divide the tax returned from the tax-adjustment callback by the rate to get the taxable amount.

longwave’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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