Column Grouping Bootstrap 4.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: 158 (1 items) | |||
| 1 | 12-123456_ | 7 | View Edit |
| total | 7 | ||
| - Customernumber: 161 (4 items) | |||
| 2 | BR3523847 | 7 | View Edit |
| 3 | BR478494 | 7 | View Edit |
| 4 | KG644125 | 12692.1955 | View Edit |
| 5 | NI908214 | 12692.1955 | View Edit |
| total | 25398.391 | ||
| - Customernumber: 167 (1 items) | |||
| 6 | GN228846 | 12692.1955 | View Edit |
| total | 12692.1955 | ||
| - Customernumber: 171 (2 items) | |||
| 7 | GB878038 | 18997.89 | View Edit |
| 8 | IL104425 | 42783.81 | View Edit |
| total | 61781.7 | ||
| - Customernumber: 172 (2 items) | |||
| 9 | 83-2091___ | 1960.8 | View Edit |
| 10 | CE51751 | 51209.58 | View Edit |
| total | 53170.38 | ||