Save

 

Dovico.TrackITAPI.CTempActualExpense.Save(System.String,Dovico.TrackITAPI.CStateInfo)

 

 

Function Overview:

Saves timesheet entry tools (TEMPACTEXP) actual expenses to the database. Actual expenses need to be specified in the tempactexp.xsd format. Note that a new expense guid is FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF or CONSTANTS.RECORD_NEW_GUID.

 

 

Parameter List:

sXml - string - string of xml in the format tempactexp.xsd for the expenses you wish saved in TEMPACTEXP table

siState - CStateInfo - State information needed to process the transaction

 

Returns

A string of xml containing the IDs of inserted and updated items.

 

Example:

// build up xml to insert an unapproved expense into the database

// (this will not be seen by reports in pro until it has been submitted

// and approved)

string sXml = "<TempActualExpense:TEMPACTEXPS xmlns:TempActualExpense=\"http://www.dovico.com/schemas/tempactexp.xsd\">";

sXml += "<TEMPACTEXP ID=\"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF\" PROJECT=\"99\" ";

sXml += "EMPLOYEE=\"412\" GROUP=\"109\" DATE=\"2003-02-02T00:00:00\" ";

sXml += "PURORD=\"Example PO\" INVNUM=\"Example RN\" AMOUNT=\"99.99\" MARKUP=\"0\" ";

sXml += "FIXED=\"0\" TAX1=\"1\" TAX2=\"2\" DESC=\"Test description\" REQREI=\"T\" ";

sXml += "BILLABLE=\"T\"/></TempActualExpense:TEMPACTEXPS>";

// call the method to add the new expense

wsapi.MethodInvoke("TempActualExpenseSave", sXml, stToken);