What's new

Welcome to xCrud Community - Data Management and extended PHP CRUD

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Sum function with column_callback

sipdorus

New member
Joined
Feb 13, 2023
Messages
11
Reaction score
0
Points
1
Location
Turkiye
Hello I have an amount field and a process type field (income-expense)
when I list all process, I can show expenses as negative by
$xcrud->column_callback('amount', 'format_amount_as_negative');
function. It shows correctly.
But the bottom of list sum('amount') code sums all values as positive :eek:
how can I sum field values after column_callback manipulation?
 
Top Bottom