| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.Collections.Generic;
- using InABox.Integration.V6;
- namespace PRSDesktop.Integrations.V6
- {
- public class V6Glass : V6BOMItem, IV6Glass
- {
- public string Group { get; set; }
- public string Supplier { get; set; }
- public string Treatment { get; set; }
- public double Height { get; set; }
- public double Width { get; set; }
- public string Location { get; set; }
- public override void ValidateQuery(string sql, List<string> errors)
- {
- base.ValidateQuery(sql, errors);
- ValidateField(sql, nameof(Treatment), errors);
- ValidateField(sql, nameof(Height), errors);
- ValidateField(sql, nameof(Width), errors);
- ValidateField(sql, nameof(Location), errors);
- ValidateField(sql, nameof(Group), errors);
- ValidateField(sql, nameof(Supplier), errors);
- }
-
- public static string SQL = $@"
- select
- bf.location as {nameof(Location)},
- f.fill_code as {nameof(Code)},
- f.descr as {nameof(Description)},
- bf.fill_height as {nameof(Height)},
- bf.fill_width as {nameof(Width)},
- bf.treatment as {nameof(Treatment)},
- '' as {nameof(Group)},
- '' as {nameof(Supplier)},
- bf.cost as {nameof(Cost)},
- sum(bf.fill_count) as {nameof(Quantity)}
- from
- bom_fill bf
- left outer join
- fill f on bf.fill_lib_id = f.fill_lib_id and bf.fill_id = f.fill_id
- left outer join
- quote_item qi on qi.quote_item_id = bf.quote_item_id
- left outer join
- quote q on q.quote_id = qi.quote_id
- where
- 1=1
- and
- bf.COST_BY_BOM='T'
- and
- qi.quote_vers_start <= q.quote_vers and qi.quote_vers_stop >= q.quote_vers
- group by
- bf.location, f.fill_code, f.descr, bf.fill_height, bf.fill_width, bf.treatment, bf.cost";
-
- }
- }
|