Line number in AX are not always integral number - if you insert a line between lines 1 and 2, its number will be 1.5. Nevertheless line numbers aren’t normally shown to users, exactly because they’re used only to store line order.
But your contract lines doesn’t seem to follow these practices.
If you really want to display the number without decimals, get a developer to change the value of NoOfDecimals property to 0, either on the extended data type or directly on the form control.