1 (edited by tom 05/11/2009 06:15:55 pm)

Topic: base_stock_items_list()

In includes/ui/ui_lists.inc

The order by is simply: s.description

It also includes the category description so if different categories have similar named products you will get the stock listed in alpha sort with the same category names interspersed.

Maybe a better sort order would be c.description,s.description so we group the items within one category together and then sort the stock items

tom

ps. what is MB_FLAG = 'K' ? (s.mb_flag='M' OR s.mb_flag='K')

Re: base_stock_items_list()

Well, I'm not sure about the right order. The optimal choice probably depends on logic used to assign code to item.

Regarding 'K' flag I have to say you are very watchful observer smile. It is some very old relict. It seems to be used as mark for item kits, but currently we have this implemented in another way. To be cleaned up.

Janusz

Re: base_stock_items_list()

The reason I suggest that ordering is the pull-down list is constructed like this:

Category:
    product
    product
Category:
   product
   product

They are sorted by item Description, not stock_id

So I Ended up with

Category1
    product1
Category2
    product2
Category1
    product3
Category2
    product4
Category1
    product5
Category2
    product6
Category1
    product7
Category2
    product8

Since the items are displayed by category, maybe we should order them that way on the search?

tom