123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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<string> errors)
- {
- base.ValidateQuery(sql, errors);
- }
-
- public static String SQL = $@"
- select
- cast(t.[timetype] as text) as {nameof(Code)},
- t.[name] as {nameof(Description)},
- sum(t.[totalminutes]/60.0) as {nameof(Quantity)},
- c.[price] as {nameof(Cost)}
- from
- labourtimes t
- join
- labourcosts c on t.[timetype] = c.[type]
- join
- elevations e on t.[elevationid] = e.[elevationid]
- where
- t.[totalminutes] > 0.0
- and
- t.[ismain] = 1
- group by
- t.[timetype],
- t.[Name],
- c.[price]
- ";
-
- }
- }
|