package gw.financials uses gw.pl.currency.MonetaryAmount uses java.lang.Iterable /** * Additional aggregation utility methods for collections of costs. */ enhancement CostIterableEnhancement : Iterable { function AmountSum(currency : Currency) : MonetaryAmount { return this.sum(currency, \ c -> c.ActualAmountBilling) } property get AnyProrated() : boolean { return this.hasMatch(\ c -> c.Prorated) } property get ActualAmountSum() : MonetaryAmount { return this.sum(\cost -> cost.ActualAmount) } }