report page
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using Billing.Models;
|
||||
using Billing.Views;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Xamarin.Essentials;
|
||||
using Xamarin.Forms;
|
||||
|
||||
@@ -75,6 +78,18 @@ namespace Billing
|
||||
return color;
|
||||
}
|
||||
|
||||
public static UIBill WrapBill(Bill b)
|
||||
{
|
||||
return new UIBill(b)
|
||||
{
|
||||
Icon = App.Categories.FirstOrDefault(c => c.Id == b.CategoryId)?.Icon ?? BaseModel.ICON_DEFAULT,
|
||||
Name = b.Name,
|
||||
DateCreation = b.CreateTime,
|
||||
Amount = b.Amount,
|
||||
Wallet = App.Accounts.FirstOrDefault(a => a.Id == b.WalletId)?.Name
|
||||
};
|
||||
}
|
||||
|
||||
public static bool IsSameDay(DateTime day1, DateTime day2)
|
||||
{
|
||||
return day1.Year == day2.Year && day1.DayOfYear == day2.DayOfYear;
|
||||
|
||||
Reference in New Issue
Block a user