# BE/FE Handoff: Deleted Returned Item Hidden After Refresh

Date: 2026-04-27
Endpoint: `POST /api/v1/pos/sales/:sale_id/edit`

## Update behavior (new)

For items that have return history and are deleted in edit payload:

- BE no longer blocks commit for this case.
- BE keeps the underlying DB row for FK safety (`return_sale_items` reference).
- BE sets that row effectively hidden (`qty=0`, amounts `0`).
- Receipt/report item listing now filters `qty > 0`, so deleted item no longer appears after refresh.

Result: user sees item "hilang" from struk/transaksi view, while historical return relation remains safe.

## FE impact

No mandatory FE change for correctness. Recommended:

1. After save, reload from commit response or refetch receipt endpoint.
2. Remove/disable old badge copy implying forced auto-preserve.
3. Keep user message simple: "Perubahan tersimpan."

## Compatibility note

Old attempts before this patch might still show previous behavior. Test with a new save attempt after BE restart.
