I’m having trouble with an accounting concept. Lets say Portland Company sold equipment with a book value of $600 for $850 cash.

I’m having trouble with an accounting concept. Lets say Portland Company sold equipment with a book value of $600 for $850 cash. Total depreciation expense for the entire company for the year was $500. The beginning and ending balances in the Accumulated Depreciation account are $1,000 and $700, respectively. The beginning and ending balances in the Equipment account are $3,500 and $3,700 respectively. In the journal entry to record the sale of the equipment for $850 cash. No other equipment was sold during the year.

Would my closing entry be a debit to accumulated depreciation of $500 or $300, or perhaps neither, maybe a debit on loss of sale of equipment? Could use some help. Thanks!