| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using InABox.Integration.Logikal;
- using System;
- using System.Collections.Generic;
- namespace PRSDesktop.Integrations.Logikal
- {
- public class LogikalLabour : LogikalBOMItem, ILogikalLabour
- {
- public override void ValidateQuery(string sql, List<string> errors)
- {
- base.ValidateQuery(sql, errors);
- }
- public static String SQL =
- "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]";
- }
- }
|