Total Earning
query(
"select sum((subtotal-cou_amt) - ((subtotal-cou_amt) * commission/100))
as total_amt from tbl_ticket where sponsore_id=" .
$sdata["id"] .
" and ticket_type ='Completed'"
)
->fetch_assoc();
$earn = empty($total_earn["total_amt"])
? 0
: number_format(
(float) $total_earn["total_amt"],
2,
".",
""
);
echo $earn . $set["currency"];
?>