¿Cuánto tiempo está obligada una pyme o autónomo a guardar sus facturas?

¿Cuánto tiempo está obligada una pyme o autónomo a guardar sus facturas?