on 04-08-2009 3:45 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
When I cleared the local temporary dierctory (%temp%), the problem is solved.
Regards,
Csaba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.