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: 145 (1 items) | |||
| 1 | BI507030 | 4 | View Edit |
| total | 4 | ||
| - Customernumber: 148 (2 items) | |||
| 2 | DD635282 | 2611.84 | View Edit |
| 3 | ME497970 | 3516.04 | View Edit |
| total | 6127.88 | ||
| - Customernumber: 151 (3 items) | |||
| 4 | BF686658 | 2.3456789034567896e97 | View Edit |
| 5 | GB852215 | 20314.44 | View Edit |
| 6 | KI884577 | 39964.63 | View Edit |
| total | 2.3456789034568E+97 | ||
| - Customernumber: 157 (1 items) | |||
| 7 | HI618861 | 35152.12 | View Edit |
| total | 35152.12 | ||
| - Customernumber: 161 (3 items) | |||
| 8 | BR352384 | 5000 | View Edit |
| 9 | BR478494 | 50743.65 | View Edit |
| 10 | KG644125 | 12692.19 | View Edit |
| total | 68435.84 | ||