PHOENIX-MEDIA / Magento-CashOnDelivery

Cash on Delivery allows to book additional fee on delivery depending on inland or international delivery.
43 stars 46 forks source link

fixed invoice subtotal calculation failure, fixed cod fee including tax on pdf invoice #2

Closed schnere closed 10 years ago

schnere commented 10 years ago

Hi,

you've deleted my fix within a commit.

Please see information from last pull request: https://github.com/PHOENIX-MEDIA/Magento-CashOnDelivery/pull/1

I've adapted the fix to work with the latest version of your module.

In addition I've changed the cod fee in invoice pdf info box. Now the cod fee is displayed including tax if selected in admin.

Best regards,

schnere

schnere commented 10 years ago

Hi,

as I've seen that you are merging other pull requests, can you tell me why you won't merge this? It would be great if you could provide me information what to do to get it merged...

Thanks,

schnere

PHOENIX-MEDIA commented 10 years ago

We haven't been able to fully review and test your changes. Smaller changes are easier to review and accept. Nevertheless thanks in advance for your contribution!

emiliolodigiani commented 10 years ago

You should really pull this request or correct in any other way the wrong invoice tax calculation. This issue is giving our accountant big headaches.

schnere commented 10 years ago

The pull request isn't that big:

And the basic thing is, that I've added one single file, which consumes the most lines:

app/code/community/Phoenix/CashOnDelivery/Model/Sales/Invoice/Subtotal.php 

And this file is just rewrites the core Magento file and adds one single line:

$allowedSubtotalInclTax     -= $order->getCodTaxAmount();

This prevents COD tax from being added twice to subtotal in the same way as Magento does it with Shipping Tax:

$allowedSubtotalInclTax     -= $order->getShippingTaxAmount();

My customers are using my patched version of your module since serveral months in their production environments without any problems.

I'd appreciate if you would merge this, because the wrong invoice tax calculation is a mature bug.