| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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]";
-
- }
- }
|