Hi all,
How can I disable "Add New" button if I my quantity on "Reste à livrer" is 0 (zero). It's on "Enlevement" subform php file or on "commande" form?
Thank you
Disable "Add New" if I reach 0 (zero)
Disable "Add New" if I reach 0 (zero)
- Attachments
-
- Capture d’écran 2021-06-15 à 11.15.16.png (37.26 KiB) Viewed 1188 times
Re: Disable "Add New" if I reach 0 (zero)
Change permissions in admin area.
Revoke insert permission on that table from the specify group or groups.
Revoke insert permission on that table from the specify group or groups.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Disable "Add New" if I reach 0 (zero)
Hi,
Good idea.
And if my balance is zero (0), how to stop transaction like warning users that your balance is insufficient?
Thanks
O
Good idea.
And if my balance is zero (0), how to stop transaction like warning users that your balance is insufficient?
Thanks
O
Re: Disable "Add New" if I reach 0 (zero)
First thing which comes into my mind:
As this is a detail view, you can check value of balance in TABLENAME_dv hook: If balance is zero, revoke insert permission on database level (using SQL command) from group or even from specific user (we don't know your use-case). Then append an alert to $html variable.
Additionally you should check in before-insert hook and deny insert if balance is zero.
As this is a detail view, you can check value of balance in TABLENAME_dv hook: If balance is zero, revoke insert permission on database level (using SQL command) from group or even from specific user (we don't know your use-case). Then append an alert to $html variable.
Additionally you should check in before-insert hook and deny insert if balance is zero.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Disable "Add New" if I reach 0 (zero)
Hi,
Thanks for your help.
O
Thanks for your help.
O