Topic: Adding Item Category Filter to the core

@braathwaate has provided an item category filter mod that can be included in the core.

The attachment has the diff file and the file set for the current core version.

@joe: want to include it into the core?

Post's attachments

Category_Filter_code.zip 29.5 kb, 7 downloads since 2018-07-03 

You don't have the permssions to download the attachments of this post.

Re: Adding Item Category Filter to the core

Yes this is Necessary. We shall add this in the Core

www.boxygen.pk

Re: Adding Item Category Filter to the core

The patch contains only changes in stock_items list helpers, which are not necessary. You can have the same effect on the current FA version passing required filter in 'where' options, e.g.:

stock_items_list('stock_id', null, false, array('where'=>'s.categpry_id='.$filter_cat));

Janusz

Re: Adding Item Category Filter to the core

This is good to use when the customers has more categories and each one has more items.

But the feature has to be used in reports page mainly. 

Rep306 - Inventory Purchasing Report    has the items category, when the user select a category, we can shortlist the items in the list on the next drop down.  So its good to use this feature.

And i have one more suggestion, if possible we can use the "get_post()" within the list function like this.

if (get_post('category') )
        $sql .= " AND s.category_id='" . get_post('category') . "'";
Subscription service based on FA
HRM CRM POS batch Themes

Re: Adding Item Category Filter to the core

As stated above proposed changes in list helpers functions are not necessary, so the patch will not be integrated.  But, yes, using get_post() is encouraged in such a context.
J.

Re: Adding Item Category Filter to the core

Good to know.  The setting can be made in the $opts array (fifth argument):

stock_items_list('stock_id', null, false, false, array('where'=>'s.category_id='.$filter_cat));