OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 110 | Go to most recent revision | 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">
140 ilm 5
		<Table name="SAISIE_VENTE_FACTURE_ELEMENT" schema="_SCHEMA_"/>
110 ilm 6
		<Dimension name="Articles" foreignKey="ID_ARTICLE">
7
			<Hierarchy hasAll="true" allMemberName="Tous les articles" primaryKey="ID">
8
				<View alias="ARTICLE">
9
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."ARTICLE" where "ARCHIVE" = '0']]>
10
					</SQL>
11
				</View>
140 ilm 12
				<Level name="Designation" column="NOM" uniqueMembers="true" />
110 ilm 13
				<Level name="Code produit" column="CODE" uniqueMembers="true" />
14
			</Hierarchy>
15
		</Dimension>
16
		<Dimension name="Mode de vente" foreignKey="ID_MODE_VENTE_ARTICLE">
17
			<Hierarchy hasAll="true" allMemberName="Tous les modes de vente" primaryKey="ID">
18
				<View alias="MODE_VENTE_ARTICLE">
19
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."MODE_VENTE_ARTICLE" where "ARCHIVE" = '0']]>
20
					</SQL>
21
				</View>
22
				<Level name="Type" column="NOM" uniqueMembers="true" />
23
 
24
			</Hierarchy>
25
		</Dimension>
26
		<Dimension name="Date de facturation" foreignKey="ID_SAISIE_VENTE_FACTURE" type="TimeDimension">
27
			<Hierarchy hasAll="true" allMemberName="Toutes les dates" primaryKey="ID">
28
 
29
				<View alias="SAISIE_VENTE_FACTURE">
30
					<SQL dialect="generic"> <![CDATA[select * from "_SCHEMA_"."SAISIE_VENTE_FACTURE" where "ARCHIVE" = '0']]>
31
					</SQL>
32
				</View>
140 ilm 33
				<Level name="Annee" column="DATE" uniqueMembers="true" levelType="TimeYears" type="Numeric">
110 ilm 34
					<KeyExpression>
35
						<SQL dialect="generic">
36
							<![CDATA[EXTRACT(YEAR FROM "SAISIE_VENTE_FACTURE"."DATE")]]>
37
						</SQL>
38
					</KeyExpression>
39
				</Level>
40
 
41
				<Level name="Mois" column="DATE" uniqueMembers="false" levelType="TimeMonths" type="Numeric"
42
					formatter="org.openconcerto.modules.reports.olap.formatter.MonthMemberFormatter">
43
					<KeyExpression>
44
						<SQL dialect="generic">
45
							<![CDATA[EXTRACT(MONTH FROM "SAISIE_VENTE_FACTURE"."DATE")]]>
46
						</SQL>
47
					</KeyExpression>
48
				</Level>
49
			</Hierarchy>
50
		</Dimension>
140 ilm 51
		<Dimension name="Ligne facturees">
110 ilm 52
  		  <Hierarchy hasAll="true" primaryKey="ID">
53
  		    <Table name="SAISIE_VENTE_FACTURE_ELEMENT" schema="_SCHEMA_"/>
140 ilm 54
  		    <Level name="Quantite" column="QTE" type="Numeric" uniqueMembers="false"/>
110 ilm 55
  		    <Level name="Code article" column="CODE" type="String" uniqueMembers="false"/>
56
  		    <Level name="Poids" column="POIDS" type="Numeric" uniqueMembers="false"/>
140 ilm 57
  		    <Level name="Designation" column="NOM" type="String" uniqueMembers="false"/>
110 ilm 58
  			  </Hierarchy>
59
 		 </Dimension>
60
 
61
		<Measure name="Nombre vendu" column="ID_ARTICLE" aggregator="count" formatString="Standard" />
140 ilm 62
		<Measure name="Quantite" column="QTE" aggregator="count" formatString="Standard" />
110 ilm 63
		<Measure name="Prix de vente HT" column="T_PV_HT" aggregator="sum"
64
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
65
		<Measure name="Prix d'achat HT" column="T_PA_HT" aggregator="sum"
66
			formatter="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
67
		<CalculatedMember name="Marge" dimension="Measures">
68
			<Formula>[Measures].[Prix de vente HT] - [Measures].[Prix d'achat HT]
69
			</Formula>
70
			<CalculatedMemberProperty name="CELL_FORMATTER"
71
				value="org.openconcerto.modules.reports.olap.formatter.CentsCellFormatter" />
72
		</CalculatedMember>
73
 
74
	</Cube>
75
 
76
<Cube name="Clients">
77
		<Table name="CLIENT" schema="_SCHEMA_"/>
78
		 <Dimension name="Type de client">
79
            <Hierarchy hasAll="true" allMemberName="Toutes formes juridiques" >
80
                <Level name="Forme juridique" column="FORME_JURIDIQUE" uniqueMembers="true"/>
81
            </Hierarchy>
82
        </Dimension>
83
 
84
		<Dimension name="Langue" foreignKey="ID_LANGUE">
85
			<Hierarchy hasAll="true" allMemberName="Toutes les langues" primaryKey="ID" >
86
				<Table name="LANGUE" schema="_SCHEMA_"/>
87
				<Level name="Langue" column="NOM" uniqueMembers="true" />
88
			</Hierarchy>
89
 
90
		</Dimension>
91
		<Dimension name="Pays" foreignKey="ID_PAYS">
92
		<Hierarchy hasAll="true" allMemberName="Tous les pays" primaryKey="ID" >
93
				<Table name="PAYS" schema="_SCHEMA_"/>
94
				<Level name="Pays" column="NOM" uniqueMembers="true" />
95
			</Hierarchy>
96
		</Dimension>
97
		<Measure name="Nombre" column="ID" aggregator="count" formatString="Standard" />
98
 
99
		</Cube>
100
 
101
 
102
 
103
</Schema>