How to enter merger and acquisition transactions

Company A was acquired by Company B with 1 share of company A = 0.7935 shares of company B and got cash equivalent for fractional shares.

eg - 26 shares of company A gives 26* 0.7935 = 20.631 Share of company B. Now, I have got 20 shares of company B, cash equivalent ~100$ for 0.631 share and 0 shares of company A.

How to input this kind of transactions?

Similarly to this question, you are doing internal transfers:

  1. Transfer of -26 shares of A
  2. Transfer of 20 shares of B
  3. Transfer of 100 of USD (on the same Account as A & B)

If you want to visually link these transactions, you can set the same tag on all of them, eg. M&A/A acquired by B