Suggest Vendor Payments Sorting

I recently upgraded my client from 2.50 to 3.60. In 2.50 when they would run the Suggest Vendor Payments, the payments would sort by the Document Date on insertion. With the upgrade it appears to sort by invoice number and they’ve requested to change it back to the old way. I thought this would be easy (and maybe it is and I’m missing something) - I would be able to go in and change the SETCURRENTKEY so that the vendor ledger entries were sorted by document date. Well, that didn’t work and now I’m at a loss as to how to change this in 3.60. Has anyone run into this request before? Any ideas? Thanks, Alyssa

quote:


In 2.50 when they would run the Suggest Vendor Payments, the payments would sort by the Document Date on insertion. With the upgrade it appears to sort by invoice number and they’ve requested to change it back to the old way.


I’m a bit confused here (…sorting by Document Date, Invoice No.??). Normally the generated Payment Journal will be sorted basically by (Priority,) Vendor No., (Currency Code) and Due Date. I don’t think that has been changed between ver. 2.50 and 3.60. Maybe your client has selected the key Account Type,Account No.,Applies-to Doc. Type,Applies-to Doc. No.instead of the default key Journal Template Name,Journal Batch Name,Line No.when viewing the Payment Journal?

Acutally it could be that it is sorting by Due Date instead of document date because they don’t have payment terms setup. But I’m still not getting it to sort by Due Date in 3.60. I ran a test in 2.50 of their old version to verify what they were telling me. Here’s an example: Vendor A Invoice 10 Document/Due Date = 9/30/03 Vendor A Invoice 15 Document/Due Date = 9/15/03 When running the Suggest Vendor Payments with no priority Invoice 15 would display before Invoice 10 because the Due Date is earlier. Now if I have the same data entered in 3.60 Invoice 10 displays before Invoice 15 because I’m thinking that it is sorting on the Invoice No. instead of the Due Date. The sort on the table is set to the PK (not Account Type, Account No…)

After having had a closer look at the code, it seems that you are correct. A new table (372 Payment Buffer) has been introduced (in ver. 3.10). The payments will be sorted by Vendor No.,Currency Code,Vendor Ledg. Entry No.,Dimension Entry No.This means that the payments will be inserted ordered by Vendor Ledger Entry No. (and thus in effect by Invoice No.). Mind you, in most cases this will also be correct with regards to the due date. I have no immediate suggestions for a workaround. [V]

Has anyone tried to add a key to the Gen. Journal Line. so that after the docs are selected they can be re-sorted by whatever you want?

It is VERY simple to modify the suggest payments routine, I normally add “SEARCH NAME” or something similar and use this as a key when the routine generates the Gen. Journal Lines. Don’t play with the sorting on the Gen. Jnl Line, it can cause errors with balance by Doc No by date. Have a look instead at how the Pick List sorting is generated. A similar meathod will work well for data entry, just be real carefull on how the table is sorted prior to calling the post routine.

Hi David, I’m a bit confused on your last response (and please excuse the ignorance as I’m a bit of a newbie). Where are you adding the Search Name key? H R - In 3.1 I made a similar change to bring the Document Date through to the Gen. Jnl Line table when the suggest was run, then I added a key to sort the table on that field. But with David’s response about sorting the table on post it makes me leery of doing it in the same manner… Any more thoughts or assistance?

Here’s my plan… add the Document Date to the Payment Buffer table and a key to sort on it. Then when I call the table from suggest I’ll set the key to the document date… see any potential issues here?

Use “Due Date” in stead - It will default to “Document Date” and you’ll be safeguarded if the client some day decides to use payment terms. Otherwise, be careful how you create the key - you still want the payments to sort by “Vendor No.”, “Currency Code” etc., right?

Good point, I changed the key to Vendor No., Date that way it still sorts by vendor then date. Thanks for everyone’s help!