Topic: Trouble Deleting a Dimension

Hello,

When I was initially setting up my system, I created a dimension I no longer wish to use. The delete command does not seem to work though, regardless of if the dimension if open or closed.

Here is a picture of the error and page.
https://imgur.com/fVNGxdz

Any help would be awesome to clean up this system.

Thanks!

Post's attachments

Dimension_Deletion.png 14.8 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Trouble Deleting a Dimension

Have you made transactions using this dimension?

Re: Trouble Deleting a Dimension

None currently appear with a GL search. I may have created and then voided some transactions when initially coming up with my dimension structure. Could some old voided transactions still be preventing deletion?

4 (edited by poncho1234 01/11/2018 06:37:24 pm)

Re: Trouble Deleting a Dimension

From the code:-

File: dimensions\dimension_entry.php
172: if (isset($_POST['delete'])) 
173: {
174: 
175:     $cancel_delete = false;
176: 
177:     // can't delete it there are productions or issues
178:     if (dimension_has_payments($selected_id) || dimension_has_deposits($selected_id))
179:     {
180:         display_error(_("This dimension cannot be deleted because it has already been processed."));
181:         set_focus('ref');
182:         $cancel_delete = true;
183:     }
184: 
185:     if ($cancel_delete == false) 
186:     { //ie not cancelled the delete as a result of above tests
187: 
188:         // delete
189:         delete_dimension($selected_id);
190:         delete_tag_associations(TAG_DIMENSION,$selected_id, true);
191:         meta_forward($_SERVER['PHP_SELF'], "DeletedID=$selected_id");
192:     }
193: }
194: 

So it looks like no you can't...
@apmuthu can you please confirm

Re: Trouble Deleting a Dimension

If there are payments or deposits whether voided or not - pertaining to any value of the dimension to be deleted, you will not be able to delete the dimension.