CashBookTransaction type Debtor  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

CashBookTransaction type Debtor

Postby neil.interactit » Thu Jun 18, 2015 3:07 pm

Hi guys,

Could you provide some guidance adding a "debtor" cashbook transaction ...

Code: Select all
                Dim newKey = 0
                cashBook.AddNewTransaction(payment.TransactionType, "", newKey)
                Dim newCashBookLine As JiwaCashBook.CashBookTransaction = cashBook.CashBookTransactions(newKey)


This snippet is in a loop, working repeatedly while payment.TransactionType = Other {0}, but the 3rd line fails when payment.TransactionType = Debtor {1} ... the newKey (normally a GUID) is 0 in this case ... causing the error "collection index must be 1 to the size of the collection".

Could you advise how to (correctly) create a debtor cashbook transaction? (Could you include how to attach the debtor too)?

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: CashBookTransaction type Debtor  Topic is solved

Postby Mike.Sheen » Thu Jun 18, 2015 3:12 pm

Hi Neil,

What you have is close - you just need to pass the debtorID to the AddNewTransaction method:

Code: Select all
ReturnCode = _CashBook.AddNewTransaction(JiwaCashBook.CashBookTransactionCollection.TransactionTypes.Debtor, DebtorID, newKey)
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: CashBookTransaction type Debtor

Postby neil.interactit » Thu Jun 18, 2015 4:16 pm

Sweet! Thanks.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests