Problem with the order of custom fields on invoices

Hi everyone. I found a “problem” with the order on custom fileds on invoices and I would like to know if you can help to solve this.

Here’s the how I have the order in “Custom Fields” Section:
(Im guessing that’s the order that will appear on invoices).

Now here’s how on Form Defaults (In Edit Sales Invoice) appear:

It’s in the same order as in Custome Field Section.

But now, here is the problem. When I’m invoicing, it is the same order as the two images. But when I save it and print it the order has changed. (And I want the order as the first two images).

As you can see the “Ordered By” Section has changed to the bottom instead of being in the top (I want that section to be at the top). How can I choose the order of those custom fields?
Hope I made myself explained (Let me know if not)
Thank you.

Enter Position numbers in your custom field definitions, which controls the order of appearance. Without them, the PDF generator can take over. You also did not say whether you are doing this with a custom theme.

Thank you @Tut. Now with position numbers worked. About the Custom Theme, I can’t tell you if I’m using it or not. The problem is that I’m still learning the features of Manager. So I really don’t know but I dont think I a have a custom theme applied. Greetings

You should know if you are using a custom theme, because you would have written (or at least loaded) the code yourself. To be sure, look at the Edit screen of an invoice to see if the Custom theme box is checked. If it is, the theme in use will be displayed. Anything besides Plain is either an additional, built-in theme or a custom theme. See this Guide:

I’m using the Plain theme. Later on I will check those custom themes. Thank You

The only reason I asked about custom themes was that you might have made a coding error that was responsible for your problem. Since you are not using one, you can forget I asked. Your problem was completely resolved by use of Position numbers, and there is nothing else to do.