cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi!

I think you are making a manual tax journal entry, because you are using all the journal account.

Put oAsiento.AutoVat = BoYesNoEnum.tNO

and after only use oAsiento.Lines.TaxGroup = dtAsientos.Rows(i)("Grp.Imp.") in the line of tax acount.

at last then tax account must be defined in the tax group asocciated to a group tax.

Best Regards

Joaquin Gomez

Former Member
0 Kudos

Thank you, Joaquin.

It is a good step foward (I think I tested it before but now I do not know :S) but in the same way, if you enter the journal entry manually, and it is posible to set the tax group to every line part of the base, our client wants to do it that way with the importation.

Do you know how I can do that?

Thanks a lot.

Former Member
0 Kudos

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.

Former Member
0 Kudos

...
'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?