Any duty enjoined by this code upon a ministerial officer and any act permitted to be done by him or her may be performed by his or her lawful deputy.