cancel
Showing results for 
Search instead for 
Did you mean: 

Create a payment based on a journal entry document

csaba_fulopcsei2
Explorer
0 Kudos

Hello!

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

Accepted Solutions (1)

Accepted Solutions (1)

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Csaba,

If your code works fine in PL44, but doesn't work well in PL46,

Could you update to the latest path PL47 and test it again?

If still no luck, please create a message to SAP Support.

Thanks, Yatsea

csaba_fulopcsei2
Explorer
0 Kudos

Hello Yatsea Li!

Thanks your tip!

But The problem isn't solved in PL47.

Csaba

Answers (3)

Answers (3)

csaba_fulopcsei2
Explorer
0 Kudos

Hello,

When I cleared the local temporary dierctory (%temp%), the problem is solved.

Regards,

Csaba

Former Member
0 Kudos

I have the same problem with SAP 2007 SP00 PL46 but cleaning the %Temp% do nothing.

There is another solution ?

Thanks, Matteo

Former Member
0 Kudos

Dear Csaba Fülöpcsei,

Do you have the issue when add the same payment in B1 application?

Is the issue happen on other payment also or just for this payment?

Best Regards

Jane Jing

SAP Business One Forums team

csaba_fulopcsei2
Explorer
0 Kudos

Dear Jane Jing!

Yes I have a issue in B1 app for this payment:

In Incoming payments windows select the customer doctype and select the customer (310000010), and the list of the invoices check the line (1882, journal entry) and type 10000 in the Total Payment column. And after 'Payment Mean' icon, I can add the payment.

The problem is still on all payments of jourlnal entries from DI API.

If I assign any value to oPay.Invoices.SumApplied field, I couldn't add the payment.

Regards Csaba

csaba_fulopcsei2
Explorer
0 Kudos

Hello,

When I removed this line:

oPay.Invoices.SumApplied = 12000

the payment is added successfully.

But if I dont want to pay full invoice, I cannot create payment.