| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using InABox.Integration.Awg;
- using InABox.Integration.V6;
- namespace PRSDesktop.Integrations.V6;
- public class V6Style : V6Object, IV6Style
- {
- public String Code { get; set; }
- public String Description { get; set; }
-
- public double Cost { get; set; }
-
- public AwgStyleType StyleType { get; }
-
- public override void ValidateQuery(string sql, List<string> errors)
- {
- ValidateField(sql, nameof(Code), errors);
- ValidateField(sql, nameof(Description), errors);
- }
-
- public static String SQL = $@"
- select distinct
- fc.FINCOL_CODE as [{nameof(Code)}],
- fc.DESCR as [{nameof(Description)}],
- 0.00 as [{nameof(Cost)}],
- 0 as [{nameof(StyleType)}]
- from
- bom_piece bp
- join
- fincol fc on bp.FINCOL_LIB_ID = fc.FINCOL_LIB_ID and bp.FINCOL_ID = fc.FINCOL_ID
- join
- quote_item qi on bp.QUOTE_ITEM_ID = qi.QUOTE_ITEM_ID
- join
- quote q on qi.QUOTE_ID = q.QUOTE_ID
- where
- 1=1
- and
- qi.quote_vers_start <= q.quote_vers and qi.quote_vers_stop >= q.quote_vers
- and
- bp.QUOTE_ITEM_ID is not null";
- }
|