diff --git a/BookAStar/BookAStar/Model/Workflow/Estimate.cs b/BookAStar/BookAStar/Model/Workflow/Estimate.cs index a9dd6f41..3b1e4174 100644 --- a/BookAStar/BookAStar/Model/Workflow/Estimate.cs +++ b/BookAStar/BookAStar/Model/Workflow/Estimate.cs @@ -1,10 +1,7 @@ using BookAStar.Helpers; using BookAStar.Model.Interfaces; -using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; -using Xamarin.Forms; namespace BookAStar.Model.Workflow { @@ -70,27 +67,7 @@ namespace BookAStar.Model.Workflow } } - public FormattedString FormattedTotal - { - get - { - OnPlatform lfs = (OnPlatform < Font >) App.Current.Resources["LargeFontSize"]; - OnPlatform etc = (OnPlatform)App.Current.Resources["EmphasisTextColor"]; - - return new FormattedString - { - - Spans = { - new Span { Text = "Total TTC: " }, - new Span { Text = Total.ToString(), - ForegroundColor = etc.Android , - FontSize = (double) lfs.Android.FontSize }, - new Span { Text = "€", FontSize = (double) lfs.Android.FontSize } - } - }; - } - set { } - } + public decimal Total { get { return Bill?.Aggregate((decimal)0, (t, l) => t + l.Count * l.UnitaryCost) ?? (decimal)0;