Wednesday, July 8, 2015

Sales Rep Filtering in Sales Orders and Quotes

BlueBox offers filtering restrictions for Sales Representatives/users in the system.

A Sales Rep. is assigned to a Sales Order or Quote automatically based on the user who creates the document. This can be set manually too, at the time of creation or on editing the document.

There are 3 main status types when it comes to restricting who can see Sales Orders or Quotes assigned to other Sales Reps:
  • If the user has 'admin' permissions for bb_sales_orders or bb_sales_quotes then they will be abloe to see (and filter) by all sales reps. There is also a bbsetting which allows this ability to be assigned no matter what the permissions of the user are:

    bb_sales - bbsetting_skip_sales_rep_filtering_on_pre_pipeline or
    bb_sales - bbsetting_skip_sales_rep_filtering_on_post_pipeline
  • If the user is not an 'admin' user for the module, then, by default the user will only be able to see their documents (ie where their user is set as the Sales Rep.)
  • Lastly, there is a setting which allows users to filter by their user for Sales Rep only - but can also search all Sales Orders by the other filter fields which are available:

    bb_sales - bbsetting_sales_rep_filtering_on_pre_pipeline_for_all_or_self or
    bb_sales - bbsetting_sales_rep_filtering_on_post_pipeline_for_all_or_self

    This last option is handy in teams where all users need to be able to access all Sales Orders, but should not be able to filter/total the sales of another user.

Sunday, July 5, 2015

Grid2CSV DOM DIV Grid to CSV exporter

For BlueBox coders, a new CSV conversion tool for CSS DIV grids.

This BlueBox function creates the 'excel/csv' icon as a link to a Javascript csv emulator - redirecting to a downloadable CSV file.

The key elements are to include the class-name  'csvrow' in all your row wrapper DIV elements, and the class-name 'csvcell' in all your cell DIV elements.

resp("

            ".grid2csv('grid2csvtest')."

            <div id=grid2csvtest>

                <div class='bb_list_row_header csvrow'>
                    <div class='bb_list_cell csvcell'>1</div>
                    <div class='bb_list_cell csvcell'>2</div>
                    <div class='bb_list_cell csvcell'>3</div>
                    <div class='bb_list_cell csvcell'>4</div>
                    <div class='bb_list_cell csvcell'>5</div>
                    <div class='bb_list_clear'></div>
                </div>

                <div class='bb_list_row csvrow'>
                    <div class='bb_list_cell csvcell'>a1</div>
                    <div class='bb_list_cell csvcell'>a2</div>
                    <div class='bb_list_cell csvcell'>a3</div>
                    <div class='bb_list_cell csvcell'>a</div>
                    <div class='bb_list_cell csvcell'>a5</div>
                    <div class='bb_list_clear'></div>
                </div>

                <div class='bb_list_row csvrow'>
                    <div class='bb_list_cell csvcell'>b1</div>
                    <div class='bb_list_cell csvcell'>b2</div>
                    <div class='bb_list_cell csvcell'>b3</div>
                    <div class='bb_list_cell csvcell'>b4</div>
                    <div class='bb_list_cell csvcell'>b5</div>
                    <div class='bb_list_clear'></div>
                </div>

                <div class='bb_list_row csvrow'>
                    <div class='bb_list_cell csvcell'>b1</div>
                    <div class='bb_list_cell csvcell'>b2</div>
                    <div class='bb_list_cell csvcell'>b3</div>
                    <div class='bb_list_cell csvcell'>b4</div>
                    <div class='bb_list_cell csvcell'>b5</div>
                    <div class='bb_list_clear'></div>
                </div>

            </div>
            ");