Skip to content

Discard a bill

A user discards the current bill, which sets its status to discarded and then either returns to the Inbox or, with Auto feed checked, loads the next queue bill.

Trigger and screens

Item Detail
Trigger User selects Discard on the Bill entry screen
Screens Bill entry
Tables Not traced**

Steps

  1. When the screen loads, Entry.Index checks CBEDiscardBill and hides the Discard button when it is missing (BR-SCR-006).
  2. The user selects Discard and confirms.
  3. The screen posts to Entry.DiscardBill.
  4. The action maps the posted worker to a Bill with AutoMapper.
  5. The action calls IBillEntryService.UpdateBillStatus with the bill id, the mail id SYSTEM and the status DIS. It does not check CBEDiscardBill (BR-SCR-006).
  6. The action reads the remaining queue count with IBillEntryService.GetClaimBillQueueRemainingCount and returns the bill view model as JSON.

Origin: Steps 3.2–3.3 are the controller-side calls to IBillEntryService in SAIF.SAIFCode.Core†. Per the Legends CLI RAG service, SAIF.SAIFCode.Core is a contracts-only library and this interface's implementation lives outside it (most likely SAIF.Services), which this run did not trace*. 4. On success the client checks the Auto feed checkbox (ClaimBillEntry/js/ClaimBillEntry.entry.js:255-263). 1. When Auto feed is checked, the screen loads the next queue bill through getNextQueueBill and stays on Bill entry. 2. When Auto feed is not checked, the browser navigates to the Inbox screen.

Process flow

The diagram shows the main path and its decision points.

flowchart TD
    A["Bill entry loads"] --> B{"CBEDiscardBill held?"}
    B -->|"No"| X["Discard button hidden"]
    B -->|"Yes"| C["User selects Discard"]
    C --> D["DiscardBill sets status DIS"]
    D --> G{"Auto feed checked?"}
    G -->|"Yes"| H["Load next queue bill<br>(stay on Bill entry)"]
    G -->|"No"| E["Navigate to Inbox"]

Failure and edge-case behavior

  • Because the server does not check the permission, any user in the CBPEnterBill role who calls the endpoint directly can discard a bill (BR-SCR-006; see Tech debt).

Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. Statements marked with * were inferred from code structure or contextual evidence. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • ClaimBillEntry/Controllers/EntryController.cs
  • ClaimBillEntry/js/ClaimBillEntry.entry.js