Column Grouping
simple column grouping,summation of a column value, inline editing
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('payments'); $xcrud->unset_remove(); $xcrud->column_hide('customerNumber'); $xcrud->group_by_columns('customerNumber');//Allows only one field $xcrud->group_sum_columns('amount');//Allows only one field $xcrud->columns('customerNumber,checkNumber,amount'); $xcrud->fields_inline('customerNumber,checkNumber,paymentDate,amount'); echo $xcrud->render(); ?>
Payments
# | Checknumber | Amount | ||
---|---|---|---|---|
Customernumber: 141 (5 items) | ||||
1 | JN722010 | 50 | View Edit | |
2 | KT52578 | 63843.55 | View Edit | |
3 | MC46946 | 35420.74 | View Edit | |
4 | MF629602 | 20009.53 | View Edit | |
5 | NU627706 | 26155 | View Edit | |
total | 145478.82 | |||
Customernumber: 144 (2 items) | ||||
6 | IR846303 | 36005.71 | View Edit | |
7 | LA685678 | 7674.94 | View Edit | |
total | 43680.65 | |||
Customernumber: 145 (3 items) | ||||
8 | CN328545 | 4710.73 | View Edit | |
9 | ED39322 | 28211.7 | View Edit | |
10 | HR182688 | 20564.86 | View Edit | |
total | 53487.29 |