Dear guys..
I have a problem with creating journal entry with DI API and message says "Tax account has not been defined for the selected tax code"
1. Set oJnl = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
2. oJnl.TaxDate = Now
3. oJnl.Memo = "Tax Invoice"
4. oJnl.Lines.ShortName = sBpAccCode ' BP Code
5. oJnl.Lines.Credit = sAngka ' Amount
6. oJnl.Lines.Add
7. oJnl.Lines.AccountCode = sBpAccCode ' Bp Code
8. oJnl.Lines.Debit = sTax ' Amount
9. oJnl.Lines.Add
10. oJnl.Lines.AccountCode = sTaxGLAcct ' Tax Acct Code
11. oJnl.Lines.Debit = DPP ' Amount
12. oJnl.Lines.Add
I supposed that i can't entry sBpAccCode in Line 7. I try to change in line 7 with sTaxGLAcct and so running well. But if i try entry via screen SBO with same posting, it's successfully saved.
What happen maybe in my above code??
Thanks
Rgds
Toro -
Hi Toro,
I had the same problem and solved it by removing the reference date, tax date and due date properties. Herewith the link I'm referring to.
[JDT1.Account][line: 1] , 'Tax account has not been defined...'
Hope it helps,
Adele
Add a comment