Page 1 of 1

Blocking credit notes

Posted: Tue Mar 27, 2007 4:47 pm
by Matthias
Hi,

I want to be able to prevent my users from creating credit notes when doing invoicing, unless they have a security access level of 8 or higher. Does anyone have a script handy that does this?

Posted: Tue Mar 27, 2007 4:49 pm
by COBS Tech Support
This script will do what you want:

Code: Select all

* Don't allow saving of a negative value invoice transaction
* unless the user has an access level of at least 8

If ReadTranValue("TOTAL") < 0 .And. .Not. Security(8, FALSE)
   Echo("Sorry you don't have clearance to create a credit note or negative invoice.")
   Return FALSE
Endif

Return TRUE