Skip to content
Snippets Groups Projects
Commit a2217e46 authored by Sophia Leierseder's avatar Sophia Leierseder
Browse files

Salesproject phase chart

parent 0a08c008
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.0">
<name>SalesprojectChart_entity</name>
<title>Salesproject Charts</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/SalesprojectChart_entity/documentation.adoc</documentation>
<iconId>VAADIN:PIE_CHART</iconId>
<recordContainer>jdito</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityField>
<name>UID</name>
</entityField>
<entityField>
<name>PARENT</name>
<title>Parent</title>
</entityField>
<entityField>
<name>X_PHASE</name>
<title>Phase</title>
</entityField>
<entityField>
<name>Y_COUNT</name>
<title>Count</title>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jdito</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/SalesprojectChart_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
<recordFields>
<element>UID.value</element>
<element>X_PHASE.value</element>
<element>Y_COUNT.value</element>
<element>PARENT.value</element>
</recordFields>
</jDitoRecordContainer>
</recordContainers>
</entity>
== Salesproject Chart ==
This entity provides charts to display the Phases / Status / ... of the Salesproject.
\ No newline at end of file
import("system.vars");
import("system.datetime");
import("system.db");
import("system.result");
import("system.translate");
import("Data_lib");
import("Keyword_lib");
import("Money_lib");
import("KeywordRegistry_basic");
// load data
var phases = db.table("select KEYID, AB_KEYWORD_ENTRY.TITLE, count(PHASE), AB_KEYWORD_ENTRY.SORTING \n\
from SALESPROJECT join AB_KEYWORD_ENTRY on KEYID = PHASE and CONTAINER = 'SalesprojectPhase' and SORTING <> 7 \n\
group by KEYID, AB_KEYWORD_ENTRY.TITLE, AB_KEYWORD_ENTRY.SORTING order by SORTING");
for(i = 0; i < phases.length; i++){
if(phases[i][1] == "${SALESPROJECT_OFFER}"){
phases[i][1] = "Offer";
}
}
result.object(phases);
<?xml version="1.0" encoding="UTF-8"?>
<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
<name>SalesprojectChart</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterview>SalesprojectChart_view</filterview>
<entity>SalesprojectChart_entity</entity>
<references>
<neonViewReference>
<name>c50b2e10-86ca-4a5b-83d4-946a78c18786</name>
<view>SalesprojectChart_view</view>
</neonViewReference>
</references>
</neonContext>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.0">
<name>SalesprojectChart_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<groupLayout>
<name>layout</name>
</groupLayout>
</layout>
<children>
<singleDataChartViewTemplate>
<name>PhaseFunnelChart</name>
<chartType>FUNNEL</chartType>
<xAxis>X_PHASE</xAxis>
<yAxis>Y_COUNT</yAxis>
<parentField></parentField>
<entityField>#ENTITY</entityField>
</singleDataChartViewTemplate>
<singleDataChartViewTemplate>
<name>PhaseDonutChart</name>
<chartType>DONUT</chartType>
<xAxis>X_PHASE</xAxis>
<yAxis>Y_COUNT</yAxis>
<parentField></parentField>
<entityField>#ENTITY</entityField>
</singleDataChartViewTemplate>
<singleDataChartViewTemplate>
<name>PhasePyramidChart</name>
<chartType>PYRAMID</chartType>
<xAxis>X_PHASE</xAxis>
<yAxis>Y_COUNT</yAxis>
<entityField>#ENTITY</entityField>
</singleDataChartViewTemplate>
</children>
</neonView>
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