Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create a payment based on a journal entry document


In SBO 2007A PL44 I could add an incoming payment based on journal entry, but my code doesn't work in PL46.

It's a bug?

The Code:

        Dim oPay As SAPbobsCOM.Payments = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)

        oPay.DocType = SAPbobsCOM.BoRcptTypes.rCustomer
        oPay.DocDate = Today
        oPay.TaxDate = Today
        oPay.DueDate = Today
        oPay.VatDate = Today

        oPay.CardCode = "310000010"

        oPay.Invoices.DocEntry = 1882
        oPay.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry
        oPay.Invoices.SumApplied = 12000

        oPay.CashAccount = "38117000"
        oPay.CashSum = 12000
        oPay.DocCurrency = "Ft"

        If oPay.Add <> 0 Then
            Dim errCode As Integer = 0
            Dim errmsg As String = ""

            oCompany.GetLastError(errCode, errmsg)
        End If

I got the following error:

errCode: -10

errMsg: Cannot pay partial down payment

Regards Csaba

Edited by: Csaba Fülöpcsei on Apr 8, 2009 4:49 PM

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question