Special Utilities

Any of these programs should only be run by the individual in the business who is allocated the task of administering the system, who has a thorough understanding of the system. If in doubt seek advice. Many of these utilities perform major changes to the database and it is always advisable to have a backup before attempting to run one. All these utilities have a page security setting of 15 by default (see security schema).

The Utility menu is a separate module so access can be turned off to hide these utility script links by turning off the Utilities module in user settings. All utlity pages are prefixed with a Z_.

Change A Customer Code

This page requires the entry of an existing customer code and the new customer code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing customer does exist. If all is well then the customer code data is changed in all tables throughout the system that refer to the customer code.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.

Change A Customer Branch Code

.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.

Change A Supplier Code

.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.

Change A Stock Category Code

.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.

Change An Inventory Item Code

This page requires the entry of an existing stock code and the new stock code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing item does exist. If all is well then the stock code data is changed in all tables through-out the system. Sales analysis, stock movements, stock locations, Bills of Material, parent and component items, sales order details and purchase order details as well as the Stock Master, pricing and shipment charges.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.

Change A GL Account Code

.

WARNING: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours when others are using the system.

Change A Location Code

.

Translate Item Descriptions

This utility uses the Google Translator API to automatically translate item descriptions (short and long part descriptions).

It translates from the item description in the default language (It was set up in $DefaultLanguage in config) to the languages to maintain translations for item descriptions (They were set up in Main Menu > Setup > General Setup Options > System Parameters > General Settings). It only translates descriptions of items that are current (stockmaster.discontinued=0).

It requieres a Google Translator API Key (more info in https://cloud.google.com/translate/) to allow automatic translations.

See also: In Inventory (aka "Stock"), Review Translated Descriptions.

Update costs for all BOM items, from the bottom up

.

Re-apply costs to Sales Analysis

This utility allows a period to be selected for which the current standard cost is applied to the quantities recorded in the sales analysis as sold to re-calculate the cost of goods sold.

It is important to realise that this will destroy the integrity of the matching general ledger journals created at the time of invoicing and that the GL cost of sales will no longer match with the sales analysis cost of sales.

However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.

Copy Authority of GL Accounts from one user to another

This utility allows you to the copy access rights to general ledger accounts from one user to another. This utility overwrites all the access rights of the destination user.

Debtors Balances By Currency Totals

This script is an utility to show debtors balances in total by currency.

Suppliers Balances By Currency Totals

This script is an utility to show suppliers balances in total by currency.

Make Stock Locations

If the inventory database is imported from some other system, the stock location records can be created for all locations currently defined by running the script Z_MakeStockLocns.php. Inventory items will not appear on searches during entry of sales orders until their corresponding inventory locations records exist.

Repost General Ledger from Period

This script Z_RePostGLFromPeriod.php clears the actual data in the table ChartDetails - that contains the movements in each GL account, the movements are then re-calculated by setting all GLTrans to unposted and re-running the posting of all these transactions. This is a desperate measure that should only be undertaken in an extreme situation. Maybe a corrupt database or system crash etc that caused an out of balance trial balance.

Maintain Language Files

We use gettext as the internationalization and localization (i18n) system to write a multilingual program. The most commonly used implementation of gettext is GNU gettext, released by the GNU Project in 1995 as a free software implementation of the system.

Source code is first modified to use the GNU gettext calls. This is done by wrapping strings that the user will see in the gettext function. To save typing time, and to reduce code clutter, this function is commonly aliased to _, so that the PHP code:

echo gettext('Maintain Language Files');

would become:

echo _('Maintain Language Files');

Comments (starting with ///) placed directly before strings thus marked are made available as hints to translators by helper programs.

Rebuild the System Default Language File

This script Z_poRebuildDefault.php runs xgettext on the sources to produce a .pot (Portable Object Template) file, which contains a list of all the translatable strings extracted from the sources. The resultant system default language file (.pot file) is saved in the .../locale/en_GB.utf8/LC_MESSAGES/messages.po path.

Add a New Language to the System

This script Z_poAddLanguage.php adds a new language to the system, by creating a new language file (.po file) from the system default language file (.pot file).

.

Edit a Language File Header

.

Edit a Language File Module

.

Edit Remaining Strings For This Language

.

Download messages.po file

.

Download messages.mo file

.