ISAppointment.TimesheetExpenses

Description

Expenses details incurred to provide a service.

Syntax

object.TimesheetExpenses

Part Attribute Type Description
object Required
The object always implements the ISAppointment interface
Restriction: This property is readonly.

Return Value

ISTimesheetExpenses

Example

Display the number of the patient's appointments invoiced as a result of processing the timesheet, and some expenses details incurred to provide a service.

Dim aPatient
Dim aProvider
Dim aFilter 
Dim aAppointments
Dim aFirstAppointment
Dim aTimeSheetExpenses
Dim aTimeSheetExpense
Dim aMessage

Set aPatient = Profile.SelectPatient
set aProvider = Profile.LoadProvider("MM")
set aFilter = Profile.CreateAppointmentFilter

aFilter.PatientId = aPatient.Id
aFilter.DateFrom = #01/01/2017#
aFilter.DateTo = #01/12/2019#

set aAppointments = Profile.LoadAppointments(aFilter)
if aAppointments.Count > 0 then
  set aFirstAppointment = aAppointments.Item(0)
  set aTimeSheetExpenses = aFirstAppointment.TimesheetExpenses
  aMessage = "Time Sheet Count = " & aTimeSheetExpenses.Count

for i = 0 to aTimeSheetExpenses.Count - 1
  set aTimeSheetExpense = aTimeSheetExpenses.Item(i)
  aMessage = aMessage & vbNewLine
  aMessage = aMessage & "There is an appointment with expenses = "
  aMessage = aMessage & aTimeSheetExpense.Amount 
next

Profile.MsgBox(aMessage)

else
Profile.MsgBox("aAppointments.Count = 0")
end if  
Note:

In Profile Client v8 on User Interface Timesheet Expenses can be found in Organisation > Control Centre > Timesheets > Expen field.

Version information

Added in v7.8.0