When a customer puts an order, a Purchase order is generated, and an invoice is generated once the order is completed. A buy order specifies the terms of the selling contract, whereas an invoice confirms the transaction. Purchase orders are used by buyers to track accounts payable, whereas invoices are used by sellers to manage accounts receivable in their accounting records.