{"issue":{"title":"Shipment adjustments not removed when shipment is destroyed","user":{"login":"r3ap3r2004","id":103284,"url":"https://api.github.com/users/r3ap3r2004","gravatar_id":"fef467f333897867222cb14314496c1a","avatar_url":"https://secure.gravatar.com/avatar/fef467f333897867222cb14314496c1a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-27T01:35:25Z","milestone":null,"labels":[],"state":"closed","updated_at":"2011-12-27T11:12:51Z","id":2660782,"closed_at":"2011-12-27T11:12:50Z","html_url":"https://github.com/spree/spree/issues/911","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Version 0.70.x and latest Edge as of 2011-12-27 11:10:00 JST  commit: 8ddc6c7183217d26496a8de6ccb627ae5d1b7609\r\nSteps to reproduce.\r\n1) Place an order\r\n2) Go to the admin section and view the order\r\n3) Go to the payment section and capture the payment for the order\r\n4) Go to the shipping section and 'Ship' the order.\r\n5) View the order shipments.\r\n6) Delete the aforementioned Shipment.\r\n7) Go to the adjustment section, note that the shipment adjustment is still there.\r\n\r\nThe real problem is that the adjustment is still in the database, but now points to a non-existant shipment.\r\n\r\nIf I create multiple shipments, and then decide to delete one of them (even before actually firing the 'ship' event for that shipment) then the adjustments show multiple shipping costs with no indication of which shipment is actually still in the database.  When I go to delete one of the adjustments (as to not charge the customer for a shipment that isn't being made) then in all likelihood I would actually delete the wrong one.  Now I have 2 inconsistencies in the database data.\r\n\r\nIf there is a logical reason to keep the adjustment in the database then there needs to be a way to identify which of the adjustments is tied to the now deleted shipment so that the store owner can delete the appropriate entry.\r\n\r\nIf there isn't a logical reason to keep the adjustment (which is my belief) then the adjustment needs to be deleted and the order updated to reflect the fact that an adjustment was removed.","number":911,"url":"https://api.github.com/repos/spree/spree/issues/911","comments":1,"assignee":null},"action":"closed"}