summarizer produces same totals for this page and all pages.

I have this summarizer:
->summarize(
Summarizer::make()
->using(function ($query) use ($document) {
$positiveSum = StatementTransaction::positive($document->id)->sum('balance');
$negativeSum = StatementTransaction::negative($document->id)->sum('balance');
return '$' . number_format(($positiveSum - $negativeSum) / 100, 2);
})
)
->summarize(
Summarizer::make()
->using(function ($query) use ($document) {
$positiveSum = StatementTransaction::positive($document->id)->sum('balance');
$negativeSum = StatementTransaction::negative($document->id)->sum('balance');
return '$' . number_format(($positiveSum - $negativeSum) / 100, 2);
})
)
I've attached a screenshot of what's showing up on the table. The "This page" total is the same as the "all statement transactions" total. The total is correct, the the page total should only be a few hundred dollars.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin