2 Replies Latest reply on Oct 6, 2014 8:36 PM by Willz

    New Invoice Creation Problem

    Willz

      Title

      New Invoice Creation Problem

      Post

      Using script below - Have to click “CONTINUE” many times until last invoice number is reached
      then it sets new invoice with new number.

      See screen shot attached:

      Invoice No. field (with red box) is now Invoice No. TE 8628
      If I keep clicking “CONTINUE” it will step through numbers until reaching the latest invoice number, then is opens a new record with a new invoice number. Sometimes have to click 200 times. depending on how many invoice records certain clients have.

      Set Error Capture [ On ]
      Commit Records/Requests
      [ Skip data entry validation; No dialog ]
      If [ Invoices_::Customer Location = "VA" ]
      Set Field [ Invoices_::Invoice Number; GetRepetition ( Invoices_::gInvoice Numbers ; 1 ) ]
      Set Field [ Invoices_::gInvoice Numbers; GetRepetition ( Invoices_::gInvoice Numbers ; 1 )+1 ]
      Else
      Set Field [ Invoices_::Invoice Number; "TE " & GetRepetition ( Invoices_::gInvoice Numbers ; 2 ) ]
      Set Field [ Invoices_::gInvoice Numbers[2]; GetRepetition ( Invoices_::gInvoice Numbers ; 2)+1 ]
      Set Field [ Invoices_::Invoice Paid; "N" ]
      End If
      Go to Layout [ “Invoice Data Entry” (Invoices_) ]

       

      Screen_Shot.png