Skip to main content

Time entry

A time entry is made up of two elements in Twinfield:

  • General information (header), such as company, user, date, project, activity, etc.
  • Time entry lines, of which there are two types:
    • Time lines.
    • Quantity lines.

A minimum of one time entry line must be provided.

Create/Update

If the journal transaction is not found it will be automatically created, otherwise it is updated.

Multiple transactions can be created at once by enclosing them by the transactions element.

Root

XML structure
<teqs>
<teq>
<header></header>
<lines></lines>
</teq>
</teqs>

Element name: teqs

NameDescription
teqnode

Element name: teq

NameDescription
headerContains general information about the time entry.
linesContains the time entry lines.
XML structure
<header>
<office></office>
<code></code>
<user></user>
<date></date>
<prj1></prj1>
<prj2></prj2>
</header>

Element name: header

NameTypeDescription
officecodeOffice code. Mandatory.
codeDIRECT
INDIRECT
PERSONAL
Transaction type.
usercodeThe user for which time is entered.
datedateThe date for which time is entered.
prj1codeThe project.
prj2codeThe activity.
accountsreceivablecodeThe customer code.
Read-only attribute.
authorisercodeThe authoriser of the time entry.
Read-only attribute.

Lines

XML structure
<lines>
<line></line>
</lines>

Element name: lines

NameTypeDescription
linesnode

Line

XML structure
<line type="TIME">
<duration></duration>
<description></description>
<billable></billable>
<ratecode></ratecode>
</line>
<line type="QUANTITY" id="">
<value1></value1>
<ratecode1></ratecode1>
<currency1></currency1>
<billable1></billable1>
</line>

Element name: line

NameTypeDescription
@typeTIME
QUANTITY
Time entry line type.
@idintegerRead-only attribute.
@internalintegerRead-only attribute.
@externalintegerRead-only attribute.
@unitsintegerRead-only attribute.
@nameintegerRead-only attribute.
@shortnameintegerRead-only attribute.
durationintegerThe duration entered in hours. No fractions are allowed.
Only if @type is TIME.
descriptionstringThe description of the time entry line.
Only if @type is TIME.
billable0
1
Is the time entry line billable (1) or not (0).
Only if @type is TIME.
ratecodecodeThe rate code.
Only if @type is TIME.
currencycodeThe currency code.
Only if @type is TIME.
Read-only attribute.
value1doubleThe number of quantities.
Only if @type is QUANTITY.
ratecode1codeThe rate code.
Only if @type is QUANTITY.
currency1codeThe currency code.
Only if @type is QUANTITY.
Read-only attribute.
billable10
1
Is the time entry line billable (1) or not (0).
Only if @type is QUANTITY.

XML Example

<teqs>
<teq>
<header>
<office>001</office>
<code>DIRECT</code>
<user>TEST</user>
<date>20211228</date>
<prj1>P0099</prj1>
<prj2>A010</prj2>
</header>
<lines>
<line type="TIME">
<duration>240</duration>
<description>Deploy</description>
</line>
<line type="QUANTITY">
<value1>1.5</value1>
</line>
</lines>
</teq>
</teqs>