on 02-16-2010 2:50 PM
Hi,
I'm trying to use the SDK to add a journal voucher in a foreign currency. I set
oJournal.JournalEntries.Lines.FCCurrency = "USD";
but it doesn't seem to work. Is there anything else I need to do?
Hello Costas,
Basically yes, but take care: The G/L account should set to all currency (multi currency) to be able to post in FC. Go into sap, and try to add values on Vouchers.
Here is a sample code for issuing in FC a voucher.
Dim oJV As SAPbobsCOM.JournalVouchers = oCompany.GetBusinessObject(BoObjectTypes.oJournalVouchers)
oJV.JournalEntries.SetCurrentLine(0)
oJV.JournalEntries.VatDate = Today
oJV.JournalEntries.TaxDate = Today
oJV.JournalEntries.DueDate = Today
oJV.JournalEntries.ReferenceDate = Today
oJV.JournalEntries.Reference = "REF"
oJV.JournalEntries.Reference2 = "REF2"
oJV.JournalEntries.Memo = "MEMO"
oJV.JournalEntries.Lines.SetCurrentLine(0)
oJV.JournalEntries.Lines.AccountCode = "38610100"
oJV.JournalEntries.Lines.FCDebit = 0
oJV.JournalEntries.Lines.FCCredit = 100
oJV.JournalEntries.Lines.FCCurrency = "EUR"
oJV.JournalEntries.Lines.Add()
oJV.JournalEntries.Lines.SetCurrentLine(1)
oJV.JournalEntries.Lines.AccountCode = "38610100"
oJV.JournalEntries.Lines.FCDebit = 100
oJV.JournalEntries.Lines.FCCredit = 0
oJV.JournalEntries.Lines.FCCurrency = "EUR"
If oJV.Add <> 0 Then
sbo_application.MessageBox(oCompany.GetLastErrorDescription)
End If
Regards,
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try oJournalVouchers.JournalEntries.Lines.FCCurrency
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.