Farmacias del Ahorro har nått en överenskommelse om att köpa 96,56 procent av Farmacias Benavides kapital genom ett anknutet bolag.