diff --git a/entity/Offer_entity/recordcontainers/index/query.js b/entity/Offer_entity/recordcontainers/index/query.js index 103cbd340617b001b89b0835df694c7d773af987..608db62da009bb4eb785ecbd14c9f10f8dbb351d 100644 --- a/entity/Offer_entity/recordcontainers/index/query.js +++ b/entity/Offer_entity/recordcontainers/index/query.js @@ -9,18 +9,18 @@ import("Sql_lib"); import("KeywordRegistry_basic"); var sqlHelper = new SqlMaskingUtils(); -var querySelect = newSelect("OFFERID " // as "_uid_", - + ", " + sqlHelper.concat([sqlHelper.cast("OFFERCODE", SQLTYPES.CHAR, 10), KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.offerStatus(), "OFFER.STATUS")], " | ") //as "_title_" +var querySelect = newSelect("OFFER.OFFERID " // as "_uid_", + + ", " + sqlHelper.concat([sqlHelper.cast("OFFER.OFFERCODE", SQLTYPES.CHAR, 10), KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.offerStatus(), "OFFER.STATUS")], " | ") //as "_title_" + ", " + sqlHelper.concat(["ORGANISATION.NAME", "'| " + translate.text("Description") + ":'", sqlHelper.castLob("OFFER.INFO", 250)]) // as "_description_" - + ", OFFERCODE" - + ", CUSTOMERCODE " + + ", OFFER.OFFERCODE" + + ", ORGANISATION.CUSTOMERCODE " + ", OFFER.CONTACT_ID " + ", CONTACT.ORGANISATION_ID " // as CONTACT_ORG_ID + ", ORGANISATION.NAME") // as "CONTACT_ORG_ID.displayValue" .from("OFFER") .join("CONTACT", "OFFER.CONTACT_ID = CONTACTID") .join("ORGANISATION", "ORGANISATIONID = CONTACT.ORGANISATION_ID") - .orderBy("OFFERCODE"); + .orderBy("OFFER.OFFERCODE"); if (vars.exists("$local.idvalue") && vars.get("$local.idvalue") && vars.get("$local.idvalue").length > 0) {