siamon123 / warehouse-inventory-system

Open source inventory management system with php and mysql
http://www.oswapp.com
MIT License
379 stars 233 forks source link

sale_report_process.php add this for this issue. #28

Open wilidga opened 6 years ago

wilidga commented 6 years ago

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 commented 6 years ago

just define variable profit with 0

ghost commented 4 years ago

https://github.com/bitsandbots/inventory