Skip to Content
author's profile photo Former Member
Former Member

Error -5002 Tax account is missing, adding Journal Entries.

Hello.

We are importing Journal Entries and we had no problems until we tried to add tax group information in entries.

We add this data into purchase and tax lines, but SBO 2007A 8.00.181 SP00 PL49 shows an error as in subject: "Error -5002 in entry, <Subject of entry cab>, Tax Account is missing, [OJDT.Series][line:1]"

This is how we do it ...

We use:

- oAsiento -> oJournalEntries

- dtAsiento -> datatable with journal entries

oAsiento = oCompany.GetBusinessObject(BoObjectTypes.oJournalEntries)

oAsiento.Memo = dtAsientos.Rows(i)("Concepto")

oAsiento.DueDate = dtAsientos.Rows(i)("Fecha")

oAsiento.ReferenceDate = dtAsientos.Rows(i)("Fecha")

oAsiento.TaxDate = dtAsientos.Rows(i)("Fecha")

oAsiento.Report347 = BoYesNoEnum.tYES

oAsiento.Lines.SetCurrentLine(0)

i = 0

oAsiento.Lines.AccountCode = dtAsientos.Rows(i)("Cuenta")

oAsiento.Lines.ShortName = dtAsientos.Rows(i)("Cuenta")

oAsiento.Lines.LineMemo = dtAsientos.Rows(i)("Concepto")

oAsiento.Lines.Debit = dtAsientos.Rows(i)("Debe")

oAsiento.Lines.VatLine = BoYesNoEnum.tNO

oAsiento.Lines.TaxGroup = dtAsientos.Rows(i)("Grp.Imp.")

oAsiento.Lines.CostingCode = dtAsientos.Rows(i)("C.Beneficio")

oAsiento.Lines.Add()

i = i + 1

oAsiento.Lines.AccountCode = dtAsientos.Rows(i)("Cuenta")

oAsiento.Lines.ShortName = dtAsientos.Rows(i)("Cuenta")

oAsiento.Lines.LineMemo = dtAsientos.Rows(i)("Concepto")

oAsiento.Lines.Debit = dtAsientos.Rows(i)("Debe")

oAsiento.Lines.VatLine = BoYesNoEnum.tYES

oAsiento.Lines.TaxGroup = dtAsientos.Rows(i)("Grp.Imp.")

oAsiento.Lines.CostingCode = dtAsientos.Rows(i)("C.Beneficio")

oAsiento.Lines.Add()

i = i + 1

oAsiento.Lines.AccountCode = strCuentaProveedores

oAsiento.Lines.ShortName = dtAsientos.Rows(i)("Cuenta")

oAsiento.Lines.LineMemo = dtAsientos.Rows(i)("Concepto")

oAsiento.Lines.Credit = dtAsientos.Rows(i)("Haber")

'oAsiento.Lines.VatLine = BoYesNoEnum.tNO

'oAsiento.Lines.TaxGroup = ""

oAsiento.Lines.Add()

intRslt = oAsiento.Add()

If intRslt <> 0 Then

oCompany.GetLastError(intErrCode, strErrMsg)

MsgBox("Error " & intErrCode & " en asiento, " & oAsiento.Memo & " , " & strErrMsg)

End If

Does anyone know what is wrong?

Thank you very much.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2010 at 08:15 AM
    ...
    'oAsiento.Lines.TaxGroup = ""
    oAsiento.Lines.Add()
    
    intRslt = oAsiento.Add()
    ...
    

    I realiced I had to remove the last oAsiento.Lines.Add() line but, in any case, we get the same message.

    Well, really, I did everything you can imagine:

    - Series value to blank or to correct and incorrect existing series values.

    - VAT line to BoYesNoEnum.tYES (and BoYesNoEnum.tNO)

    - Setting VATAmount and BaseSum (but only you can modify with automatic VAT)

    I could import a Journal Entry with no Tax Group set in lines (even with that theorically wrong last oJournalEntries.Lines.Add) but our client wanted that way.

    That is the beginning of the issue.

    Can anyone help me?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2010 at 11:35 AM

    In several pages I see some data about a way to codificating Account Codes using something like "_SYS" but in my databases every code has six digits and they are like "430000" (regurlar accounts). I think it is that way because of the account segmentation. Could be that or not?

    I am really lost with this ... 😔

    Help me, please.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I think I got it but one doubt remains ...

      If you set AutoVAT to tNO, then you cannot set any line with Tax group except VAT lines, but you can do it in every line you want to if you set AutoVAT to tYES. Does anybody know why?

      Thank you very much.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2010 at 12:56 PM

    Thanks to Joaquin, we have found what it happend.

    The point was that you cannot add the impositive group to not VAT lines if journal entry has automatic VAT set to NO.

    If impositive group in non VAT lines is wanted, you must exclude VAT line and set automatic VAT to yes.

    Thanks a lot.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.