diff --git a/packages/hal/src/validators/apex/denominations.ts b/packages/hal/src/validators/apex/denominations.ts index 9874da4..95410ed 100644 --- a/packages/hal/src/validators/apex/denominations.ts +++ b/packages/hal/src/validators/apex/denominations.ts @@ -1,19 +1,29 @@ /** * Pyramid Apex Denomination Tables * - * The Apex RS-232 reply reports a 1-based CREDIT CHANNEL (1..7), not a value — - * the channel→value mapping is fixed by the bill dataset programmed into the - * acceptor's firmware for its country. The arrays below are ascending value - * lists indexed by (channel - 1); they MUST match the dataset flashed on your - * specific Apex 7600, or a credited note will be booked at the wrong value. - * Verify against the unit's configuration card during bring-up. + * Indexed by (credit channel - 1). The channel is NOT an index into "the notes + * this unit happens to have enabled" — it is a fixed protocol constant. + * Pyramid's RS-232 spec (Rev G, "Data Fields for Messages sent by the Slave", + * BYTE 2 bits 3-5) fixes the USD mapping: * - * Defaults follow Pyramid's standard datasets (US = $1/$5/$10/$20/$50/$100; - * $2 channel omitted as it's rarely enabled). + * 001 = $1 010 = $2 011 = $5 100 = $10 + * 101 = $20 110 = $50 111 = $100 + * + * $2 occupies channel 2 whether or not the unit accepts $2 notes. An earlier + * version of this table omitted it as "rarely enabled", which shifted every + * larger note down one slot: a $5 credited as $10, a $20 as $50, a $50 as + * $100, and a $100 as nothing at all. Never drop an unused channel from these + * arrays — pad it instead. + * + * For non-USD the spec says only "Foreign currencies are in sequential order + * as note 1-7", so channel N is the Nth note type of whatever dataset is + * flashed on the unit. The orderings below are the conventional ascending sets + * and are UNVERIFIED against a real configuration card. Check the card before + * a machine takes money in any of them. */ export const denominations: Record = { - USD: [1, 5, 10, 20, 50, 100], + USD: [1, 2, 5, 10, 20, 50, 100], EUR: [5, 10, 20, 50, 100, 200, 500], GBP: [5, 10, 20, 50], CAD: [5, 10, 20, 50, 100],