-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRID Footer #537
Comments
There is already a issue for this point: |
Thanks dear Abhoryo, I will try to fix it |
Hi Abhoryo, $source = new Entity('GtempsOutinBundle:Outin');
$grid = $this->get('grid');
$grid->setSource($source);
// WORKED time NEW column
$workedTimeColumn = new TimeColumn(array(
'id' => 'workedTime',
'title' => 'WORKED TIME',
'filterable' => false,
));
$source->manipulateRow(
function ($row){
$timeOut = $row->getEntity()->getTimeOut();
$timeIn = $row->getEntity()->getTimeIn();
$workedTime = $timeOut->diff($timeIn);
$row->setField('workedTime', $workedTime->format('%H:%I:%S'));
return $row;
}
}
);
$grid->addColumn($workedTimeColumn); // you can see that i added the new column with time value but i can't calculate the sun of the added column cells |
Can you draw me a data table with all the values displayed like you want (database values and calculate values) ? |
DATE || IN || OUT || WORKED TIME || REGULAR || OVER TIME || ABS TIME the worked time is the diffirence betwwen IN and OUT NB: i calculated the workedTime and the OverTime ans AbsenceTime BUT I can't do the sum of thease columns |
This is just a PHP problem. |
thanks @Abhoryo , |
For each line or for the whole grid? |
for the whole grid |
Ok that's different. The only solution I think is that you tweak the template for the sum of each row and then add a line to show the result. |
thanks @Abhoryo |
No, plus you can't store all the values because you have pages. |
HI, I am using the Apydatagrid for my project
my problem is i can't get a summary rows for the showed columns.
for exemple i would like to get a sum data in the bottom of each columns
thanks
The text was updated successfully, but these errors were encountered: