Grouping Level 2NEW
1.7.29 Bootstrap 4.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: 158 (1 items) | |||
| + Amount: 7 (1 items) | |||
| + Customernumber: 161 (4 items) | |||
| + Amount: 7 (2 items) | |||
| + Amount: 12692.1955 (2 items) | |||
| + Customernumber: 167 (1 items) | |||
| + Amount: 12692.1955 (1 items) | |||
| + Customernumber: 171 (2 items) | |||
| + Amount: 18997.89 (1 items) | |||
| + Amount: 42783.81 (1 items) | |||
| + Customernumber: 172 (2 items) | |||
| + Amount: 1960.8 (1 items) | |||
| + Amount: 51209.58 (1 items) | |||