Zero Block
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
Tilda Publishing
create your own block from scratch
Zero Block
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
Tilda Publishing
create your own block from scratch
Фатальна помилка SyrvePos: Sequence contains more than one element
Фронт-система закривається з помилкою в error.log
В лозі помилка виглядає ось так:
[2023-09-22 23:57:37,479] FATAL [LoadingScreenController] [MainController:CurrentDomain_UnhandledException:301] - Unhandled exception
System.InvalidOperationException: Sequence contains more than one element

[2023-08-17 17:09:49,770] ERROR [ 1] [OrderModel:Update] - OrderModel.Update failed for order with id 8b938fb8-15f9-487f-a3c7-37245cbeb1f1
System.InvalidOperationException: Sequence contains more than one element
  at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
  at Resto.CashServer.Services.Extensions.BaseOrderItemExtensions.<>c__DisplayClass3_2.<ExecuteActionsForOrderedVisibleModifiers>b__12() in G:\BuildAgent\work\master-installer\dev\iikoFront.Net\Resto.CashServer.Services\Extensions\BaseOrderItemExtensions.cs:line 79
Одна з можливих причин - задубльовані модифікатори до певних страв в замовленні.
Вирішення:
1) Зробити копію всього CashServer.
2) Отримати страви з дублями модифікаторів виконати скрипт БД SyrvePos :

select [id],[NameValue], [Num], [Type]  from [Products]
where [id] in (SELECT [ProductId]
FROM [GroupModifiers]
group by [ProductId],[ProductGroupId]
having count(*) >1)
У відповідь отримаємо ось такий перелік
Id;NameValue;Num;Type;
42965593-3349-4270-b967-06e89acaf56a;Салат з квасолею та свининою;00310;DISH
42d9091f-66fa-42c4-8c57-0ab971f5a51a;Мандибурка смажена по-домашньому;00322;DISH
3) Виправити дублі у групових модифікаторах через ui SyrveOffice за ID з результату попереднього кроку.
4) Після виправлення дублів видалити замовлення з дублем з БД SyrvePos скриптом
Delete from frontentities
where xml like '%e5988cc1-baf2-4834-a7d1-e00c44a368e8%'
5. Завантажити фронт-систему та перевірити наявність помилки.