on 06-28-2010 12:08 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
...
'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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.