There are several options when it comes to deciding where the money should come from. The send statement gives you the following possibilities:
Single source#
The simplest way of sending a monetary value is from a single source. Here, we draw COIN 100 from the world account:
Ordered sources#
Using an ordered source block, you can define several accounts to draw from sequentially until the desired monetary value is reached.
In the example above, if the balance of COIN on the account users:001:wallet is 30, another 70 will be drawn from the payments:001 account.
Ordered sources can also be capped with a monetary value, so that no more than the specified amount is drawn from them:
Portioned sources#
In addition to sequential accounts, source blocks can also use fractions to split the expense across multiple accounts.
In any case, the summed total of fractions in a block needs to be equal to 1 and the remaining keyword can be used to reach that total.
Out of convenience, percentage notation is also available:
Nested sources#
Source blocks can be nested with a combination of recursive ordered / portioned specifications: