estimate to client
This commit is contained in:
parent
b7c9e93669
commit
3acb5bc922
13 changed files with 127 additions and 40 deletions
16
Yavsc/Helpers/EstimateHelpers.cs
Normal file
16
Yavsc/Helpers/EstimateHelpers.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
public static class EstimateHelpers {
|
||||
public static decimal GetTotal(this Estimate estimate)
|
||||
{
|
||||
decimal result = 0;
|
||||
foreach (var l in estimate.Bill)
|
||||
result += l.Count*l.UnitaryCost;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.Extensions.Localization;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.Messaging;
|
||||
|
||||
|
|
@ -12,11 +11,15 @@ namespace Yavsc.Helpers
|
|||
{
|
||||
var yaev = new BookQueryEvent
|
||||
{
|
||||
Client = new ClientProviderInfo { UserName = query.Client.UserName , UserId = query.ClientId } ,
|
||||
Client = new ClientProviderInfo {
|
||||
UserName = query.Client.UserName ,
|
||||
UserId = query.ClientId,
|
||||
Avatar = query.Client.Avatar } ,
|
||||
Previsional = query.Previsional,
|
||||
EventDate = query.EventDate,
|
||||
Location = query.Location,
|
||||
Id = query.Id
|
||||
Id = query.Id,
|
||||
Reason = query.Reason
|
||||
};
|
||||
return yaev;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue