I see you do not list the hitpoints correctly for special units like elephants and chariots. These have their "secondary" hitpoints added in battle too.
(Other units also have secondary hitpoints, but these are only counted for autoresolve. Similarly, autoresolve is different for elephants and chariots, where each rider gets as many hitpoints as the beast including riders in played-out battle).
Bookmarks