Commit de2f0f2b authored by adnansetiawan's avatar adnansetiawan
Browse files

retur total when stop parking

parent c365a685
Pipeline #24470 passed with stages
in 6 minutes and 20 seconds
......@@ -30,7 +30,7 @@ namespace EasyParking.Core
{
if (Slot.Zona.Rate == null)
return 0;
return Slot.Zona.Rate.Price * Duration.Hours;
return (Slot.Zona.Rate.Price * Duration.Hours) + Slot.Zona.Rate.Price;
}
}
public User InputedBy { get; set; }
......
......@@ -90,7 +90,8 @@ namespace EasyParking.Infrastructure.Mapper
InputedBy = parkingTransaction.InputedBy.MapToEntity(),
Slot = parkingTransaction.Slot.MapToEntity(),
StartTime = parkingTransaction.StartTime,
StopTime = parkingTransaction.StopTime
StopTime = parkingTransaction.StopTime,
};
}
......
......@@ -68,9 +68,6 @@ namespace EasyParking.Infrastructure.Repositories
public void SetStopTime(Guid parkingTransactionId)
{
var activeParkingByPlate = _dbContext.ParkingTransactions
.Include(x => x.Slot.Zona).Include(x => x.Slot.Zona.Location)
.Include(x => x.InputedBy)
.Include(x => x.InputedBy.UserRole)
.FirstOrDefault(x => x.Id == parkingTransactionId);
if (activeParkingByPlate != null)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment