[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:

[web2py] Calculating a percentage value in the database

2020-01-13 Thread mostwanted
I'm trying to calculate a required percentage value for the entered figure but i am getting the wrong answer Field('unitPrice', 'float', label=SPAN('Unit Price', _style="font-weight: bold;"), requires=IS_MATCH('[0-9]+', error_message=T('Enter Money in Proper Figures'))), Field('markup',

[web2py] Re: Remote database synchronization

2020-01-13 Thread Ari Lion BR Sp
Hi, I have the same question. Does web2py allows remote synchro? Better if it was assynchronous. It means, every transaction wold be stored in a quewe and eventualy synchronized to remote. Its it possible? I need this feature. regards, Ari Em sexta-feira, 8 de dezembro de 2017 18:30:05