Wednesday, August 26, 2015

BlueBox Location Types

BlueBox ERP has a number of types which can be applied to any location:

Finished Goods Node: Defaults the "Finish At" location to the nearest Finished Goods node on works orders. Used as a pack to location when adding stock (GRN/WO Builds) if none set and the item has no default stock location. Also used as the default "From Location" on bb_sales_point_of_sale_tillslips and bb_sales_orders when allocating stock if there's no from/despatch location already set.

Despatch Node: Defaults the "Despatch From" to the nearest Despatch Node on sales orders.

Jobbing Node: Defaults the "Return To" location on inventory returns

Non Sales Node: Stops users from creating Sales documents within flagged locations. Also stops users from selecting flagged locations from within sales modules (ie. any To/From location selections) [NOTE: This is a recent change. before it blocked all non-sales locations on all docs]. Finally, it will also exclude flagged locations when checking for available stock when the To Document is not bb_manufacturing_works_orders/bb_inventory_pick_pack_slips (so applies to all other documents).

Non Transfer In Node: The "Deliver To" location cannot be a non-transfer in node on GRNs. It also excludes/blocks non-transfer in nodes in the "To Location" on Internal Transfer Notes/Pick Pack Slips.

Isolation Node: Stops these locations from being used as the source in auto-allocation of stock. However, it will not block stock requests if the primary from location is an isolation node (allowing stock to be manually moved into and out of isolation areas).

Exclude From Pick Slips: Stops these locations from being used in the "From Location" when generating a pick slip.

Write Off Node: Stock transfered into locations with this flag are automatically set to the Written Off status.

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>
            ");


Friday, June 26, 2015

Styling CSS Lists in BlueBox

For BlueBox coders, CSS lists can be neatly styled using some standard CSS classes:

Note the use of makeclickble() for the links.

...show the header row...

<div class=bb_list_row_header>
<div class=bb_list_cell>PO</div>
<div class=bb_list_cell>Date</div>
<div class=bb_list_cell>Item</div>
<div class=bb_list_cell_right>PurchQty</div>
<div class=bb_list_cell_right>PurchUnit</div>
<div class=bb_list_clear></div>
</div>

...then loop through your list items...

<div ".makeclickable("/?some_url","_blank")." class=bb_list_row>
<div class=bb_list_cell>$po[_id]</div>
<div class=bb_list_cell>".date("d M Y",strtotime($po[transaction_date]))."</div>
<div class=bb_list_cell>".$row[item_data][name]."</div>
<div class=bb_list_cell_right>".$row[qtyNUM]."</div>
<div class=bb_list_cell_right>".$row[unit_name]."</div>
<div class=bb_list_clear></div>
</div>

Wednesday, June 24, 2015

Redirects Module

A new BlueBox redirect module has been created to handle redirecting and issuing of 404 Page Not Found errors when front-end web content changes or is moved.

The module can be accessed via Publishing -> URL Redirects. The following fields are available when setting up a new redirect:

Url: This is a part or the full url that needs to be redirected. It excludes the host. ie: /?login . It  can also be blank (will redirect the entire domain)

Type: A redirect can be either Permanent, Temporary, 404 or Template. The correct type should be chosen to indicate to any search engines how this url should be handled. For 404 (Not Found) and Template, the Template box can be used to display a custom message.

Redirect Url: If Permanent or Temporary type is chosen, the destination url should be set here.

Template: If Template or 404 type is chosen, a custom template can be set to display.

User Logged In: Will apply the redirect/template to only users either logged in, logged out, or both.

Order: Will prioritize redirects should multiple redirects match the same url. Only one redirect will be run.

Redirects take priority over all module/page links, and so should be used only when necessary.

Monday, June 22, 2015

Web Caching in BlueBox

A new front-end caching feature has been introduced into Bluebox. This allows for mostly static, front-end content to be cached to speed up load time and reduce overall server load.

Caching is turned on via the following config settings:

 $system_cache_frontend_pages=0; //caches non-system/logged out pages
 $system_cache_frontend_pages_period=24; //number of hours before refreshing the cache

Setting $system_cache_frontend_pages = 1 will trigger the system to start caching pages as they're generated, while the period (in hours) will determine how long a page will be cached for before being refreshed.

Front end caching will be affected by the following

1. Caching is only utilized when there's no user session (ie. logged out)
2. "Post" request methods always ignore caching (such as sending contact forms).
3. Caching can be manually ignored by adding $global['nocache']=1 to the url string
4. Front-end template groups can be set to ignore caching by adding them to the bb_web_cache bbsetting: bbsetting_exclude_templates
5. Specific urls (that would otherwise be included in caching) can be excluded from caching by setting them in bb_web_cache bbsetting: bbsetting_exclude_urls - does partial matching
6. Any url with a "class" variable set ignores the cache
7. However, it is possible to include urls with "class" in them by setting them in bb_web_cache bbsetting: bbsetting_include_urls - does partial matching

The cache can be flushed manually by going to Publishing -> CMS -> Web Cache from the main LHS menu.

Cache can also be flushed via code by calling bb_web_cache->flush()  . An optional "pattern" parameter can be passed to only flush cache files matching the pattern. It must be a regular expression. This is useful when used in conjunction with a POST plugin function on a module that affects front-end pages (deleting the cache on changes to fresh the content immediately).

New Matcha/Captcha Module in BlueBox

BlueBox coders will be interested to note a new captcha/matcha module, which is configured as follows:

Basically, it uses JS to hook into an image to display the captcha (so it can be used for caching). it's called using bb_captcha::init()

e.g.

<img src="" id="matcha-img" />
<!--:class:bb_matcha:init:-->

it takes an optional "where" parameter to specifiy the img ID if different:

<img src="" id="matcha-custom-img" />
<!--:class:bb_matcha:init|matcha-custom-img:-->

the matcha is checked as normal via the $_SESSION['matcha'] value.