yavsc/Yavsc/Helpers/BillingHelpers.cs

12 lines
305 B
C#
Raw Normal View History

2017-05-12 16:29:47 +02:00
using System.Collections.Generic;
using System.Linq;
2017-05-27 16:22:58 +02:00
using Yavsc.Billing;
2017-05-12 16:29:47 +02:00
namespace Yavsc.Helpers
{
public static class BillingHelpers
{
public static decimal Addition(this List<IBillItem> items) => items.Aggregate<IBillItem, decimal>(0m, (t, l) => t + l.Count * l.UnitaryCost);
}
}