Calc Plugin Configure

Manuelbolzano

New Member
Hello everyone! today's problem is linked to a sum between 4 fields!
I have a form, where employee salaries, bonuses, and pay advances are noted.

{buste_paga___stipendio},
{buste_paga___bonus},
{buste_paga___anticipo1},
{buste_paga___anticipo2},
{buste_paga___anticipo3}

these plugin fields, are of Input type number, format decimal with Number format selected on yes.
In these fields, you simply have to add an amount in number

I made a field with Plugin Calc, which should do the following count

{buste_paga___stipendio} + {buste_paga___bonus} - {buste_paga___anticipo1} - {buste_paga___anticipo2} - {buste_paga___anticipo3}

and deliver the result

i have insert to More > Calculation this:

$myCalc = '{buste_paga___stipendio}' + '{buste_paga___bonus}' - '{buste_paga___anticipo1}' - '{buste_paga___anticipo2}' - '{buste_paga___anticipo3}' ;
return $myCalc;

Activated Ajax Calculation to YES and type to Ajax observe fields all field name:
{buste_paga___stipendio},
{buste_paga___bonus},
{buste_paga___anticipo1},
{buste_paga___anticipo2},
{buste_paga___anticipo3}


Ok.. Now... what did i do wrong?

Thanks Guys for the help!
 
Manuel io l'ho rifatta proprio nello stesso modo in cui l'hai postata tu e funziona. Ho solo omesso" observe fields all field name:
{buste_paga___stipendio},
{buste_paga___bonus},
{buste_paga___anticipo1},
{buste_paga___anticipo2},
{buste_paga___anticipo3}
 
Ciao Max! Mitico grazie mille della risposta... sai che a me da errore...

Schermata 2021-04-22 alle 09.30.31.png
Trall'altro ho visto che non mi esegue il calcolo proprio... mi da solo il primo valore.. che sia un problema di configurazione nei campi?
Come li hai impostati?
 
Manuel io l'ho rifatta proprio nello stesso modo in cui l'hai postata tu e funziona. Ho solo omesso" observe fields all field name:
{buste_paga___stipendio},
{buste_paga___bonus},
{buste_paga___anticipo1},
{buste_paga___anticipo2},
{buste_paga___anticipo3}

Perfetto! ho capito cosa avevo Sbagliato, avevo lasciato degli spazi tra il nome e la chiusura della graffa... e questo comporta un crash.. ora mi sono rimaste le tabelle in errore 1064 quando provo ad accedere ma credo che se elimino da database i dati, e li reinserisco dovrebbe quadrare...

MAX! Grazie davvero!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top