Invertible ideals and Gaussian semirings