fixed delete order function and getcompleteorders function