(root)/ – Rev 37777
Rev 37776 |
Rev 37778 |
Go to most recent revision |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 37777 2026-09-24 20:16:56
- Author: amit
- Log message:
- returns: finance endpoint to reverse a return whose goods never reached the warehouse
PUT /return/reverse?imei=&reason=&dryRun= calls ReturnReversalService (r37776) for one
IMEI. Finance only, same canRefund gate as the refund it undoes, and dryRun defaults to
true so a call without it reports the plan and writes nothing.
ReturnReversalTest covers the four cases against the local database with NIC on the
sandbox: the dry run writes nothing, a note past its 24h window issues a DBN and undoes
every effect of the refund (warehouse scan and stock, partner stock and offers, order
status, wallet, return item, debit note, audit row), a note inside the window has its IRN
cancelled and drops out of the statement, and bad input or a second reversal is refused.
Run it as `gradle :test --tests ...` - without the colon the filter also reaches
profitmandi-common and fails with "No tests found".