Description
A child object of Documents object representing the installments feature in marketing documents.
Source tables: INV6, OPCH6.
Object Model
Remarks
Example
| Creating Document with Two Installments (Visual Basic) | Copy Code |
|---|
Sub Installments
Try
Dim oInv As SAPbobsCOM.Documents
Dim oIns As SAPbobsCOM.Document_Installments
oInv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
oInv.CardCode = Some Card Code
oInv.DocDueDate = Doc Date
If optApplyTaxFirst.Checked = True Then
oInv.ApplyTaxOnFirstInstallment = SAPbobsCOM.BoYesNoEnum.tYES
End If
oInv.Lines.ItemCode = Some Item Code
oInv.Lines.Quantity = Quantity
oInv.Lines.Price = Price
oIns = oInv.Installments
oIns.DueDate = Installment #1 Date
oIns.Percentage = Percentage
oIns.Add()
oIns.DueDate = Installment #2 Date
oIns.Percentage = Percentage
lRetCode = oInv.Add
If lRetCode <> 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
MsgBox(lErrCode & " " & sErrMsg)
Else
MsgBox("Invoice Added to DataBase", MsgBoxStyle.Information, "Invoice Added")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub |
|
See Also