Grouping Level 2NEW
1.7.29 Tailwind CSS 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: 1 (1 items) | |||
| + Amount: 123457 (1 items) | |||
| + Customernumber: 10364 (1 items) | |||
| + Amount: 605002 (1 items) | |||
| + Customernumber: 103600 (1 items) | |||
| + Amount: 605000 (1 items) | |||
| + Customernumber: 11310 (1 items) | |||
| + Amount: 14190 (1 items) | |||
| + Customernumber: 11221 (1 items) | |||
| + Amount: 99 (1 items) | |||
| + Customernumber: 112 (1 items) | |||
| + Amount: 99 (1 items) | |||
| + Customernumber: 113 (1 items) | |||
| + Amount: 45870 (1 items) | |||
| + Customernumber: 114 (3 items) | |||
| + Amount: 82261 (1 items) | |||
| + Amount: 7565 (1 items) | |||
| + Amount: 44894 (1 items) | |||