CommissionPercent set to double; Company.OwnerId fixes;

This commit is contained in:
jozsef.b@aycode.com 2024-05-28 19:18:59 +02:00
parent ceb46f215b
commit 6f2b3b915f
3 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ public class Company : AcCompany<User, UserToCompany, Profile>, ICompany<User, U
{
}
public Company(Guid id, string name, Guid ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
public Company(Guid id, string name, Guid? ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
{
}
}

View File

@ -46,10 +46,10 @@ namespace TIAMWebApp.Server.Controllers
var id = Guid.NewGuid();
var name = serviceProvider.Name;
var commissionRate = serviceProvider.CommissionPercent;
Guid ownerId;
//no owner set yet
ownerId = serviceProvider.OwnerId == Guid.Empty ? serviceProvider.OwnerId : serviceProvider.OwnerId;
var ownerId = serviceProvider.OwnerId == Guid.Empty ? null : serviceProvider.OwnerId;
if (name is null)
{

View File

@ -10,10 +10,10 @@ namespace TIAMWebApp.Shared.Application.Models
{
public Guid Id { get; set; }
public string? Name { get; set; }
public Guid OwnerId { get; set; }
public Guid? OwnerId { get; set; }
public int CommissionPercent { get; set; }
public ServiceProviderModel() { }
public ServiceProviderModel(Guid id, string name, Guid ownerId, int commissionPercent)
public ServiceProviderModel(Guid id, string name, Guid? ownerId, int commissionPercent)
{
Id = id;
Name = name;