Dovico.TrackITAPI.CActualExpense.Save(System.String,Dovico.TrackITAPI.CStateInfo)
Function Overview:
Responsible for saving actual expense information to the database in the format actualexpense.xsd. Additional information for each expense, such as custom fields, notes, phone numbers, addresses, can also be saved.
Parameter List:
sXml - string - string of xml for expenses to be inserted/updated in the format actualexpense.xsd
siState - CStateInfo - State information needed to process the transaction
Returns
A string of xml containing the IDs of inserted and updated items.
Example:
// initialize a string of xml containing information to send
// Note that MARKUP should be -100 and AMOUNT should be 0 for non-billable expenses
string sXml;
sXml = "<ActualExpense:ACTEXPS xmlns:ActualExpense=\"http://www.dovico.com/schemas/actualexpense.xsd\">";
sXml += "<ACTEXP ID=\"-1\" PROJECT=\"99\" EMPLOYEE=\"412\" GROUP=\"109\" PURORD=\"Example\" ";
sXml += "DATE=\"2003-01-01T00:00:00\" INVNUM=\"Example\" AMOUNT=\"100\" MARKUP=\"25\" ";
sXml += "FIXED=\"100\" TAX1=\"1\" TAX2=\"2\" DESC=\"test description\" REQREI=\"T\" ";
sXml += "BILLABLE=\"T\" BILLED=\"F\" APPROVED=\"T\" ARCHIVE=\"F\" OUTSIDE=\"\">";
sXml += "</ACTEXP></ActualExpense:ACTEXPS>";
// call the method
string sResult = wsapi.MethodInvoke("ActualExpenseSave", sXml, stToken);