State tax filing

Will Net York tax the entire income earned, regardless if all of it was earned in NY? My W2 has NY taxing all of earned income and PA only taxing a part of it (earned in PA). 

Because of this, do I say all wages were earned in NY? Then still do a schedule G?