Best way to achieve calculation

A post was merged into an existing topic: How to allocate to correct ledger