From 5ffd135813bd5d2410b4722027f303807e3921be Mon Sep 17 00:00:00 2001 From: Loretta Date: Mon, 7 Apr 2025 17:27:47 +0200 Subject: [PATCH] fix --- TIAM.Core/Enums/SeatNumberPriceType.cs | 4 ++-- TIAM.Services.Server/TransferBackendService.cs | 4 ++-- TIAMWebApp/Server/Controllers/TransferDataAPIController.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TIAM.Core/Enums/SeatNumberPriceType.cs b/TIAM.Core/Enums/SeatNumberPriceType.cs index bd9673e4..ea26d1d0 100644 --- a/TIAM.Core/Enums/SeatNumberPriceType.cs +++ b/TIAM.Core/Enums/SeatNumberPriceType.cs @@ -3,6 +3,6 @@ public enum SeatNumberPriceType : byte { Price1SeatNum = 0, - Price2SeatNum = 4, - Price3SeatNum = 8, + Price2SeatNum = 5, + Price3SeatNum = 7, } \ No newline at end of file diff --git a/TIAM.Services.Server/TransferBackendService.cs b/TIAM.Services.Server/TransferBackendService.cs index dc5133ce..f9a53bcb 100644 --- a/TIAM.Services.Server/TransferBackendService.cs +++ b/TIAM.Services.Server/TransferBackendService.cs @@ -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 double commissionRate = 0; @@ -92,7 +92,7 @@ namespace TIAM.Services.Server } } - commission = GetCommission(Price, commissionRate); + commission = GetCommission(price, commissionRate); return commission; } diff --git a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs index ea8eb0a9..415f362e 100644 --- a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs +++ b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs @@ -494,10 +494,10 @@ namespace TIAMWebApp.Server.Controllers { 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); - if (transfer.Price.HasValue && transfer.Price > 0) + if (transfer.Price is > 0) { transfer.Revenue = _transferBackendService.GetCommission((Guid)transfer.ProductId, (double)transfer.Price, to); }