Column Grouping
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: 162 (1 items) | ||||
| 1 | 12-3456___ | 8 | View Edit | |
| total | 8 | |||
| Customernumber: 161 (3 items) | ||||
| 2 | BR478494 | 8 | View Edit | |
| 3 | KG644125 | 12692.1955 | View Edit | |
| 4 | NI908214 | 12692.1955 | View Edit | |
| total | 25392.391 | |||
| Customernumber: 167 (1 items) | ||||
| 5 | GN228846 | 12692.1955 | View Edit | |
| total | 12692.1955 | |||
| Customernumber: 171 (2 items) | ||||
| 6 | GB878038 | 18997.89 | View Edit | |
| 7 | IL104425 | 42783.81 | View Edit | |
| total | 61781.7 | |||
| Customernumber: 172 (2 items) | ||||
| 8 | 83-2091___ | 1960.8 | View Edit | |
| 9 | EH208589 | 33383.14 | View Edit | |
| total | 35343.94 | |||
| Customernumber: 173 (1 items) | ||||
| 10 | GP545698 | 11843.45 | View Edit | |
| total | 11843.45 | |||