ISInvoice.SecondPayer

Description

The second payer expected to cover the invoice.

Syntax

object.SecondPayer

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

Return Value

ISPatient

Example

Display the number of the invoices loaded on the basis of the selected filter and some information about them, including the second payers expected to cover the invoices.

Dim aPatient
Dim aFilter
Dim aInvoices, aInvoice
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)
  aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
    "Date: " & aInvoice.Date & vbNewLine &_
    "    ID: " & aInvoice.ID & vbNewLine &_
    "    GUID: " & aInvoice.GUID & vbNewLine &_
    "    Pos Code: " & aInvoice.PosCode & vbNewLine &_  
    "    Reference: " & aInvoice.Reference & vbNewLine
  if not aInvoice.SecondPayer is nothing then   
    aMessage = aMessage & "    Second Payer: " &_
      aInvoice.SecondPayer.SurnameFirstName & vbNewLine
  end if     
next    

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Second Payer can be found in Financial > Invoice > 2nd Payer field.

Version information

Added in v7.8.0