ISInvoiceLine.LoadDebitLines

Description

This function loads the debit lines associated with the invoice.

Syntax

object.LoadDebitLines()

Part Attribute Type Description
object Required
The object always implements the ISInvoiceLine interface

Return Value

ISFinancialTransactionLines

Example

Display the number of the invoices loaded on the basis of the selected filter and some information about the invoice lines, including the amounts of the debit lines.

Dim aPatient
Dim aFilter
Dim aInvoices, aInvoice
Dim aInvoiceLines, aInvoiceLine
Dim aDebitlines, aDebitline 
Dim aMessage
Dim i, j, k    

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 & vbNewLine & (i + 1) & ". " &_
    "Date: " & aInvoice.Date & vbNewLine &_
    "    Invoice Lines Count: " & aInvoiceLines.Count & vbNewLine 
  for j = 0 to aInvoiceLines.Count - 1
    set aInvoiceLine = aInvoiceLines.Item(j)
    set aDebitlines = aInvoiceLine.LoadDebitLines 
    aMessage = aMessage & (i + 1) & "." & (j + 1) &_
      " -Description: " & aInvoiceLine.Description & vbNewLine &_
      "      -Date Time From: " & aInvoiceLine.DateTimeFrom & vbNewLine &_
      "      -Date Time To: " & aInvoiceLine.DateTimeTo & vbNewLine &_
    for k = 0 to aDebitlines.Count -1
      set aDebitline = aDebitlines.Item(k)
      aMessage = aMessage & "      -Debit line amount: " & aDebitline.LineAmount & vbNewLine
    next 'k     
  next 'j    
next 'i    

Profile.MsgBox(aMessage)  
Note:

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

Version information

Added in v7.8.0