Cash calculation after scaling out

Hi all,

I am unit testing my scaling in/out system and as expected on 19/06/2000 I exited 20% of my open qty (Short trade) 179.76 (=898.814*0.2).

As this trade was made @$98 price, I do not understand how the cash amount on 19/06 is not the traded amount + previous day's cash.

So traded amount (179.76*98 = $17,616.7544) + previous day's cash ($9,035.85) = $26,652.6044. Instead the report says it's $21,270

I would appreciate any help. I could not find explanation of detailed log in the user guide.

Thanks,
Arpad