Grouping Level 2NEW
1.7.29 Bootstrap 5 theme
Grouping Rows to the second level
HIDE CODE
<?php
$xcrud = Xcrud::get_instance();
$xcrud->table('payments');
$xcrud->unset_remove();
$xcrud->column_hide('customerNumber');
$xcrud->group_table_collapsed(true);
$xcrud->group_by_columns('customerNumber,amount');//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 (1 items) | |||
| + Amount: 2.3456789034567896e97 (1 items) | |||
| + Customernumber: 146 (2 items) | |||
| + Amount: 56 (1 items) | |||
| + Amount: 2.3456789034567896e97 (1 items) | |||
| + Customernumber: 298 (1 items) | |||
| + Amount: 30000 (1 items) | |||
| + Customernumber: 148899 (1 items) | |||
| + Amount: 44380.15 (1 items) | |||
| + Customernumber: 148 (2 items) | |||
| + Amount: 2611.84 (1 items) | |||
| + Amount: 3516.04 (1 items) | |||
| + Customernumber: 151 (3 items) | |||
| + Amount: 2.3456789034567896e97 (1 items) | |||
| + Amount: 20314.44 (1 items) | |||
| + Amount: 39964.63 (1 items) | |||