OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 140 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
110 ilm 1
<?xml version="1.0" encoding="UTF-8" ?>
2
<Schema name="OpenConcerto">
3
 
4
	<Cube name="Ventes">
159 ilm 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
 
110 ilm 48
		<Dimension name="Articles" foreignKey="ID_ARTICLE">
49
			<Hierarchy hasAll="true" allMemberName="Tous les articles" primaryKey="ID">
159 ilm 50
				<View alias="articles">
110 ilm 51
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."ARTICLE" where "ARCHIVE" = '0']]>
52
					</SQL>
53
				</View>
140 ilm 54
				<Level name="Designation" column="NOM" uniqueMembers="true" />
110 ilm 55
				<Level name="Code produit" column="CODE" uniqueMembers="true" />
56
			</Hierarchy>
57
		</Dimension>
58
		<Dimension name="Mode de vente" foreignKey="ID_MODE_VENTE_ARTICLE">
59
			<Hierarchy hasAll="true" allMemberName="Tous les modes de vente" primaryKey="ID">
159 ilm 60
				<View alias="mode">
110 ilm 61
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."MODE_VENTE_ARTICLE" where "ARCHIVE" = '0']]>
62
					</SQL>
63
				</View>
64
				<Level name="Type" column="NOM" uniqueMembers="true" />
65
 
66
			</Hierarchy>
67
		</Dimension>
68
		<Dimension name="Date de facturation" foreignKey="ID_SAISIE_VENTE_FACTURE" type="TimeDimension">
69
			<Hierarchy hasAll="true" allMemberName="Toutes les dates" primaryKey="ID">
70
 
159 ilm 71
				<View alias="factures">
110 ilm 72
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."SAISIE_VENTE_FACTURE" where "ARCHIVE" = '0']]>
73
					</SQL>
74
				</View>
140 ilm 75
				<Level name="Annee" column="DATE" uniqueMembers="true" levelType="TimeYears" type="Numeric">
110 ilm 76
					<KeyExpression>
77
						<SQL dialect="generic">
159 ilm 78
							<![CDATA[EXTRACT(YEAR FROM "factures"."DATE")]]>
110 ilm 79
						</SQL>
80
					</KeyExpression>
81
				</Level>
82
 
83
				<Level name="Mois" column="DATE" uniqueMembers="false" levelType="TimeMonths" type="Numeric"
84
					formatter="org.openconcerto.modules.reports.olap.formatter.MonthMemberFormatter">
85
					<KeyExpression>
86
						<SQL dialect="generic">
159 ilm 87
							<![CDATA[EXTRACT(MONTH FROM "factures"."DATE")]]>
110 ilm 88
						</SQL>
89
					</KeyExpression>
90
				</Level>
91
			</Hierarchy>
92
		</Dimension>
140 ilm 93
		<Dimension name="Ligne facturees">
159 ilm 94
			<Hierarchy hasAll="true" primaryKey="ID">
95
				<Table name="SAISIE_VENTE_FACTURE_ELEMENT" schema="_SCHEMA_" />
96
				<Level name="Quantite" column="QTE" type="Numeric" uniqueMembers="false" />
97
				<Level name="Code article" column="CODE" type="String" uniqueMembers="false" />
98
				<Level name="Poids" column="POIDS" type="Numeric" uniqueMembers="false" />
99
				<Level name="Designation" column="NOM" type="String" uniqueMembers="false" />
100
			</Hierarchy>
101
		</Dimension>
102
 
103
 
104
		<Measure name="Quantite" column="QTE" aggregator="sum" formatString="Standard" />
110 ilm 105
		<Measure name="Prix de vente HT" column="T_PV_HT" aggregator="sum"
106
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
107
		<Measure name="Prix d'achat HT" column="T_PA_HT" aggregator="sum"
108
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
159 ilm 109
		<Measure name="Nombre de lignes" column="ID_ARTICLE" aggregator="count" formatString="Standard" />
110 ilm 110
		<CalculatedMember name="Marge" dimension="Measures">
111
			<Formula>[Measures].[Prix de vente HT] - [Measures].[Prix d'achat HT]
112
			</Formula>
113
			<CalculatedMemberProperty name="CELL_FORMATTER"
114
				value="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
115
		</CalculatedMember>
116
 
117
	</Cube>
118
 
159 ilm 119
	<Cube name="Clients">
120
		<Table name="CLIENT" schema="_SCHEMA_" />
121
		<Dimension name="Type de client">
122
			<Hierarchy hasAll="true" allMemberName="Toutes formes juridiques">
123
				<Level name="Forme juridique" column="FORME_JURIDIQUE" uniqueMembers="true" />
124
			</Hierarchy>
125
		</Dimension>
126
 
110 ilm 127
		<Dimension name="Langue" foreignKey="ID_LANGUE">
159 ilm 128
			<Hierarchy hasAll="true" allMemberName="Toutes les langues" primaryKey="ID">
129
				<Table name="LANGUE" schema="_SCHEMA_" />
110 ilm 130
				<Level name="Langue" column="NOM" uniqueMembers="true" />
131
			</Hierarchy>
159 ilm 132
 
110 ilm 133
		</Dimension>
134
		<Dimension name="Pays" foreignKey="ID_PAYS">
159 ilm 135
			<Hierarchy hasAll="true" allMemberName="Tous les pays" primaryKey="ID">
136
				<Table name="PAYS" schema="_SCHEMA_" />
110 ilm 137
				<Level name="Pays" column="NOM" uniqueMembers="true" />
138
			</Hierarchy>
139
		</Dimension>
140
		<Measure name="Nombre" column="ID" aggregator="count" formatString="Standard" />
141
 
159 ilm 142
	</Cube>
110 ilm 143
 
144
 
159 ilm 145
 
146
</Schema>