Compare commits
2 Commits
1b4f9059f4
...
51f6808d8d
Author | SHA1 | Date | |
---|---|---|---|
|
51f6808d8d | ||
|
73bc290b6a |
@ -160,16 +160,31 @@ namespace API.BusinessLogic
|
||||
listItem.Amount = (listItem.Amount / 1000) + listItemDTO.Amount;
|
||||
listItem.Unit = "kg";
|
||||
}
|
||||
else if (listItem.Unit == "kg" && listItemDTO.Unit == "g")
|
||||
{
|
||||
listItem.Amount = (listItemDTO.Amount / 1000) + listItem.Amount;
|
||||
listItem.Unit = "kg";
|
||||
}
|
||||
else if (listItem.Unit == "ml" && listItemDTO.Unit == "l")
|
||||
{
|
||||
listItem.Amount = (listItem.Amount / 1000) + listItemDTO.Amount;
|
||||
listItem.Unit = "l";
|
||||
}
|
||||
else if (listItem.Unit == "l" && listItemDTO.Unit == "ml")
|
||||
{
|
||||
listItem.Amount = (listItemDTO.Amount / 1000) + listItem.Amount;
|
||||
listItem.Unit = "l";
|
||||
}
|
||||
else if (listItem.Unit == "dl" && listItemDTO.Unit == "l")
|
||||
{
|
||||
listItem.Amount = (listItem.Amount / 10) + listItemDTO.Amount;
|
||||
listItem.Unit = "l";
|
||||
}
|
||||
else if (listItem.Unit == "l" && listItemDTO.Unit == "dl")
|
||||
{
|
||||
listItem.Amount = (listItemDTO.Amount / 10) + listItem.Amount;
|
||||
listItem.Unit = "l";
|
||||
}
|
||||
|
||||
listItem.Checked = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user