The Bonanza Produce invoice template captured the bill-to name and street
with [A-Z\s] / [A-Z0-9\s] classes, so any store name or address containing
a lowercase letter or punctuation failed to match and came back nil. On the
McCarran invoice that meant both :customer-identifier and :account-number
were empty, leaving the import with nothing to look a client up by.
Anchor instead on the B/I/L/L letters printed down the left margin at the
start of a line (the ship-to block on the right reuses the same letters
mid-line) and take the whole column up to the next column gap, without
restricting the character set. The leading \d on the account-number capture
is what selects the street L line over the name L line.
Every value the template already extracted is unchanged; only the nils
moved. Adds regression tests for both Reno locations, covering the address
that used to drop out and the sibling one that already worked.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>