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: 151 (3 items) | |||
| 1 | BF686658 | 2.3456789034567896e97 | View Edit |
| 2 | GB852215 | 20314.44 | View Edit |
| 3 | KI884577 | 39964.63 | View Edit |
| total | 2.3456789034568E+97 | ||
| - Customernumber: 157 (1 items) | |||
| 4 | HI618861 | 35152.12 | View Edit |
| total | 35152.12 | ||
| - Customernumber: 161 (4 items) | |||
| 5 | BR352384 | 5500 | View Edit |
| 6 | BR478494 | 50743.65 | View Edit |
| 7 | KG644125 | 12692.19 | View Edit |
| 8 | NI908214 | 38675.13 | View Edit |
| total | 107610.97 | ||
| - Customernumber: 166 (2 items) | |||
| 9 | BQ327613 | 38785.48 | View Edit |
| 10 | DC979307 | 44160.92 | View Edit |
| total | 82946.4 | ||