корректировка расчета стоимости работы в заказе
This commit is contained in:
parent
b439a33cd2
commit
9bf936c717
@ -33,7 +33,7 @@ namespace CarServiceDatabase.Models
|
||||
return new()
|
||||
{
|
||||
Count = model.Count,
|
||||
Cost = model.Cost,
|
||||
Cost = context.Works.First(x => x.Id == model.WorkId).Price * model.Count,
|
||||
RepairRequestId = model.RepairRequestId,
|
||||
Work = context.Works.First(x => x.Id == model.WorkId)
|
||||
};
|
||||
@ -45,7 +45,7 @@ namespace CarServiceDatabase.Models
|
||||
return;
|
||||
}
|
||||
Count = model.Count;
|
||||
Cost = model.Cost;
|
||||
Cost = context.Works.First(x => x.Id == model.WorkId).Price * model.Count;
|
||||
RepairRequestId = model.RepairRequestId;
|
||||
Work = context.Works.First(x => x.Id == model.WorkId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user