it4mage / CashOnDelivery

Cash on delivery module for Magento 2
25 stars 19 forks source link

COD fee unconditionally refunded in credit memo #34

Open arion-p opened 2 years ago

arion-p commented 2 years ago

Preconditions

  1. Magento 2.4.x
  2. COD module configured to apply a fee

Steps to reproduce

  1. Create an order as customer with at least two items and COD payment such that a fee is applied
  2. In back end invoice the order (it doesn't matter if it is shipped or not)
  3. In back end try to create a credit memo for one of the items

Expected result

  1. User can specify wether COD fee will be refunded in the credit memo, preferably he should also be able to specify the amount

Actual result

  1. COD fee is refunded unconditionally. See attached screenshot image

This is a problem with partial refunds (e.g. defective product or damaged on delivery etc). Also if you do multiple refunds on an order, COD fee is refunded multiple times, once on every credit memo (even though it was only payed once)

arion-p commented 2 years ago

Note that it is possible to workaround the issue by applying an adjustment fee equal to the COD fee, but this is rather unituitive way to handle it and easy to make a mistake.