# pos-receipt-customer-points Specification

## Purpose

Showing the customer's current reward-point balance on the printed POS receipt, so they can see what they have accumulated at the moment of purchase.

## Requirements

### Requirement: Printed receipt shows the customer's current reward-point balance
When a printed POS receipt is for an order that has a customer attached, the receipt header SHALL show a "Điểm thưởng hiện tại" line, directly below the phone-number line, displaying that customer's current `points` balance at the time the receipt is rendered — not a value snapshotted from when the order was created.

#### Scenario: Receipt for an order with a customer shows the current balance
- **WHEN** a POS receipt is printed for an order that has a customer attached
- **THEN** the receipt header shows a "Điểm thưởng hiện tại" line with that customer's current `points` value, formatted with `number_format(..., 1)`

#### Scenario: Receipt for an order without a customer omits the line
- **WHEN** a POS receipt is printed for an order with no customer attached
- **THEN** the receipt header shows no "Điểm thưởng hiện tại" line, consistent with the existing Khách/SĐT lines also being absent

#### Scenario: Reprinting an old order shows the balance as of reprint time, not order time
- **WHEN** an order is reprinted after the customer's point balance has changed since the order was created (e.g. from later purchases)
- **THEN** the receipt shows the customer's balance as of the reprint, not the balance at order-creation time
