The 1.6 Gli comes with 4 speed ect transmission. You can replace a similar engine (assembly only) and get it working.
The other options come with CVT transmission not sure if those engine are compatible with the 4 speed ect transmission and ecu issues.
If your friend intends to keep the car, get the same engine assembly and get going with it.