PAYONE/magento — pull request #9 by tacker (2013-05-29 07:33:24+00:00)
Title: On a partial refund the total discount is refunded.

Magento calculates the refunded amount of a discount based on the price of the refunded item in relation to the order total.

See Mage_Sales_Model_Order_Creditmemo_Total_Discount::collect() in app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Discount.php for reference.

This behaviour was NOT reflected here.

This change fixes the behaviour.