Charge distributions in metallic alloys: A charge excess functional theory approach