Skip to Content
0
Former Member
Oct 19, 2006 at 10:48 PM

[JDT1.Account][line: 1] , 'Tax account has not been defined...'

26 Views

Hello Adele:

Just had the same kind of problem you had! (posting on 10/16) Mine didn't go away with removal of referencedate and duedate. Matter in fact I have defaulted all my dates which I reall need to modify (SBO UI let you modify the posting date and duedate, doesn't make any sense DI-API doesn't allow it)... In any case. I still have the same error message!

Would you please help? Thank YOu here's my code..

SAPbobsCOM.JournalEntries oje;

oje = (SAPbobsCOM.JournalEntries)(global.ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries));

//oje.ReferenceDate = postdate;

//oje.TaxDate = docdate;

//oje.DueDate = duedate;

oedit = (SAPbouiCOM.EditText)(oform.Items.Item("15").Specific);

if (oedit.String != "")

oje.Memo = oedit.String;

omatrix = (SAPbouiCOM.Matrix)(oform.Items.Item("u_matrix").Specific);

for (int i = 1; i <= omatrix.RowCount; i++)

{

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("AC").Cells.Item(i).Specific);

oje.Lines.AccountCode = oedit.String;

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("PC").Cells.Item(i).Specific);

oje.Lines.CostingCode = oedit.String;

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("credit").Cells.Item(i).Specific);

oje.Lines.Credit = System.Convert.ToDouble(oedit.String);

oedit = (SAPbouiCOM.EditText)(omatrix.Columns.Item("debit").Cells.Item(i).Specific);

oje.Lines.Debit = System.Convert.ToDouble(oedit.String);

oje.Lines.Add();

//oje.Lines.SetCurrentLine(i);

}

if (oje.Add() != 0)

{

global.ocompany.GetLastError(out errcode, out errmsg);

global.oapplication.MessageBox("Error: " + errcode.ToString() + " : " + errmsg, 1, "OK", "", "");

return;

}

else

{

global.oapplication.StatusBar.SetText("el proceso completa", SAPbouiCOM.BoMessageTime.bmt_Short,

SAPbouiCOM.BoStatusBarMessageType.smt_Success);

}

OH... Also, I have tried all the testing stuff on SBO UI and it works. So I am more confused now!

Message was edited by: Bo Peng