OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 140 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 140 Rev 159
Line 1... Line 1...
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<Schema name="OpenConcerto">
2
<Schema name="OpenConcerto">
3
 
3
 
4
	<Cube name="Ventes">
4
	<Cube name="Ventes">
5
		<Table name="SAISIE_VENTE_FACTURE_ELEMENT" schema="_SCHEMA_"/>	
5
		<Table name="SAISIE_VENTE_FACTURE_ELEMENT" schema="_SCHEMA_" />
-
 
6
		<Dimension name="Commercial" foreignKey="ID_SAISIE_VENTE_FACTURE">
-
 
7
			<Hierarchy hasAll="true" allMemberName="Tous" primaryKey="ID" primaryKeyTable="SAISIE_VENTE_FACTURE">
-
 
8
				<Join leftKey="ID_COMMERCIAL" rightKey="ID_COMMERCIAL">
-
 
9
					<Table name="SAISIE_VENTE_FACTURE" schema="_SCHEMA_" />
-
 
10
					<Table name="COMMERCIAL" schema="_SCHEMA_" />
-
 
11
				</Join>
-
 
12
				<Level name="Nom du commercial" table="COMMERCIAL" column="NOM" schema="_SCHEMA_">
-
 
13
				</Level>
-
 
14
			</Hierarchy>
-
 
15
		</Dimension>
-
 
16
 
-
 
17
		<Dimension name="Localisation du client" foreignKey="ID_SAISIE_VENTE_FACTURE">
-
 
18
			<Hierarchy hasAll="true" allMemberName="Tous" primaryKey="ID" primaryKeyTable="SAISIE_VENTE_FACTURE">
-
 
19
				<Join leftKey="ID_CLIENT" rightKey="ID">
-
 
20
					<Table name="SAISIE_VENTE_FACTURE" schema="_SCHEMA_" />
-
 
21
 
-
 
22
					<Join leftKey="ID_PAYS" rightKey="ID">
-
 
23
						<Table name="CLIENT" schema="_SCHEMA_" />
-
 
24
						<Table name="PAYS" schema="_SCHEMA_" />
-
 
25
					</Join>
-
 
26
				</Join>
-
 
27
				<Level name="Pays" table="PAYS" column="NOM" schema="_SCHEMA_" uniqueMembers="true">
-
 
28
				</Level>
-
 
29
				<Level name="Nom du client" table="CLIENT" column="NOM" schema="_SCHEMA_">
-
 
30
				</Level>
-
 
31
 
-
 
32
			</Hierarchy>
-
 
33
		</Dimension>
-
 
34
 
-
 
35
		<Dimension name="Client" foreignKey="ID_SAISIE_VENTE_FACTURE">
-
 
36
			<Hierarchy hasAll="true" allMemberName="Tous" primaryKey="ID" primaryKeyTable="SAISIE_VENTE_FACTURE">
-
 
37
				<Join leftKey="ID_CLIENT" rightKey="ID">
-
 
38
					<Table name="SAISIE_VENTE_FACTURE" schema="_SCHEMA_" />
-
 
39
					<Table name="CLIENT" schema="_SCHEMA_" />
-
 
40
				</Join>
-
 
41
				<Level name="Nom du client" table="CLIENT" column="NOM" schema="_SCHEMA_">
-
 
42
				</Level>
-
 
43
			</Hierarchy>
-
 
44
		</Dimension>
-
 
45
 
-
 
46
 
-
 
47
 
6
		<Dimension name="Articles" foreignKey="ID_ARTICLE">
48
		<Dimension name="Articles" foreignKey="ID_ARTICLE">
7
			<Hierarchy hasAll="true" allMemberName="Tous les articles" primaryKey="ID">
49
			<Hierarchy hasAll="true" allMemberName="Tous les articles" primaryKey="ID">
8
				<View alias="ARTICLE">
50
				<View alias="articles">
9
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."ARTICLE" where "ARCHIVE" = '0']]>
51
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."ARTICLE" where "ARCHIVE" = '0']]>
10
					</SQL>
52
					</SQL>
11
				</View>
53
				</View>
12
				<Level name="Designation" column="NOM" uniqueMembers="true" />
54
				<Level name="Designation" column="NOM" uniqueMembers="true" />
13
				<Level name="Code produit" column="CODE" uniqueMembers="true" />
55
				<Level name="Code produit" column="CODE" uniqueMembers="true" />
14
			</Hierarchy>
56
			</Hierarchy>
15
		</Dimension>
57
		</Dimension>
16
		<Dimension name="Mode de vente" foreignKey="ID_MODE_VENTE_ARTICLE">
58
		<Dimension name="Mode de vente" foreignKey="ID_MODE_VENTE_ARTICLE">
17
			<Hierarchy hasAll="true" allMemberName="Tous les modes de vente" primaryKey="ID">
59
			<Hierarchy hasAll="true" allMemberName="Tous les modes de vente" primaryKey="ID">
18
				<View alias="MODE_VENTE_ARTICLE">
60
				<View alias="mode">
19
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."MODE_VENTE_ARTICLE" where "ARCHIVE" = '0']]>
61
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."MODE_VENTE_ARTICLE" where "ARCHIVE" = '0']]>
20
					</SQL>
62
					</SQL>
21
				</View>
63
				</View>
22
				<Level name="Type" column="NOM" uniqueMembers="true" />
64
				<Level name="Type" column="NOM" uniqueMembers="true" />
23
 
65
 
24
			</Hierarchy>
66
			</Hierarchy>
25
		</Dimension>
67
		</Dimension>
26
		<Dimension name="Date de facturation" foreignKey="ID_SAISIE_VENTE_FACTURE" type="TimeDimension">
68
		<Dimension name="Date de facturation" foreignKey="ID_SAISIE_VENTE_FACTURE" type="TimeDimension">
27
			<Hierarchy hasAll="true" allMemberName="Toutes les dates" primaryKey="ID">
69
			<Hierarchy hasAll="true" allMemberName="Toutes les dates" primaryKey="ID">
28
 
70
 
29
				<View alias="SAISIE_VENTE_FACTURE">
71
				<View alias="factures">
30
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."SAISIE_VENTE_FACTURE" where "ARCHIVE" = '0']]>
72
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."SAISIE_VENTE_FACTURE" where "ARCHIVE" = '0']]>
31
					</SQL>
73
					</SQL>
32
				</View>
74
				</View>
33
				<Level name="Annee" column="DATE" uniqueMembers="true" levelType="TimeYears" type="Numeric">
75
				<Level name="Annee" column="DATE" uniqueMembers="true" levelType="TimeYears" type="Numeric">
34
					<KeyExpression>
76
					<KeyExpression>
35
						<SQL dialect="generic">
77
						<SQL dialect="generic">
36
							<![CDATA[EXTRACT(YEAR FROM "SAISIE_VENTE_FACTURE"."DATE")]]>
78
							<![CDATA[EXTRACT(YEAR FROM "factures"."DATE")]]>
37
						</SQL>
79
						</SQL>
38
					</KeyExpression>
80
					</KeyExpression>
39
				</Level>
81
				</Level>
40
 
82
 
41
				<Level name="Mois" column="DATE" uniqueMembers="false" levelType="TimeMonths" type="Numeric"
83
				<Level name="Mois" column="DATE" uniqueMembers="false" levelType="TimeMonths" type="Numeric"
42
					formatter="org.openconcerto.modules.reports.olap.formatter.MonthMemberFormatter">
84
					formatter="org.openconcerto.modules.reports.olap.formatter.MonthMemberFormatter">
43
					<KeyExpression>
85
					<KeyExpression>
44
						<SQL dialect="generic">
86
						<SQL dialect="generic">
45
							<![CDATA[EXTRACT(MONTH FROM "SAISIE_VENTE_FACTURE"."DATE")]]>
87
							<![CDATA[EXTRACT(MONTH FROM "factures"."DATE")]]>
46
						</SQL>
88
						</SQL>
47
					</KeyExpression>
89
					</KeyExpression>
48
				</Level>
90
				</Level>
49
			</Hierarchy>
91
			</Hierarchy>
50
		</Dimension>
92
		</Dimension>
Line 56... Line 98...
56
  		    <Level name="Poids" column="POIDS" type="Numeric" uniqueMembers="false"/>
98
				<Level name="Poids" column="POIDS" type="Numeric" uniqueMembers="false" />
57
  		    <Level name="Designation" column="NOM" type="String" uniqueMembers="false"/>
99
				<Level name="Designation" column="NOM" type="String" uniqueMembers="false" />
58
  			  </Hierarchy>
100
			</Hierarchy>
59
 		 </Dimension>
101
		</Dimension>
60
		
102
 
61
		<Measure name="Nombre vendu" column="ID_ARTICLE" aggregator="count" formatString="Standard" />
-
 
-
 
103
 
62
		<Measure name="Quantite" column="QTE" aggregator="count" formatString="Standard" />
104
		<Measure name="Quantite" column="QTE" aggregator="sum" formatString="Standard" />
63
		<Measure name="Prix de vente HT" column="T_PV_HT" aggregator="sum"
105
		<Measure name="Prix de vente HT" column="T_PV_HT" aggregator="sum"
64
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
106
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
65
		<Measure name="Prix d'achat HT" column="T_PA_HT" aggregator="sum"
107
		<Measure name="Prix d'achat HT" column="T_PA_HT" aggregator="sum"
66
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
108
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
-
 
109
		<Measure name="Nombre de lignes" column="ID_ARTICLE" aggregator="count" formatString="Standard" />
67
		<CalculatedMember name="Marge" dimension="Measures">
110
		<CalculatedMember name="Marge" dimension="Measures">
68
			<Formula>[Measures].[Prix de vente HT] - [Measures].[Prix d'achat HT]
111
			<Formula>[Measures].[Prix de vente HT] - [Measures].[Prix d'achat HT]
69
			</Formula>
112
			</Formula>
70
			<CalculatedMemberProperty name="CELL_FORMATTER"
113
			<CalculatedMemberProperty name="CELL_FORMATTER"
71
				value="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
114
				value="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />