diff --git a/.liquibase/Data_alias/basic/2021.1.1/changelog.xml b/.liquibase/Data_alias/basic/2021.1.1/changelog.xml index 565ef22d4fe510d6a11ce997a356df046545605e..1a0a00ce6e6be94b96a70017aee29c18bfd187c8 100644 --- a/.liquibase/Data_alias/basic/2021.1.1/changelog.xml +++ b/.liquibase/Data_alias/basic/2021.1.1/changelog.xml @@ -1,7 +1,6 @@ <?xml version="1.1" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> - <include relativeToChangelogFile="true" file="CurrencyRate/changelog.xml"/> <include relativeToChangelogFile="true" file="alter_Mst_Team.xml"/> <include relativeToChangelogFile="true" file="EmailFilter/alter_emailFilterHandling.xml"/> <include relativeToChangelogFile="true" file="EmailFilter/insert_recipientStatusBounced.xml"/> diff --git a/entity/Offer_entity/entityfields/currency/stateProcess.js b/entity/Offer_entity/entityfields/currency/stateProcess.js index b6e87e7004a152baaecbc7d1c4fb3b44affc09ad..c3923b8d39fd5caf059f719a70da340db2e40339 100644 --- a/entity/Offer_entity/entityfields/currency/stateProcess.js +++ b/entity/Offer_entity/entityfields/currency/stateProcess.js @@ -4,16 +4,19 @@ import("system.neon"); import("Offer_lib"); import("system.entities"); -var loadConfig = entities.createConfigForLoadingRows() - .entity("Offeritem_entity") - .addParameter("OfferId_param", vars.get("$field.OFFERID")); -var offerItemCount = entities.getRowCount(loadConfig); - -if(offerItemCount > 0) -{ - result.string(neon.COMPONENTSTATE_DISABLED); -} -else +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) { - result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); + var loadConfig = entities.createConfigForLoadingRows() + .entity("Offeritem_entity") + .addParameter("OfferId_param", vars.get("$field.OFFERID")); + var offerItemCount = entities.getRowCount(loadConfig); + + if(offerItemCount > 0) + { + result.string(neon.COMPONENTSTATE_DISABLED); + } + else + { + result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); + } }