With a layout as in the workbook, IMHO the only way is to manually arrange output.
If it is possible to rearrange data, I would use:
column
example/remarks
CustID
C004200
Name
Cusomer #4
SettlementID
#1, #2, ...
Type
Settlement, collection
Amount
use negative in one of types (for...