Column Grouping Bootstrap 5 theme
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: 12161 (1 items) | ||||
1 | 0010407097 | 100045 | View Edit | |
total | 100045 | |||
Customernumber: 124 (3 items) | ||||
2 | 0010407097 | 100045 | View Edit | |
3 | HR86578 | 100045 | View Edit | |
5 | NT141748 | 120 | View Edit | |
total | 200210 | |||
Customernumber: 123467 (1 items) | ||||
4 | KI131716 | 100044 | View Edit | |
total | 100044 | |||
Customernumber: 1289 (1 items) | ||||
6 | DI925118 | 1200 | View Edit | |
total | 1200 | |||
Customernumber: 128 (3 items) | ||||
7 | FA465482 | 100044 | View Edit | |
8 | FH668230 | 100044 | View Edit | |
9 | IP383901 | 100044 | View Edit | |
total | 300132 | |||
Customernumber: 129 (1 items) | ||||
10 | DM826140 | 100045 | View Edit | |
total | 100045 |