Open lizkaraffa opened 8 years ago
For example: Say a store manager is exchanging red Logo shirt for a green Logo shirt. They would want the stock impacted. The message would say something to the nature of
Warning, this change will not edit your current store's stock. Should I make this change? Logo Shirt, Red to +1 stock Logo Shirt, Green to -1 stock [Yes] [No stock impact]
Seems like editing an order could be an issue for traceability and audit purposes.
Instead of editing an order in place, why not "void" the order and copy all of the relevant information to a new order with the changes. The filters that adjust stock within WPEC and any third party inventory plugin should be able to use the purchaselog status change to adjust the inventory, and any other data like customer contact information, cancelling or changing shipping addresses, automatic refunds through gateways, etc.
@JeffPyeBrook Very possibly! In my experience, the vast majority of our users who require a high level of transactional audit trails do so in their bookkeeping, rather than within WordPress. That said, I think if people want to disable the ability to modify orders, we should make it easy to do so via a filter.
WooCommerce provides some good prior art here for doing this well - https://docs.woocommerce.com/document/managing-orders/#order-items
If this is going to happen i'd vote for the inclusion of this too https://github.com/wp-e-commerce/WP-e-Commerce/issues/662
Lots of times a customer during checkout enters the wrong email address and he does not receive the purchase emails/downloads and stuff. and manually changing it requires database access
So now that we've committed #2165, a couple things that we need to shore up:
Currently, once an order is made, there is no ability to change or modify the order. This makes exchanges very difficult and creates some holes in reporting. Additionally, one must manually go in and change the stock. We should allow orders that have not been shipped (or completed) to be modified.
Desired UI: On the orders page, users can edit a completed order. They can take away line items, add line items, and adjust the quantity. When the user tries to save or update the changed order they receive an alert asking them if this is only to affect the order for reporting or to also impact the store quantity as well. Something like -> "Warning, this change will not edit your current store's stock. Should I also change [item name + if( variation name )] to +1 stock and [item name + if( variation name )] to -1 stock?" (Basically a written out version of what the code is actually going to execute and do)
If user does not impact stock (as there are many use cases not to) all that is impacted is the verbiage of the order and what will be written in the reporting CSV. If the user opts to impact stock, that change will happen.
Currently this will only impact reporting and stock. In the future, gateways will likely need to be involved and impacted as well for partial refunds and different scenarios that can arise.