Closing converts floating-pnl into cash. The figure that lands is not the raw pip result: it is that result converted at the prevailing rate, less commission on both sides and less every night of rollover the trade carried.
Partial closes realise proportionally. Closing half of a two-lot position banks half the open result and leaves the rest floating, which is why partial exits show up as several lines on a statement rather than one.
For tax and journalling purposes it is the realised number that matters, and it is worth reconciling against your own pip maths regularly. Persistent gaps usually point to swap, a conversion-fee or a markup you had not counted.
Example: a trade gains 40 pips on 1 standard lot of EUR/USD, $400 gross. Commission was $7 round trip and three nights of negative swap cost $21. Realised P&L is $372.
Related: floating-pnl, balance-vs-equity, rollover, conversion-fee