Creditor Allocation confusion

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Creditor Allocation confusion

Postby pricerc » Fri Sep 04, 2009 3:31 pm

Hi again.

(In 6.5.13) I have the following snippet of code for allocating a payment to a purchase invoice:
Code:
Code: Select all
Set creditor = GetCreditor(creditor, creditorID)
    allocID = ""
   
    Set newAllocation = creditor.Allocations.Add( _
        allocID, _
        rs("DebitTransID"), _
        newItem.CRTransID, _
        newItem.SupplierTransAmount, _
        newItem.HomeTransAmount, _
        newItem.HomeTransAmount, _
        newItem.CurrencyRateUsed, _
        newItem.CurrencyRateUsed, _
        False, _
        False, _
        newItem.ReceiptDate)

    creditor.SaveRecord


where newItem is a JiwaCRBatchTX.clsCRBatchTranLine, and rs is an ADODB.RecordSet querying the Purchase Invoice.

It seems to work ok, except that when I look at the main creditor transaction screen, the transactions don't appear allocated. However when I click either transaction's 'allocate' button, it looks like it's already allocated, and it won't let me change anything.

Have I missed a step ?

/Ryan
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Creditor Allocation confusion

Postby Mike.Sheen » Thu Nov 12, 2009 2:31 pm

pricerc wrote:It seems to work ok, except that when I look at the main creditor transaction screen, the transactions don't appear allocated. However when I click either transaction's 'allocate' button, it looks like it's already allocated, and it won't let me change anything.

Have I missed a step ?

/Ryan


Hard to say - You're using the creditor maintenance business logic to do the allocation, right ? ie: the GetCreditor method returns an instance of JiwaCreditors.clsCreditor ?
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Creditor Allocation confusion

Postby pricerc » Thu Nov 12, 2009 4:41 pm

Hard to say - You're using the creditor maintenance business logic to do the allocation, right ? ie: the GetCreditor method returns an instance of JiwaCreditors.clsCreditor ?


Yes.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Creditor Allocation confusion

Postby Mike.Sheen » Fri Nov 13, 2009 9:58 am

pricerc wrote:Yes.


Well, that's pretty much how we do the allocation ourselves, so I'm at a loss as to why that doesn't work. I'll need a complete sample which will work on a database I have access to (eg: Demo data) to troubleshoot this some more.

Mike
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Creditor Allocation confusion

Postby pricerc » Fri Nov 13, 2009 11:09 am

Thanks Mike.

makes me feel a *bit* better.

I'm on a different project at the moment, so will have to go through it in detail when I can next fire up my 6.5.13 VM. Probably next week some time.

/Ryan
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Creditor Allocation confusion

Postby Mike.Sheen » Sat Nov 14, 2009 6:54 pm

pricerc wrote:Thanks Mike.

makes me feel a *bit* better.

I'm on a different project at the moment, so will have to go through it in detail when I can next fire up my 6.5.13 VM. Probably next week some time.

/Ryan


Ok, in the meantime I'll whip up a sample project that does what you're trying to achieve against demo data - I'll post it here, and perhaps that will assist.

One question : Do you want this to be in VS.NET (if so, which version - 2005 or 2008) or VB6 ?
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Creditor Allocation confusion

Postby pricerc » Sun Nov 15, 2009 11:24 am

Mike,

my code is all in breakouts (I'm trying to avoid having to load extra DLLs) - so VB6, I suppose.

/Ryan
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 3 guests