ISInvoiceLines.Item

Description

Each of the invoice lines within the collection.

Syntax

object.Item(aIndex)

Part Attribute Type Description
object Required
The object always implements the ISInvoiceLines interface
aIndex In, Required
int
The index of the invoice line
Restriction: This property is readonly.

Return Value

ISInvoiceLine

Example

Display the number of the invoices loaded on the basis of the selected filter and some information about the invoice lines related to them.

Dim aPatient
Dim aFilter
Dim aInvoices, aInvoice
Dim aInvoiceLines, aInvoiceLine 
Dim aMessage
Dim i    

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateInvoiceFilter
aFilter.PatientId = aPatient.ID
set aInvoices = aFilter.Load

aMessage = "Invoices Count = " & aInvoices.Count & vbNewLine

for i = 0 to aInvoices.Count - 1
  set aInvoice = aInvoices.Items(i)
  set aInvoiceLines = aInvoice.InvoiceLines 
  aMessage = aMessage & (i + 1) & ". " &_
    "Date: " & aInvoice.Date & vbNewLine &_
    "    ID: " & aInvoice.ID & vbNewLine &_
    "    Income Provider: " & aInvoice.IncomeProvider.FullName & vbNewLine &_
    "    Invoice Lines Count: " & aInvoiceLines.Count & vbNewLine 
  for j = 0 to aInvoiceLines.Count - 1
    set aInvoiceLine = aInvoiceLines.Item(j)
    aMessage = aMessage &_
      "     -Description: " & aInvoiceLine.Description & vbNewLine &_
      "     -Service Code: " & aInvoiceLine.ServiceCode & vbNewLine
  next 'j    
next 'i    

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Invoice Lines can be found in Financial > Audit Transactions > Invoices > Open the selected invoice.

Version information

Added in v7.8.0