As we know wip is a balance sheet item. I got the double entry of the ending balance of WIP posting. The configuration for the credit side is p&l account. If the finished goods is sold, credit stock and debit cogs (changes in stock account).