YTD Totals are for the Tax Year to Date so go from 1st April - 31 Mar. Gross Earnings to date on the Leave tab are from the employees last anniversary, for employee X this is 15 Sep.
When you added this employee around the beginning of April last year you entered his YTD Gross Earnings and Gross Earnings to Date. When the employee passed his anniversary in September, the Gross Earnings to date was reset to zero. His YTD Gross Earnings will continue to accrue until he passes 1st April this year.
YTD totals aren't particularly important. They are only used to provide the employee with a certificate of earnings which isn't a legal requirement these days because they can ask for a earnings certificate from IRD.