Group sum summarie with query scope, not working
Hello, When i add a scope to summarie, and group my table, the group total is the same that the total
when i dont add scope its working perfectly, but i dont have the sum i need (i have to scope it...).
here my code: (when i remove the ->query it's work perfectly fine)
And i add a screenshot of what i get.
If you have any idea how to get this working thanks you in advance.
8 Replies
bump
bump
Check your querries when scoped and none scoped?
Without ->query () it's working perfectly, but it sum lines dont want to sum.
The only difference between with or without scope is the condition added at the end.
The fact it's working is not so important it's the queries that are ran if by ->query() it is skipping some other methods / magic hence checking the queries.
But if the query is the same but the only difference is the Query additional where. the faults in your query logic Id say. IF you manually run the query does it return as expected in SQL?
yes it return as expected, just it dosent group summaries it total summaries for all group. i just recheck to be sure
If you see the screenshot, the total summaries is the amount i expect, but it should be different for the two group.
so any idea? should i create a bug in filament github?
IF you can recreate a reproduction repo then please do.
Hello, Here the repo: https://github.com/ronylicha/bugfphp
I have reproduce the bug of my two post here, this one about the group sum with scope not working, and the second one, when you check one or two and do bulk action, all the table got check and updated.
What you have to do:
update the .env with the db credential and db name
the admin credentials: [email protected]//123456
Go to the commission dashboard and check the two things
Please use the table filter to see the bug
GitHub
GitHub - ronylicha/bugfphp
Contribute to ronylicha/bugfphp development by creating an account on GitHub.
bump