Blocking credit notes
  • Matthias
    Blocking credit notes

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

    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?
  • COBS Tech Support
    Posts:683
    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
    Endif

    Return TRUE

Who is online

Users browsing this forum: No registered users and 6 guests