Thermodynamics of phase transitions in the system ice VI-ice VII-water