OpenBuildings/purchases — pull request #8 by hkdobrev (2014-01-21 12:59:08+00:00)
Title: Add each refund as a purchase item

- Add new Model_Purchase_Item_Refund - it references Model_Store_Refund
and holds a negative amount equal to the total amount of the refund.
- Allow Model_Purchase_Item reference to be of any type not just Sellable.
- Add new Model_Store_Refund::add_purchase_item_refund(). It adds a new
purchase item
to the store purchase of the refund.
- Add new Jam_Behavior_Payment_Refundable.
It calls Model_Store_Refund::add_purchase_item_refund() on model.after_refund
event
of the payment. It is attached by default to Model_Payment.