namespace MyOffice.Services.Account;
///
/// Rules for counterparty (transfer) motion amounts when balancing between accounts.
///
public static class AccountMotionBalancing
{
///
/// When the primary motion is income (Plus != 0), balancing is expense on the other account.
/// Otherwise balancing is income on the other account.
///
public static (decimal Plus, decimal Minus) ResolveAmounts(decimal primaryPlus, decimal amountBalancing)
{
if (primaryPlus != 0)
{
return (0, amountBalancing);
}
return (amountBalancing, 0);
}
public static string BalancingItemName(string accountName) => $"+{accountName}";
}