AP Batches were posted in wrong month.

SOLVED

There were two large AP batches that were posted into the wrong month.  I am planning to make a reversing journal entry to accrue it into the correct month.  Is there a way to copy the information from the AP batch into General Journal Entry rather than manually entering all the information into General Journal Entry?

  • 0
    Depends on the version you are in. If 2015 yes. Prior to that no.
  • 0 in reply to TomTarget
    Tom, yes i am using version 2015.
  • 0 in reply to TomTarget
    Tom,
    Can you give me instructions on how to copy the info into General Ledger?
  • 0 in reply to WendyT3
    verified answer
    There is actually a script that will do that. You might need to contact The Whiz Kid aka Elliott on how to implement

    retVal = 0

    strJrnlNo = ""
    strPostDate = ""

    retVal = oUIObj.GetValue("ML_JournalNo$", strJrnlNo)
    retVal = oUIObj.GetValue("ML_PostingDate$", strPostDate)


    strPostDate = Mid(strPostDate, 1, 4) & "-" & Mid(strPostDate, 5, 2) & "-" & Mid(strPostDate, 7, 2)

    DIM strSQLCmnd

    MAS_Scr_Dbg = 0

    'Initiate the Sage100 ERP connection
    sConnection = "DSN=SOTAMAS90;UID=;COMPANY=ABC;PWD=" ' NOTE this assumes no security, with ABC. UID and PWD need to be supplied if security is enabled.

    Set oConnection = CreateObject("ADODB.Connection")

    'AddObject "oConnection", oConnection

    oConnection.Open sConnection

    Set rsGL = CreateObject("ADODB.Recordset")

    strSrcJournal = Ucase(MID(strJrnlNo, 1, 2))

    'Get postings from journal
    strSQLCmd = "SELECT AccountKey, DebitAmount, CreditAmount"
    strSQLCmd = strSQLCmd & " FROM GL_DetailPosting Where SourceJournal = " & Chr(39) & strSrcJournal & Chr(39)
    strSQLCmd = strSQLCmd & " AND JournalRegisterNo = " & Chr(39) & Mid(strJrnlNo, 4) & Chr(39) & " AND PostingDate = "
    strSQLCmd = strSQLCmd & " {d" & Chr(39) & strPostDate & Chr(39) & "}"

    retVal = oScript.DebugPrint("SQL Command: " & strSQLCmd)

    ' Retrieve GL transactions to reverse


    With rsGL
    .ActiveConnection = oConnection
    .Source = strSQLcmd
    .CursorType = 0 'forward only
    .LockType = 1 'read ony
    .Open 'Open executes the query
    End With


    rsGL.MoveFirst

    if Not(rsGL.EOF or rsGL.BOF) then

    'found something to reverse
    Dim oGJ
    Dim oGJLines

    Set oGJ = oScript.AsObject(oSession.GetObject("GL_GeneralJournal_bus"))
    Set oGJLines = oScript.AsObject(oGJ.Lines)

    retVal = oGJ.SetKeyValue("SourceJournal$", strSrcJournal)

    entNo = "" ' let script know that return value on next statement is a string
    retVal = oGJ.GetNextEntryNo(strSrcJournal, entNo) ' get next entry number for source journal
    retVal = oGJ.SetKeyValue("EntryNo$",entNo)
    retVal = oGJ.SetKey()


    retVal = oGJ.SetValue("JournalComment$", "Reversal of entry: " & Ucase(strJrnlNo))

    acct = ""
    debit = 0
    credit = 0

    rsGL.MoveFirst

    Do While Not rsGL.EOF

    acct = rsGL("AccountKey")
    debit = CDbl(rsGL("DebitAmount")) ' Convert amount to a double type numeric
    credit = CDbl(rsGL("CreditAmount"))

    retVal = oGJLines.AddLine()
    retVal = oGJLines.SetValue("AccountKey$", acct)

    If debit <> 0 Then
    retVal = oGJLines.SetValue("DebitAmount", debit * -1)
    End If

    If credit <> 0 Then
    retVal = oGJLines.SetValue("CreditAmount", credit * -1)
    End If

    retVal = oGJLines.Write()
    rsGL.MoveNext
    Loop

    retVal = oGJ.Write()

    End If

    retVal = oSession.AsObject(oSession.UI).MessageBox("", "Reversal complete. Review in General Journal Entry prior to updating.") ' use UI object messagebox as best practice since VB msgbox will not work in Sage 100 ERP Advanced/Premium, the dialog box would be sitting on the server.
  • 0 in reply to BigLouie
    verified answer

    #1 First you have to have rights to access this feature. I'm assuming you know how to do this in role maintenance. In role maintenance you will find this option under Tab 2 Security Events | General Ledger | Allow Journal Reversal. Box needs to be checked.

    #2 The go to general ledger | account maintenance and select one of the accounts that was posted to. Highlight the transaction in the transaction tab. A blue curved ribbon arrow will appear on the right side of the screen. Click it. Then go to general journal entry, review it and update it.

    Much easier than the nasty old script. ;) However 2014 and prior you do have to resort to installing that script.