If you discover errors in a purchase order after it has already been posted, the only way to correct them is to create a Negative Purchase order, which is a new purchase order with the same items as the original, except with negative quantities.
First, create a purchase order as normal, using the same vendor as the order you posted in error. (Creating Purchase Orders)
Then, go to the Order & Receive tab, and check the Negative / PO Return box.
Now add in the same items you had in your original order (Adding Items to a Purchase Order), with the exact same quantities, and notice how those quantities will be automatically added as negative numbers.
Receive and post the negative order with the same shipping and charges as the original (Receiving and Posting Purchase Orders). Now you have essentially undone the original purchase order and are free to create the proper purchase order.