Comparative study of electronic structure and microscopic model of SrMn3P4O14 and Sr3Cu3(PO4)4