V6Finish.cs 817 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using InABox.Integration.V6;
  4. namespace PRSDesktop.Integrations.V6;
  5. public class V6Finish : V6Object, IV6Finish
  6. {
  7. public String Code { get; set; }
  8. public String Description { get; set; }
  9. public override void ValidateQuery(string sql, List<string> errors)
  10. {
  11. ValidateField(sql, nameof(Code), errors);
  12. ValidateField(sql, nameof(Description), errors);
  13. }
  14. public static String SQL = $@"select distinct
  15. fc.FINCOL_CODE as {nameof(Code)},
  16. fc.DESCR as {nameof(Description)}
  17. from
  18. bom_piece bp
  19. join
  20. fincol fc on bp.FINCOL_LIB_ID = fc.FINCOL_LIB_ID and bp.FINCOL_ID = fc.FINCOL_ID
  21. join
  22. quote_item qi on bp.QUOTE_ITEM_ID = qi.QUOTE_ITEM_ID
  23. where
  24. 1=1
  25. and
  26. bp.QUOTE_ITEM_ID is not null";
  27. }