LogikalFinish.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using InABox.Integration.Logikal;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace PRSDesktop.Integrations.Logikal
  5. {
  6. public class LogikalFinish : LogikalItem, ILogikalFinish
  7. {
  8. public String Code { get; set; }
  9. public String Description { get; set; }
  10. public override void ValidateQuery(string sql, List<string> errors)
  11. {
  12. ValidateField(sql, nameof(Code), errors);
  13. ValidateField(sql, nameof(Description), errors);
  14. }
  15. public static String SQL =
  16. "SELECT DISTINCT\n" +
  17. $" f.fincol_code as {nameof(Code)}, \n" +
  18. $" f.descr as {nameof(Description)}, \n" +
  19. "FROM \n" +
  20. " bom_piece bp \n" +
  21. "left outer join \n" +
  22. " quote_item qi on qi.quote_item_id = bp.quote_item_id \n" +
  23. "left outer join \n" +
  24. " quote q on q.quote_id = qi.quote_id \n" +
  25. "left outer join \n" +
  26. " fincol f on f.fincol_lib_id = bp.fincol_lib_id and f.fincol_id = bp.fincol_id \n" +
  27. "where \n" +
  28. " 1 = 1";
  29. }
  30. }