net.corda.contracts.asset / sumAmountsDue

# sumAmountsDue

`fun <P> sumAmountsDue(balances: Map<<ERROR CLASS><PublicKeyTree, PublicKeyTree>, Amount<P>>): Map<PublicKeyTree, Long>`

Calculate the total balance movement for each party in the transaction, based off a summary of balances between each obligor and beneficiary.

### Parameters

`balances` - payments due, indexed by obligor and beneficiary. Zero balances are stripped from the map before being returned.