4,976

(7 replies, posted in Announcements)

Additional fixes after release of FA v2.3.22 are attached to this post.

Other mods are in my Unofficial Git Repo.

4,977

(7 replies, posted in Announcements)

The following new config variables have been introduced in FA v2.3.22:

    /* Show average costed values instead of fixed standard cost in report, Inventory Valuation Report */
    $use_costed_values = 0;    
    
    /* Print Item Images on Sales Quotations. Set to 1 if so. */
    $print_item_images_on_quote = 0;

    /* UTF-8 font for Business Graphics. Copy it to /reporting/fonts/ folder. */
    $UTF8_fontfile    = "FreeSans.ttf";

Attached is the changed filesset. No changes to DB.

4,978

(1 replies, posted in Modules Add-on's)

Negative Depreciation should work like appreciation - please let us know.
Hope you have trigger permissions for the db.

4,979

(1 replies, posted in Banking and General Ledger)

What type of creditors are you referring to and what different kinds of "management" are you intending?

4,980

(3 replies, posted in Installation)

Either use some REST API or do a curl post into FA.

4,981

(5 replies, posted in Banking and General Ledger)

Joe / Janusz - this needs to be in the core. Thanks @cambell!

Why not buy back the empty ones for a price with/without VAT?

4,983

(2 replies, posted in Setup)

You might want to generate it with a timestamp if it is entirely random, but yes, it needs to be renamed manually for now.

4,984

(5 replies, posted in Setup)

Temporary fix is here:
https://www.drupal.org/node/2057703

I could not yet find a link on your website for it. Did you tag it properly? An explicit link in the forum would be nice.

When you exported the csv file you had some earlier entry - delete it in the csv and populate the csv with other items that have not been entered as yet and then import it.

A reboot of the Debian machine now shows:

# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

And all works well!

By default a Debian System has the locale as "C" and the output of locale bash command is:

# locale
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

This means that when testing for LC_ALL we will always get it as false in the includes/lang/gettext.php:

    function set_language($lang_code, $encoding)
    {
        putenv("LANG=$lang_code");
        putenv("LC_ALL=$lang_code");
        putenv("LANGUAGE=$lang_code");

        //$set = setlocale(LC_ALL, "$lang_code");
        //$set = setlocale(LC_ALL, "$encoding");

        // cover a couple of country/encoding variants 
        $up = strtoupper($encoding);
        $low = strtolower($encoding);
        $lshort = strtr($up, '-','');
        $ushort = strtr($low, '-','');

        if ($lang_code == 'C')
            $set = setlocale(LC_ALL,'C');
        else
            $set = setlocale(LC_ALL, $lang_code.".".$encoding, 
                $lang_code.".".$up, $lang_code.".".$low,
                $lang_code.".".$ushort,    $lang_code.".".$lshort);

        setlocale(LC_NUMERIC, 'C'); // important for numeric presentation etc.
        if ($set === false) 
        {
            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') // don't do this test if server is WIN
                return 0;
            $str = sprintf('language code "%s", encoding "%s" not supported by your system',
                $lang_code, $encoding);
            //$err = new GetText_Error($str);
            //return PEAR::raise_error($err);
            return raise_error("1 " . $str);
        }
        //return 0;
    }

This raises the error in tmp/errors.log each time the FA scripts are executed:

[26-Sep-2014 00:44:58] 1 language code "en_US", encoding "iso-8859-1" not supported by your system

Commands tried to no avail:
  locale
  locale-gen
  locale-gen en_US
  dpkg-reconfigure locales

Contents of installed_languages.inc:

$installed_languages = array (
  0 => 
  array (
    'code' => 'C',
    'name' => 'English',
    'encoding' => 'iso-8859-1',
  ),
  1 => 
  array (
    'code' => 'en_US',
    'name' => 'English US',
    'encoding' => 'iso-8859-1',
    'path' => 'lang/en_US',
  ),
);

$dflt_lang = 'C';

lang/en_US/LC_MESSAGES/en_US.mo exists.

Possible solution link:
http://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html

where it is suggested to make it:

        if ($lang_code == 'C')
            $set = setlocale(LC_ALL,'');
        else
..
..

4,989

(3 replies, posted in Reporting)

The "Only Balances" Checkbox.

4,990

(0 replies, posted in Installation)

Those who want to distribute their own extensions especially unsigned ones can refer this Post. It contains some extra entries in the config.php.

The current config.php (config.default.php) file is updated and explained in the Wiki.

Attached is the Offline version.

4,991

(9 replies, posted in Modules Add-on's)

My GitHub Repo has been updated with the latest extensions.

4,992

(1 replies, posted in Modules Add-on's)

The wiki has been updated with how FA handles such issues by either assigning unique Security Areas (>=100) or overriding core functionality (when < 100).

Hence extension developers are advised not to hardcode any logic based on Security Area Code (number) but rather on their names.

4,993

(31 replies, posted in Modules Add-on's)

When we import items using the extension import_items, the data goes into the item_codes table and a corresponding entry goes into the stock_master and loc_stock tables

Images of the items can be named as ITEMCODE.jpg and placed in the company/#/images/ folder.

You're right, SQL seems better since the issue of prices and stocks need to be dealt with separately in the extension.

I have now documented it in the Wiki.

4,994

(0 replies, posted in Modules Add-on's)

$module_name is a property in the hooks class in hooks.inc and is assigned in the extensions' hooks.php:

 
  extensions\Extensions\asset_register\hooks.php
    Line 6:     var $module_name = 'asset_register'; 

  extensions\Extensions\auth_ldap\hooks.php
    Line 22:     var $module_name = 'auth_ldap'; // extension module name.

  extensions\Extensions\dashboard\hooks.php
    Line 13:     var $module_name = 'dashboard';

  extensions\Extensions\import_items\hooks.php
    Line 4:     var $module_name = 'Import CSV Items'; 

  extensions\Extensions\import_multijournalentries\hooks.php
    Line 5:     var $module_name = 'import_multijournalentries'; 

  extensions\Extensions\import_paypal\hooks.php
    Line 11:     var $module_name = 'import_paypal'; 

  extensions\Extensions\osc_orders\hooks.php
    Line 4:     var $module_name = 'osCommerce Order Import'; 

  extensions\Extensions\repgen\hooks.php
    Line 5:     var $module_name = 'repgen';

  extensions\Extensions\rep_tax_cash_basis\hooks.php
    Line 13:     var $module_name = 'Cash Basis Tax Reporting'; 

  extensions\Extensions\requisitions\hooks.php
    Line 6:     var $module_name = 'requisitions'; 

  extensions\Extensions\textcart\hooks.php
    Line 14:     var $module_name = 'textcart';

  extensions\Extensions\zen_import\hooks.php
    Line 5:     var $module_name = 'Import Zen Cart Orders'; 

Some assignments have spaces in them.

Are they used anywhere at all?

4,995

(1 replies, posted in Modules Add-on's)

The list of security identifiers for the current official extensions are:

define ('SS_DASHBOARD', 150<<8);
        $security_areas['SA_DASHBOARDSETUP'] = array(SS_DASHBOARD|100, _("Setup Dashboard"));
        $security_areas['SA_DASHBOARDREMINDERS'] = array(SS_DASHBOARD|101, _("Reminder Setup"));

define ('SS_IMPORTCSVITEMS', 105<<8);
        $security_areas['SA_CSVIMPORT'] = array(SS_IMPORTCSVITEMS|105, _("Import CSV Items"));

define ('SS_IMPORTMULTIJOURNAL', 101<<8);
        $security_areas['SA_CSVMULTIJOURNALIMPORT'] = array(SS_IMPORTMULTIJOURNAL|101, _("Import Multiple Journal Entries"));

define('SS_ASSETREGISTER', 101<<8);
        $security_areas['SA_ASSETTYPE'] = array(SS_ASSETREGISTER|1, _("Asset Type Entries"));
        $security_areas['SA_ASSETS'] = array(SS_ASSETREGISTER|2, _("Assets Entries"));
        $security_areas['SA_AMORTISATION'] = array(SS_ASSETREGISTER|3, _("Amortisation Posting"));

define('SS_REQUISITIONS', 101<<8); 
        $security_areas['SA_REQUISITIONS'] = array(SS_REQUISITIONS|1, _("Requisitions Entries"));
        $security_areas['SA_REQUISITION_ALLOCATIONS'] = array(SS_REQUISITIONS|1, _("Requisitions Allocations"));

define('SS_REPORT_GENERATOR',    130<<8);
        $security_areas['SA_REPORT_GENERATOR'] = array(SS_REPORT_GENERATOR|130, _("Report Generator"));
        $security_areas['SA_REPORT_GENERATOR'] = array(SS_SPEC|155, _("Report Generator"));

define ('SS_IMPORTPAYPALITEMS', 107<<8);
        $security_areas['SA_PAYPALIMPORT'] = array(SS_IMPORTPAYPALITEMS|107, _("Import Paypal Items"));
        $security_areas['SA_PAYPALSETUP'] = array(SS_IMPORTPAYPALITEMS|108, _("Setup Paypal Import"));

define ('SS_OSCORDERS', 106<<8);
        $security_areas['SA_OSCORDERS'] = array(SS_OSCORDERS|106, _("osCommerce Order Import"));

define ('SS_TAXREPCASH', 101<<8);
        $security_areas['SA_TAXREPCASH'] = array(SS_TAXREPCASH|101, _("Tax Inquiry (Cash Basis)"));

define ('SS_ZENORDERS', 101<<8);
        $security_areas['SA_ZENIMPORT'] = array(SS_ZENORDERS|101, _("Import Zen Cart Orders"));

The 3rd, 4th, 5th and the last 2 extensions - ImportMultiJournal, ZenOrders and TaxRepCash have the same security identifier viz., 101<<8

The $security_areas assigned array has single digit entries for the 4th and 5th extensions above.

4,996

(31 replies, posted in Modules Add-on's)

Can TextCart Extension be used to import items into item table?

4,997

(0 replies, posted in FA Modifications)

Attached is a nice article on understanding input filter validation in php. Are we going to use them in FA?

4,998

(1 replies, posted in Reporting)

Use the standard functions in the */includes/db/*.inc files or roll your own in your module and include them in the report. If such SQLs are going to be used exclusively in the specific report only, make the wrapper function in the report itself or use it inline.

Study the existing reporting/repXXX.php files and the variable input form parameters file reporting/reports_main.php.

If you wish to have your own class of reports (Reports and Analysis Menu), then append it to the first stanza in reporting/includes/reports_classes.inc:

// Standard report classess
define('RC_CUSTOMER', 0);
define('RC_SUPPLIER', 1);
define('RC_INVENTORY', 2);
define('RC_MANUFACTURE', 3);
define('RC_DIMENSIONS', 4);
define('RC_BANKING', 5);
define('RC_GL', 6);

define('RC_PAYROLL',7); // <------ Added now

4,999

(4 replies, posted in Reporting)

Any config.php flag to switch it on / off?

    /* for uploaded item pictures */
    $pic_width         = 80;
    $pic_height     = 50;
    $max_image_size = 500;

Whilst the units for the width/height is clearly understood as pixels, the image_size is in Kb or just bytes?
A comment in the report to indicate setting width/height in the config.php would be useful.

Which URL works?