I can create Credit Memo for invoice as given in this link.
Can anyone please help me to create Credit Memo with partial products and not returning all the products in invoice.
creditmemomagento2.3orderssales-order
I can create Credit Memo for invoice as given in this link.
Can anyone please help me to create Credit Memo with partial products and not returning all the products in invoice.
Best Answer
In Magento, if you want to create a credit memo, then you need to use below class:
\Magento\Sales\Api\RefundOrderInterface
\Magento\Sales\Api\InvoiceRepositoryInterface
\Magento\Sales\Api\Data\ CreditmemoItemInterfaceFactory
Example: