Post by burley » 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

Code: Select all

$net_sales = $agent_order['total'] - ($agent_order['shipping'] + $agent_order['tax'] + $agent_order['other_fees'] + -$agent_order['coupon']);
Modified code

Code: Select all

$net_sales = ($agent_order['total'] - ($agent_order['shipping'] + $agent_order['tax'] + $agent_order['other_fees'] + -$agent_order['coupon'])) * $commission;
$commission is set to the value of 0.15

User avatar
Active Member

Posts

Joined
Sun Oct 09, 2011 3:30 pm
Who is online

Users browsing this forum: No registered users and 11 guests