Why Does Sort Order Change Through Workflow From Estimate to Tax Invoice?

I thought I'd post this here as it's probably a bit more complicated than the run-of-the-mill User Forum topic.

When I bill out a procedure, I mentally walk the patient through the procedure, billing each item as I go.  This give me an invoice in that order I can check to see that I've included everything.  This works fine for a direct consult -> billing -> checkout where the screen display sorts from bottom to top in order of items added and the printed Tax Invoice the client gets is sorted correctly from top to bottom in order of items added.

However, when I do the same thing creating an estimate, the SCREEN display is "all over the shop".

The above image shows the screen display.  The numbers I've added were the order in which I added items creating the estimate.  If I "Preview" the estimate, creating a PDF that I can print out or give the client, the preview is arranged correctly in the order I entered them into the estimate (makes it easier to explain the costs) - see below:

Ok, so I perform the procedure and "Invoice" the "Estimate".  Now when I look at my invoice in the Invoice tab of the Visit Editor,  the invoice is now arranged completely differently - see below:

When I come to checkout, and view the invoice at the checkout screen, I have yet another sort order of items.

This then prints out the client tax invoice as yet ANOTHER sort order (which is not the screen display order reversed, which would make some sense) - see below:

So we have five different screen/print displays each with its own (unfathomable) sort order.

Is there any way to maintain the sort order in the workflow from Estimate -> Tax Invoice?  The sort order that changes at every step makes it hard to check that we've caught and billed all the items in a procedure.

Yuri.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Why Does Sort Order Change Through Workflow From ...

The estimate items are sorted on patient name, whereas the invoice items are sorted on date.

If you edit the act.customerEstimationItem archetype and untick the Hidden flag, you should see the Date column when you now edit estimates.

 

By default these will be sorted on ascending time, whereas the charge items are sorted on descending time.

When you invoice, each estimate item will have the timestamp assigned at its creation. Unfortunately, the database stores timestamps with only second accuracy. If it retained milliseconds, ordering would (nearly) be assured.

Anyway - try it and see if it helps. I suspect code changes will be required however.

-Tim

 

 

 

Syndicate content