I suggest you save your game just before you dock at any port. That it, save it while outside the port. That way, if the tonnage total is not kept or added to, you can reload the save and try another again.
I am responding to the suggestion that you could end the mission rather than refit. I don't know if the totals will be kept - but the save will assure you can do the refit instead.
Also, when exiting your game - you should exit to Menu first and then exit the game. The map marks are saved. Again, I'm assuming that you are using the UI from Darkwraith rather than stock version.
Good patrol! Better than I've ever done.