Fix last date when creating a ranklineitem