Wrong Copy To Credit Note references

I noticed recently that when I did a filtered list of invoices and started copying them one by one to individual credit note while using the navigation to scroll down the list that the list kept changing underneath my filtered view.

Example 1: Original filtered

Invoice Balance Due
1 50
2 100
3 150

What happens when I copy Invoice 1 to a Credit Note is that the order becomes this.

Example 2: Filtered list after invoice 1 was copied to Credit Note

Invoice Balance Due
2 100
3 150
1 0

Now when I press next this brings me to Invoice 3 skipping invoice number 2.

At the surface this seems benign until you realize that for longer lists, you are bound to go over the same invoice twice while skipping half of the list, but I am too lazy to provide a longer example. However, anyone can test this for themselves.

In my case, this resulted in some invoices getting credited twice while some other invoices were not credited. Also I was doing the list for a single customer so the application is screwed up but statement balance was correct, but if the list contains invoices of multiple customers then the customer balances will be wrong because of this.

This is very similar to another post I made regarding scrolling through a filtered list. See Erratic behavior of Next and Previous buttons

I think that this should be a bug because it only produces unexpected result which would only baffle users.

If you make new transaction (or edit transaction) while using Next / Previous buttons, you might change the order of transactions on the page you came from.

This will affect Next / Previous buttons.

In other words, if you clicked on View button within a list that has 100 rows. And you clicked on row 7. The Next button will give you row 8. If you do something that will change the order on the list, it won’t change the fact the Next button will give you whatever is at row 8.

One solution is that if you did something that has changed the order then next button could take you back to the list you came from.

I know, and it is very confusing having to chase around where you were and where you are supposed to be.

Yeah, all you need is a static list for the view mode that will not be changed unless you go back to the main tab. You just need to handle any deletions by displaying something like “This transaction has been deleted” in place of the document, in case the user scrolled back to a deleted entry.