Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sale_report_process.php add this for this issue. #28

Open
wilidga opened this issue Oct 6, 2017 · 2 comments
Open

sale_report_process.php add this for this issue. #28

wilidga opened this issue Oct 6, 2017 · 2 comments

Comments

@wilidga
Copy link

wilidga commented Oct 6, 2017

function total_price($totals){ $sum = 0; $sub = 0; $profit = 0; /*add variable for the profit result*/ foreach($totals as $total ){ $sum += $total['total_saleing_price']; $sub += $total['total_buying_price']; $profit = $sum - $sub; } return array($sum,$profit); }

@riyansuryapratama
Copy link

just define variable profit with 0

@ghost
Copy link

ghost commented Mar 30, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants