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