1 Reply Latest reply on Jan 14, 2016 7:30 AM by Extensitech

    Invoice Numbers




      Im a little bit new to development. Im trying to come up with a customised, sequential invoice number.


      1: I want to start it with "VES"

      2: I want to pull the location code of the employee entering the invoice from the employee card Employee Details::Business Unit Code

      3: I want a dash "-"

      4: I want a 6 digit sequential invoice number staring with 000000

      5: Int will look like VES3-000001, VES3-000002, VES3-000003 etc


      What is the best function to do this?


      The other hurdle I have is in the std script in the invoices start solution, It doesn't take into account the employee code when you select the customer off the invoice pay. What do I need to add and where in that script to account for the Employee Details::Business Unit Code?


      Thanks advance

        • 1. Re: Invoice Numbers

          Create a new calculated field equal to:



          & ~EmployeeCodeField~

          & "-"

          & substitute ( 10 ^ ( 6 - length ( ~SequentialField~ ) ) ; 1 ; "" )

          & ~SequentialField~


          Regarding "sequential" (as opposed to just "unique"), you can ensure that invoices can never be deleted, only voided.


          Chris Cain