How to Add line numbers to sales invoices

https://www.manager.io/guides/10303

I have seen this guide and added line numbers for front end view of the Sales Quote (others) a long time ago, but is there some similar code to add line item numbers to the backend of Sales Quote (others) when in the editing mode?
image
image

@OCPL, you need to explain what you mean by “backend” and “when editing.” When editing what?

Edited to make more clear + refer to the 2x images

Your edits do not help, as they do not answer my questions. In fact, you have introduced more uncertainty. What do you mean by “Sales Quote (others)?”


“Sales Quote (others)?” means Sales Order, Sales Invoice, Credit Note, Delivery Note, Purchase Quote, Purchase Orders, Purchase Invoices, Debit Notes, Goods Receipt and any others I missed

This topic has a solution " Add line numbers to themes | Manager " for changing the source code to add the line items to the front end (or select ‘View’) but not the backend (or select ‘Edit’ )

Well, if I was going to use your terminology, I would call the Edit screen the front end, since that is where you enter the data. I would call the View screen the back end, since that is the result.

Regardless, you cannot add line numbers on the Edit screen. They are not present because Manager has no use for them. The View screen is displayed by the code of the theme. A custom theme combines data passed to it by the program with information you add with your code. In the case of line numbers, you have added those. They are not in the database, but appear only when the transaction is displayed by your theme.

Terminology … as a website developer/coder myself, we would typically refer to the backend as server side or in CMS the area the admin edits content, and the front end as the client side or in CMS the area the visitor views the output, hence my references.

In reference to my main point on the lack of line-item numbers on the backend (edit mode), the point is not whether or not “Manager has a use for them”… it’s more about why people like me, “the users may have a use for them”, which is why we take the time to post these suggestions in the forum to share our experience & ideas with the developers.

Try to look at this from the other direction, ask instead why do people like me request these features? what functionality/purpose does it serve us? does it improve the product? can it be coded easily? y/n

In software development, there is not only the core algorithmic functionality, but also the work behavioural sciences of the typical work flow interface requirements of users.

For me, when I am doing a contract review on a lengthy quotation with say >20 line items, each with subtly different descriptions per line item and comparing this to a clients RFQ and a vendors quotation, and using the matching line numbers to assist with proof reading the line items are accurate (verbatim), it is easy to lose your place when you have scrolled down and can no longer see the first line item (especially if you need to stop and restart the process repeatedly).

In fact I’d go much further and say that I feel the current method of expecting the users to copy/paste in the code for the numbers to appear on the view mode is poor practice, and that the code should be already built in with a switch to turn on or off per user requirement, for both the front and back end environments, in much the same way as the option to have totals visible/hidden.
image