[web2py] Re: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread mostwanted
Thanks Stifan On Monday, November 12, 2018 at 9:29:50 PM UTC+2, 黄祥 wrote: > > perhaps you can learn from web2py appliance: pos > if i'm not wrong the code to calculate for sum is on the controller side > > ref: > https://github.com/mdipierro/web2py-appliances/ > > best regards, > stifan > --

[web2py] Re: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread 黄祥
perhaps you can learn from web2py appliance: pos if i'm not wrong the code to calculate for sum is on the controller side ref: https://github.com/mdipierro/web2py-appliances/ best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread mostwanted
I wanted to create an Invoice for clients orders, i wanted to be able to do all the calculations of the costs of their services as I enter values into the database. But I kinda found a way around this coz it was giving me a headache, so i decided to calculate the total in the controller like i

[web2py] Re: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread Leonel Câmara
You can either use after_insert to put the value in the Total of all rows or you can use a Virtual field or Method. May I ask what you're trying to do? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -