Blocking credit notes
  • Matthias
    Blocking credit notes

    by Matthias » Tue Mar 27, 2007 4:47 pm


    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?
  • COBS Tech Support
    Joined:Fri Sep 09, 2005 8:23 am

    by COBS Tech Support » Tue Mar 27, 2007 4:49 pm

    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

    Return TRUE

Who is online

Users browsing this forum: No registered users and 1 guest