Problem with addTotals

26 views
Skip to first unread message

Andre Schmidt

unread,
May 14, 2014, 5:04:10 AM5/14/14
to agile-too...@googlegroups.com
<?php
   
class page_bestellung extends Page {
   
function init(){
    parent
::init();
   
        $this
->add('translation/Controller_Basic')
       
->setLocale('de')
       
->setModel('translation/Translation');
   
        $tt
=$this->add('Tabs');
        $bestellung
=$tt->addTab('Bestellung')->add('CRUD');
        $bestellung
->setModel('Bestellung');
       
       
if($bestellung->grid){
       
//Aussehen des Grids in einem Zebra Muster      
        $bestellung
->grid->setClass('bordered zebra');
       
       
//Suchfeld rechts mit Suchfelder
        $bestellung
->grid->addQuickSearch(array('firma','datum','kunden'));
       
        $bestellung
->grid->addColumn('expander','notizen');
        $bestellung
->grid->addColumn('expander','lieferanschrift');
        $bestellung
->grid->addColumn('expander','haendlerpreis');
       
       
//Pagination
        $bestellung
->grid->addPaginator(10);
       
       
//Anzeige der Berechnung der Gesamtpreis und Gesamtmenge
        $bestellung
->grid->addTotals(array('Gesamtpreis','preise'));
       
}

}
function defaultTemplate(){
       
return array('page/bestellung');
   
}
   
   
}

Hi there,
I have the following problem. I have below a paginator and a calculation.
If I change it calculates the page the new columns. But he expects the front page not to do so. Wei can I solve this.

example:
Calculation Page 1 = 4500
Calculation page 2 = 1800

but I want which is on page 2 Total 6300.

Romans Malinovskis

unread,
Jul 7, 2014, 11:06:31 AM7/7/14
to agile-too...@googlegroups.com
Hi.

I think you need 

addGrandTotals. Here is the change request.



Documentation:

Romans Malinovskis

unread,
Jul 20, 2014, 4:14:31 PM7/20/14
to agile-too...@googlegroups.com
Here is a section of documentation about Totals.

Do you think it's ok or does it need expanding?


Reply all
Reply to author
Forward
0 new messages