is there a way to update table and calculate using FIFO (First In First Out) methods? e.g. Unit Trade Unit Remaining Subscription Unit NAV Date 3.000,00 1.000,00 1.000,00 01/03/2016 2.000,00 1.000,00 1.000,00 01/02/2016 1.000,00 1.000,00 1.000,00 01/01/2016 let say i have the data above, when user sell the unit (redeem) it will deduct the remaining subscription unit using FIFO method, the problem i face is if the user redeem unit is more than remaining subscription unit, how can the system deduct the remaining subscription unit for the next row? e.g. query case i don't understand to solve it using web2py user redeem 1500 unit expected result Unit Trade Unit Remaining Subscription Unit NAV Date 1.500,00 -1.500,00 0,00 01/04/2016 3.000,00 1.000,00 1.000,00 01/03/2016 2.000,00 1.000,00 500,00 01/02/2016 1.000,00 1.000,00 0,00 01/01/2016 how i can solve it using web2py way?
thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

