This occurs when the Number of decimal places is set as zero in the Unit of Measure (UoM) master. You need to specify Number of decimal places while creating a UoM to ensure that the decimals specified in the invoices are retained.
You can also alter the number of decimal places in the alteration mode of the UoM.