This commit is contained in:
Loretta 2025-04-07 17:27:47 +02:00
parent 1a2dc36df3
commit 5ffd135813
3 changed files with 6 additions and 6 deletions

View File

@ -3,6 +3,6 @@
public enum SeatNumberPriceType : byte public enum SeatNumberPriceType : byte
{ {
Price1SeatNum = 0, Price1SeatNum = 0,
Price2SeatNum = 4, Price2SeatNum = 5,
Price3SeatNum = 8, Price3SeatNum = 7,
} }

View File

@ -62,7 +62,7 @@ namespace TIAM.Services.Server
}; };
} }
public double GetCommission(Guid productId, double Price, TransferDestination to) public double GetCommission(Guid productId, double price, TransferDestination to)
{ {
//check if Destination has a custom commissionRate by productId //check if Destination has a custom commissionRate by productId
double commissionRate = 0; double commissionRate = 0;
@ -92,7 +92,7 @@ namespace TIAM.Services.Server
} }
} }
commission = GetCommission(Price, commissionRate); commission = GetCommission(price, commissionRate);
return commission; return commission;
} }

View File

@ -494,10 +494,10 @@ namespace TIAMWebApp.Server.Controllers
{ {
if (!transfer.ProductId.IsNullOrEmpty()) if (!transfer.ProductId.IsNullOrEmpty())
{ {
var product = await _adminDal.GetProductByIdAsync((Guid)transfer.ProductId); //var product = await _adminDal.GetProductByIdAsync((Guid)transfer.ProductId);
transfer.Price = _transferBackendService.GetTransferPrice(transfer.ProductId.Value, from, to, transfer.PassengerCount); transfer.Price = _transferBackendService.GetTransferPrice(transfer.ProductId.Value, from, to, transfer.PassengerCount);
if (transfer.Price.HasValue && transfer.Price > 0) if (transfer.Price is > 0)
{ {
transfer.Revenue = _transferBackendService.GetCommission((Guid)transfer.ProductId, (double)transfer.Price, to); transfer.Revenue = _transferBackendService.GetCommission((Guid)transfer.ProductId, (double)transfer.Price, to);
} }