You can only cancel uncompleted purchase orders.
Open the purchase order and select the Cancel Order button.
When you cancel the order, the status of the purchase order will be changed to Completed with Cancellations. Any outstanding goods receipts quantities linked to the order will be set to zero.