Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37807 9 d 23 h amit /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/service/inventory/ test(returns): B2C settlement after a GSTIN refusal, end to end

ReturnB2cRefundTest (Spring context, local dev DB, invoice NSNOI5746) covers
the r37790 flow: the quote is the value net of GST (33,439 -> 28,338); a
refused approval refunds nothing and records the attempt in its own
transaction; a wrongly typed amount and a missing remark or consent are
refused; settling as B2C refunds net of GST and issues a local credit note.
Seeded data rolls back; the refusal row it must commit is cleaned up by the
test. 5/5 pass.
 
37777 14 d 17 h amit /trunk/profitmandi-fofo/src/ 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".