Good morning, I'm crazy because I can not figure out what's wrong with calculations. Basically I have to calculate the total sum of some expenses, the total sum of some sales, and the difference between the two totals.
I managed to show the results but after changing some cells (I changed the names) it does not work anymore and it's 2 days that I bump my head.
What am I doing wrong ?
Code: Select all
$data['Totale_costi'] = (($data['Greggio'] * $data['Quantita']) + $data['Impianti'] +$data['Stampa'] +$data['Abbigliaggio'] +$data['Trasporto']);
$data['Totale_vendita'] = (($data['Prezzo_vendita'] * $data['Quantita']) + $data['Prezzo_spedizione']);
$data['Totale_ricavo'] = $data['Totale_vendita'] - $data['Totale_costi'];