Table:
| (In millions) |  |  |  |
| --- | --- | --- | --- |
| Year Ended June 30, | 2019 | 2018 | 2017 |
| Balance, beginning of period | $   397 | $  361 | $  409 |
| Charged to costs and other | 153 | 134 | 58 |
| Write-offs | (116) | (98) | (106) |
| Balance, end of period | $ 434 | $  397 | $  361 |
Paragraphs:
Contract Balances
Timing of revenue recognition may differ from the timing of invoicing to customers. We record a receivable when revenue is recognized prior to invoicing, or unearned revenue when revenue is recognized subsequent to invoicing. For multi-year agreements, we generally invoice customers annually at the beginning of each annual coverage period. We record a receivable related to revenue recognized for multi-year on-premises licenses as we have an unconditional right to invoice and receive payment in the future related to those licenses.
As of June 30, 2019 and 2018, long-term accounts receivable, net of allowance for doubtful accounts, was $2.2 billion and $1.8 billion, respectively, and is included in other long-term assets in our consolidated balance sheets.
The allowance for doubtful accounts reflects our best estimate of probable losses inherent in the accounts receivable balance. We determine the allowance based on known troubled accounts, historical experience, and other currently available evidence.
Activity in the allowance for doubtful accounts was as follows:
Question:
When are multi-year agreement customers invoiced?