Calculations in the table

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

Calculations in the table

Post by facos79 » 2017-07-03 10:19

Calculations in the table
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'];
Attached hook file
Attachments
Costi_ricavi.zip
(2.55 KiB) Downloaded 165 times

facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

Re: Calculations in the table

Post by facos79 » 2017-07-03 11:52

I also attach the agp file in the attachment
Attachments
Fashion_Srl-2.zip
(9.2 KiB) Downloaded 173 times

facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

BUG - Re: Calculations in the table

Post by facos79 » 2017-07-03 16:42

Maybe I found the problem:
If I put the flag in 'hide in detail view' the calculation will not work.

Could it be a bug?

G Belgrado
Veteran Member
Posts: 61
Joined: 2017-03-12 09:24

Re: Calculations in the table

Post by G Belgrado » 2017-07-04 09:50

si se spunti hide
poi i campi relativi non sono presenti nell'array del php in hooks

devi togliere l'hide
e poi li nascondi con javascript

facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

Re: Calculations in the table

Post by facos79 » 2017-07-04 16:42

Grazie :)

Post Reply