SAPbobsCOM.JournalEntries oDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);
oDoc.GetByKey(Convert.ToInt16(TransID));
oDoc.DueDate = DateTime.Now;
oDoc.TaxDate = DateTime.Now;
oDoc.ReferenceDate = DateTime.Now;
int result = oDoc.Cancel();
if (result != 0)
{
oCompany.GetLastError(out Errcode, out ErrMsg);
oApplication.MessageBox("JE : " + ErrMsg, 1, "OK", "", "");
}
Hi All,
I have used above code for cancellation of JE.
Code is working fine.
Only issue here is TaxDate is not reflecting proper. It is showing the base JE date.
I don''t understand where i am wrong.