Hi
I want to automate payment allocation to invoices. Eg, if i have 1 payment that needs to be applied to 1 invoice and it needs to be allocated. I want this process automated rather than going into customer ledger and set applies to id and then post.
I wrote a code unit that takes the parameters and set applies to id, amount and applying entry for payment and invoice but posting fails.
I can't see any other entry that needs to be done before posting during Nav set aplies to id process.
I can't see any entry in gen journal line either.
Am I missing something that needs to be done before i execute CU 226 with the payment record ?
regards,
KS
0
Answers
Is this what you're looking for?
http://www.BiloBeauty.com
http://www.autismspeaks.org
:-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
](*,)
regards,
Manual and "Apply to Oldest".
Manual means that the program will apply payments only if you specify a document.
Apply to Oldest means that if you do not specify a document for the payment to be applied to, the program will apply the payment to the oldest of the customer's open entries.
Regards
No Man.. you are not getting the point. I am getting orders and then payments from other system through our written interfaces in nav. in order to allocate those payments , i am getting the allocations ( they can't come at same time as mostly payments get allocated later on) through interfaces.
Now I need to write a routine that picks up the sales payment and related invoices (I can filter them ) and allocate them.
I am trying to replicate the allocation process but facing issues.
so all i want to know if there is any example that some one give me or advise me the best way to do so.
We dont want to use the above given process as some times allocated amount is not equal to payment or some times payment is allocated to multiple invoices etc.
hope its clear now.
please advise.
regards,
2. generate a random applies-to Id and set "Applies-to ID" field on both gen. journal and cust. ledger entry.
3. call cu 103 to update cust. ledger entry..
you can look into report 393 to see how NAV can handle this..no need to use "Applying Entry" etc.. just "amount to apply" and "Applies-To ID" can solve your problem.
If you are geting error, please explain your problem in detail.
thanks this something i was looking for.
I did trying to set it cust ledger entry to amount to apply (validating it was setting the remaining amount i believe)
and was setting applied to id in cust ledger entry but not in gen. journal. and was calling cu 103 to update the entry and then was trying to post.
upon posting it finds that applying entry and applied to entry are same. i thinks this is due to missing applicatoin to g j entry.
I did look into GJ line table but i can't find any entry there.
Can you please advise me on this? am i looking at wrong table?
regards,
1- set the values of applying payment ledger entry (with out using code unit 103)
2- set the values of invoice ledger entry
3- passing the invoice entry to CustEntry-Apply Posted Entries
it does the job but I am not sure whether this will not cause any other issue. can some one please advise me on this.
here is the test code i wrote for this. Please feel free to comment on any thing in code. ill welcome it.
Did you find the solution? I facing the same scenario can you shave code or any helping materiel to solve this problem.