custom report - calculating an additional value
Posted: Wed Oct 09, 2019 9:11 pm
I have a custom report to which I want to add an additional value. The value needs to be calculated, which (as it is php) should be pretty easy. But for some reason the value is not calculated when the report is generated. Below is the original code from the reports controller file and the modified code.
What am I doing wrong?
Original code
Modified code
$commission is set to the value of 0.15
What am I doing wrong?
Original code
Code: Select all
$net_sales = $agent_order['total'] - ($agent_order['shipping'] + $agent_order['tax'] + $agent_order['other_fees'] + -$agent_order['coupon']);
Code: Select all
$net_sales = ($agent_order['total'] - ($agent_order['shipping'] + $agent_order['tax'] + $agent_order['other_fees'] + -$agent_order['coupon'])) * $commission;