Custom function for Inventory

Custom function for Inventory

Hello, 

Anyone know how i can create a custom function inside Z Inventory in order to delete both the package and shipment (Mark as undelivered) ? 

A lot of the time we get customers ordering and picking up products straight away, before they even leave the premise, the order needs to be changed (swap a product). Its very tiresome to have to remove the shipment, pacakge, edit invoice/sales order etc. 

Thanks