[web2py] Re: Calculating a percentage value in the database

2020-01-13 Thread mostwanted
hahahaha thanks for highlighting that! I initially copied & pasted this line and didnt get rid of some impurities. On Monday, January 13, 2020 at 7:22:16 PM UTC+2, Ari Lion BR Sp wrote: > > *Field('markupCalc', 'integer', compute=lambda r: (float(r['markup']/* >

[web2py] Re: Calculating a percentage value in the database

2020-01-13 Thread Ari Lion BR Sp
*Field('markupCalc', 'integer', compute=lambda r: (float(r['markup']/* *100.0**)*float(r['unitPrice']))),* *??* *but why integer?* *you will have no precision.* Em segunda-feira, 13 de janeiro de 2020 13:54:25 UTC-3, mostwanted escreveu: > > I'm trying to calculate a required percentage

[web2py] Re: Calculating a percentage value in the database

2020-01-13 Thread mostwanted
I figured out where my problem was, I switched up the arrangement of figures in markedCalc:, I put the dividing value before the markup value as opposed to what i did initially which was bringing it before the markup value and it worked. *Field('markupCalc', 'integer', compute=lambda r: