using InABox.Integration.Logikal; using System; using System.Collections.Generic; namespace PRSDesktop.Integrations.Logikal { public class LogikalComponent : LogikalBOMItem, ILogikalComponent { public double PackSize { get; set; } public override void ValidateQuery(string sql, List errors) { base.ValidateQuery(sql, errors); ValidateField(sql, nameof(PackSize), errors); } public static String SQL = $@" select a.[ArticleCode_BaseNumber] as {nameof(Code)}, a.[description] as {nameof(Description)}, 1.0 as {nameof(PackSize)}, sum(a.[units]) as {nameof(Quantity)}, a.[Price] as {nameof(Cost)} from articles a join insertions i on a.[insertionid] = i.[insertionid] join elevations e on i.[elevationid] = e.[elevationid] where a.[ArticleType] not in (5,7) group by a.[ArticleCode_BaseNumber], a.[description], a.[Price]"; } }