Custom Debtor Allocations

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

Custom Debtor Allocations

Postby DannyC » Wed Mar 02, 2016 9:51 am

So I know this is for 6.5.13 but was hoping I could get a heads up on how to solve a problem, even this late in the 6.5.13 lifecycle!

I am developing a custom debtor allocation breakout which essentially matches the invoice InvRemitNo with the payments (or other credit) InvRemitNo. When a match is found, I am allocating the credit to the debit.
I am using the function
Debtor.Allocations.Add(TransAllocID As String, DebitTransID As String, CreditTransID As String, FXAmount As Double, DebitAmount As Double, CreditAmount As Double, DebitCurrencyRate As Double, CreditCurrencyRate As Double, DebitAged As Boolean, CreditAged As Boolean, DateAlloc As Date)

It seems to do the allocation successfully on the screen however when I save the debtor record, I get an error:
Error: DB_TransAlloc RowCount = 0
Module: clsDebtor.SaveRecord

Is there another step I need to do?
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Custom Debtor Allocations

Postby DannyC » Fri Jun 09, 2017 6:11 pm

Just getting back to this. Back last year when I posted the question I tried a workaround for the client.
I've just heard that it is not working too good. Yeah I know - over a year later!

So I really want an answer to the question about that error when saving the debtor.

To further explain the scenario, a debtor may pre-pay several payments for a sales order prior to the sales order getting processed. Basically lay by.
The first few characters of the payment InvRemitNo will identially match the sales order, so that when the sales order is finally paid in full & is processed, we can match the payments to the invoice. Based on the characters before the -D02 (or whatever the snapshot number will be).

When I was developing the breakout last year it seems I hit this error when saving the debtor. Just need an answer so I can close this little project.
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Custom Debtor Allocations

Postby DannyC » Fri Jun 09, 2017 6:23 pm

Just thinking into this further... In debtors maintenance is an Automatic Allocation functionality.
It works on date so allocates oldest to newest.

I'd love to be able to tweak it so it matches on the first 6 characters of InvRemitNo and the source of the debit is a Sales Order (fairly sure that would bd DB_Trans.Source = 0).

Can you dig out the code for the Automatic Allocation screen and post it here? Tried to use Telerik JustDecompile but it couldn't find it.
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron