using InABox.Integration.Logikal; using System; using System.Collections.Generic; namespace PRSDesktop.Integrations.Logikal { public class LogikalLabour : LogikalBOMItem, ILogikalLabour { public TimeSpan Duration { get; set; } public override void ValidateQuery(string sql, List errors) { base.ValidateQuery(sql, errors); } public static String BillOfMaterialsSQL = "select \n" + $" cast(t.[timetype] as text) as {nameof(Code)}, \n" + $" t.[name] as {nameof(Description)}, \n" + $" sum(t.[totalminutes]/60.0) as {nameof(Quantity)}, \n" + $" c.[price] as {nameof(Cost)} \n" + "from \n" + " labourtimes t \n" + "join \n" + " labourcosts c on t.[timetype] = c.[type] \n" + "left outer join \n" + " elevations e on t.[elevationid] = e.[elevationid] \n" + "where \n" + " t.[totalminutes] > 0.0 \n" + "and \n" + " t.[ismain] = 1 \n" + "group by \n" + " t.[timetype], \n" + " t.[name], \n" + " c.[price]"; public static String DesignSQL = "select \n" + $" cast(t.[timetype] as text) as {nameof(Code)}, \n" + $" t.[name] as {nameof(Description)}, \n" + $" sum(t.[totalminutes]/60.0) as {nameof(Quantity)}, \n" + $" c.[price] as {nameof(Cost)} \n" + "from \n" + " labourtimes t \n" + "join \n" + " labourcosts c on t.[timetype] = c.[type] \n" + "left outer join \n" + " elevations e on t.[elevationid] = e.[elevationid] \n" + "where \n" + " t.[totalminutes] > 0.0 \n" + "and \n" + " t.[ismain] = 1 \n" + "group by \n" + " t.[timetype], \n" + " t.[name], \n" + " c.[price]"; } }