Skip to content
Snippets Groups Projects
Commit b140a8a9 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon: Committed by Sebastian Pongratz
Browse files

Sales 1082791 fix offer probability filter

parent 98f7dfcc
No related branches found
No related tags found
No related merge requests found
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet dbms="derby" author="b.ulrich" id="58fad879-afc5-48b3-984f-a9ebba7185cd">
<sql>
ALTER TABLE OFFER ADD COLUMN PROBABILITY_NEW CHAR(10);
UPDATE OFFER SET PROBABILITY_NEW=CAST ( PROBABILITY as CHAR(10));
ALTER TABLE OFFER DROP COLUMN PROBABILITY;
RENAME COLUMN OFFER.PROBABILITY_NEW TO PROBABILITY;
ALTER TABLE OFFER ADD COLUMN PROBABILITY_NEW INTEGER;
UPDATE OFFER SET PROBABILITY_NEW=CAST ( PROBABILITY as INTEGER);
ALTER TABLE OFFER DROP COLUMN PROBABILITY;
RENAME COLUMN OFFER.PROBABILITY_NEW TO PROBABILITY;
</sql>
</changeSet>
<changeSet author="b.ulrich" id="1dc2d055-0f1a-447a-af36-fb0b36bb5558">
<preConditions onFail="CONTINUE">
<not>
<dbms type="derby" />
</not>
</preConditions>
<modifyDataType columnName="PROBABILITY" newDataType="INTEGER" tableName="OFFER"/>
</changeSet>
</databaseChangeLog>
<?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="alter_OfferProbabilityVarcharToInteger.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -5,6 +5,7 @@
<include relativeToChangelogFile="true" file="Duplicate/changelog.xml"/>
<include relativeToChangelogFile="true" file="TopicTree/changelog.xml"/>
<include relativeToChangelogFile="true" file="CampaignStep/changelog.xml"/>
<include relativeToChangelogFile="true" file="Offer/changelog.xml"/>
<include relativeToChangelogFile="true" file="xRM-Service/changelog.xml"/>
<include relativeToChangelogFile="true" file="Mosaico/changelog.xml"/>
</databaseChangeLog>
......@@ -2688,7 +2688,7 @@
<name>VAT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<columnType v="2" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
......@@ -2714,8 +2714,8 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<size v="29" />
<scale v="9" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
......@@ -2766,9 +2766,9 @@
<name>PROBABILITY</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<size v="6" />
<scale v="2" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
......@@ -2848,7 +2848,7 @@
<name>NET</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<columnType v="2" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
......@@ -2873,7 +2873,7 @@
<name>HEADER</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
......@@ -2935,7 +2935,7 @@
<name>ADDRESS</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
......@@ -3008,7 +3008,7 @@
<name>INFO</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
......@@ -3030,8 +3030,8 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<size v="29" />
<scale v="9" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
......@@ -3058,8 +3058,8 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<size v="29" />
<scale v="9" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
......@@ -3113,7 +3113,7 @@
<name>FOOTER</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
......@@ -3155,7 +3155,7 @@
<name>DISCOUNT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<columnType v="2" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
......@@ -3169,7 +3169,7 @@
<name>DISCOUNTED_NET</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<columnType v="2" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
......@@ -3183,7 +3183,7 @@
<name>DISCOUNTED_VAT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<columnType v="2" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
......
......@@ -61,14 +61,14 @@
<entityField>
<name>PROBABILITY</name>
<title>Probability</title>
<consumer>KeywordProbabilityOffer</consumer>
<contentType>NUMBER</contentType>
<maxValue v="100" />
<minValue v="0" />
<outputFormat>0'%'</outputFormat>
<groupable v="true" />
<dropDownProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/dropDownProcess.js</dropDownProcess>
<textInputAllowed v="false" />
<stateProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>STATUS</name>
......
import("system.result");
import("Sql_lib");
//needed because we want to
//1. have a dropdown with the valeus defined at the keyword
//2. be able to have text input to specify other values
//3. while still making it possible to filter using both the dropdown and userinput
//
//It is possible to do the first two ones with a normal keyword consumer without using a dropdown. We do need the dropDown instead of using a normal consumer to also make the third one possible.
var sqlHelper = new SqlMaskingUtils();
var sql = newSelect(["AB_KEYWORD_ENTRY.KEYID", sqlHelper.concatenate(["AB_KEYWORD_ENTRY.KEYID", "'%'"])])
.from("AB_KEYWORD_ENTRY")
.where("AB_KEYWORD_ENTRY.CONTAINER", "ProbabilityOffer")
.and("AB_KEYWORD_ENTRY.ISACTIVE", "1")
.orderBy("SORTING").table()
result.object(sql);
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
{
result.string("0");
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment