You gave an idea and it seems to be working, below is the code i'm using in the view:
{{ for dt in dt: now_dt=request.now.date()-dt.payment_date now_dt2=now_dt.days name=dt.client.parent_name policy_number=dt.client.policy_number }} <script> $(document).ready(function(){ if ({{=now_dt2}} >=60) { $('#expiry').show(); } }); </script> <div class="behind"> <i class="fa fa-user-circle-o user"></i><br /> <span class="message">{{=name}} ({{=policy_number}})'s payments are behind by {{=now_dt2}} DAYS!!! <br /></span> </div> {{pass}} Thanks alot Clemens On Monday, December 13, 2021 at 11:55:56 AM UTC+2 Clemens wrote: > My first thought was to check this when an user has logged in. Having a > redirect after login to a controller checking the time, the last payment > was made, can then produce a corresponding message. > > I googled "web2py redirect after login" and found how to do a redirect > after login: > https://stackoverflow.com/questions/18902549/web2py-redirect-after-login > > Is it what you want? > > Best regards > Clemens > > On Monday, December 13, 2021 at 6:27:10 AM UTC+1 mostwanted wrote: > >> Is there a way of keeping track of table entries? I have to create a >> function that shows a pop-up warning when a client has not made payments in >> 3 months ,i dont know where to begin, any ideas? >> > -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/aeea11f6-cf41-4b54-ac22-161c08e4c456n%40googlegroups.com.