A turn ends – and the Turn marker is advanced one space forward
along the Time Track – at the end of any order in which there are
exactly zero cubes remaining on the Order Matrix.
So I think it's the person who takes the last order cube.
Not that it actually matters who rolls the dice. Random is random, unless one of you is a cheater.