Okay, resetting the game to here, and assuming swamp is defensible terrain:

Orcs6 will attack Halberdiers5, and Orcs5 will attack Halberdiers4.
Halberdiers5 have right stand partly in swamp, and left stand wholly outside. So 2 stands of Orcs6 can attack normally with 10 attacks at 4+, and 1 stand of Orcs6 can get 4 attacks at 5+
Both stands of Orcs5 are attacking into terrain so they'll get 8 attacks at 5+
Orcs6 attacks, 4+ ones first:
Result of the throw of dice "10d6" :
1 + 2 + 1 + 4 + 1 + 3 + 6 + 5 + 5 + 6 = 34
5 hits saved on 6
Result of the throw of dice "5d6" :
2 + 4 + 4 + 5 + 2 = 17
No saves so 5 wounds so far
Remaining 4 attacks at 5+
Result of the throw of dice "4d6" :
5 + 5 + 1 + 6 = 17
Lucky - 3 hits
save on 6
Result of the throw of dice "3d6" :
3 + 1 + 3 = 7
No saves, so a total of 8 wounds, wiping the unit out.
Assuming Halberdiers5 split their return attacks as before with 1 stand against each Orc unit:
3 attacks vs Orcs6
Result of the throw of dice "3d6" :
6 + 2 + 4 = 12
2 hits saved on 6
Result of the throw of dice "2d6" :
5 + 1 = 6
2 wounds
And 2 attacks on Orcs5 (attacks reduced by 1 because of flanking)
Result of the throw of dice "2d6" :
1 + 5 = 6
1 hit save on 6
Result of the throw of dice "1d6" :
6
Saved
So far we have Halberdiers5 wiped out by 8 unsaved hits, 2 hits on Orcs6, and none on Orcs5
On to Orcs5 and Halberdiers4
Orcs5 get 1 stand with 4 attacks as they have no charge bonus, and hit on 5+
Result of the throw of dice "4d6" :
5 + 5 + 1 + 6 = 17
Lucky dice rolling again by the Orcs - 3 hits saved on 6
Result of the throw of dice "3d6" :
4 + 3 + 2 = 9
3 wounds
2 attacks back due to flanking
Result of the throw of dice "2d6" :
3 + 4 = 7
1 hit save on 6
Result of the throw of dice "1d6" :
1
1 wound.
So:
Halberdiers5 wiped out by 8 hits
Orcs6 have 2 hits
Orcs5 have 1 hit
Halberdiers4 lose a stand due to 3 hits
No supporting stands, so Orcs win combat by 8 and Halberdiers4 have to retreat sideways 4cm

So taking Lex's advice, Orcs6 are free to advance, and should do so before pursuits. Their target has to be the Halberdiers4, and they just advance straight forward.

Orcs5 can now pursue. Only their right stand can move straight forward into contact, so that happens first. Then the other stand moves around into contact at the rear of the Halberdiers.

I hope I've got it right. In the next round of combat, everyone will count as being in the open.
Orcs6 get 5 attacks per stand (4 +1 for advance), so 15 attacks at 4+
Result of the throw of dice "15d6" :
4 + 5 + 5 + 1 + 5 + 1 + 2 + 4 + 5 + 3 + 2 + 3 + 1 + 1 + 6 = 48
7 hits saved on 6
Result of the throw of dice "7d6" :
6 + 2 + 2 + 5 + 2 + 5 + 4 = 26
1 save, so the unit will be wiped out, and no need to roll for Orcs5 attacks.
As Orcs6 cannot advance again, but Orcs5 could still advance into the forthcoming combat, let's say the Halberdiers direct all 4 of their return attacks against Orcs5
Result of the throw of dice "4d6" :
1 + 2 + 1 + 5 = 9
1 hit saved on 6
Result of the throw of dice "1d6" :
2
1 wound, but not quite enough to remove a stand.
Orcs6 can fall back
Result of the throw of dice "3d6" :
6 + 4 + 1 = 11
and get of the way
Orcs5 can advance up to 10cm, and their nearest target is Halberds6. Only 1 stand can move far enough to make contact, and the other forms up behind it.

Orcs8 attack crossbows. Only the end-most crossbow stand is in swamp, so no attack penalties for Orcs - 17 attacks inc Hero
Result of the throw of dice "17d6" :
2 + 2 + 2 + 5 + 4 + 6 + 6 + 6 + 5 + 1 + 2 + 2 + 1 + 4 + 4 + 1 + 2 = 55
8 hits - no saves
Orcs5 choose to attack crossbows too. Crossbows ccount as defended so 4 attacks at 5+ to hit
Result of the throw of dice "4d6" :
6 + 2 + 1 + 3 = 12
1 hit - no save, so the crossbows are wiped out
At this point I'm not sure, should the Crossbows split their attacks or concentrate on the unit in front of them?
And have i done it right so far?