---
title: Bill contract flags
summary: Computes the discardable, complete, and updateable UI flags on the Bill contract from its status and entry source.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.SAIFCode.Core
reference_type: package
operation_id: OP-CORE-06
trigger: Bill UI rendering
---

# Bill contract flags

`Bill.IsBillDiscardable`, `Bill.IsBillComplete`, and `Bill.IsBillUpdateable` compute UI-facing boolean state directly from `BillEntrySourceCode` and `BillStatusCode`, so bill screens can enable or disable actions without re-implementing the status logic.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CORE-06 |
| **Trigger** | Bill UI rendering |
| **Inputs** | `BillEntrySourceCode`, `BillStatusCode` |
| **Outputs** | `IsBillDiscardable`, `IsBillComplete`, `IsBillUpdateable` boolean flags |
| **Primary components** | `Bill.IsBillDiscardable`, `Bill.IsBillComplete`, `Bill.IsBillUpdateable` |
| **Entry point** | `Core/SAIF.Core/Contracts/Claims/Bills/Bill.cs` |

## Steps

1. `IsBillDiscardable` evaluates to true when `BillEntrySourceCode` is not `"E"` (not an e-bill) or `BillStatusCode` is `PEN` ([CORE-BR-050](../business-rules.md#core-br-050-a-bill-is-discardable-when-it-is-not-an-e-bill-entry-source-e-or-its-status-is-pen)).
2. `IsBillComplete` evaluates to true when `BillStatusCode` is `COM` ([CORE-BR-051](../business-rules.md#core-br-051-a-bill-is-complete-when-its-status-is-com)).
3. `IsBillUpdateable` evaluates to true when `BillStatusCode` is one of `PEN`, `ENT`, `AUD`, or `SUS` ([CORE-BR-052](../business-rules.md#core-br-052-a-bill-is-updateable-when-its-status-is-pen-ent-aud-or-sus)).
4. All three flags are computed independently from the same two source fields and are read by bill screens to decide which actions to show.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Bill entry source and status read]) --> D1[Compute IsBillDiscardable]
	Start --> D2[Compute IsBillComplete]
	Start --> D3[Compute IsBillUpdateable]
	D1 --> EndOk([Flags returned to bill screen])
	D2 --> EndOk
	D3 --> EndOk
```

## Failure and edge-case behavior
- An unrecognized `BillStatusCode` value causes all three flags to evaluate to false rather than raising an error*.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- Core/SAIF.Core/Contracts/Claims/Bills/Bill.cs
