Summary calcule return seulement la premiere ligne

Nom : Capture d’écran 2015-09-16 à 03.28.33.png
Affichages : 143
Taille : 36,9 Ko

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
        var piece_grid = new Ext.grid.Panel({
	    renderTo: 'grid-container',
	    store: piece_store,
	    title: TitrePiece,
	    width: '100%',
	    height: 500,
	    columnLines: true,
	    iconCls: 'extjs-icon-receive-items',
	    tbar: piece_top_bar, 
           features: [{
        	ftype: 'summary'
    	    }],
	    dockedItems: [
		    {
		        xtype: 'pagingtoolbar',
		        store: piece_store,
		        dock: 'bottom',
		        displayInfo: true
		    }
	    ],
	    columns: [
	        
	        {
	            text: 'Fournisseur',
	            width: 250,
	            dataIndex: 'nomcpte',
	           summaryType: 'count',
	           summaryRenderer: function(value, summaryData, dataIndex) {
            		return Ext.String.format('{0} piece{1}', value, value !== 1 ? 's' : ''); 
        		}
	        },
	        {
	            text: 'N°Pièce',
	            width: 100,
	            dataIndex: 'cdmvt',
	            summaryType: 'average',
	            
	        },
	        {
	            text: 'Date réception',
	            width: 105,
	            dataIndex: 'dtmvt',
	            align: 'center',
	            
	        },
	        {
	            text: 'Montant HT.',
	            width: 120,
	            dataIndex: 'montantht',
	            summaryType: 'sum',
	            align: 'right',
	           
	        }, ...
	        {