4,951

(65 replies, posted in Setup)

Please pass on the old customer import from csv module so that we can make it up-to-date. It does not seem to be available in the extensions repo.

On adding a customer through the FA Add Customer form the following SQLs are generated:

INSERT INTO `2_crm_persons` VALUES 
('2', 'Justin Zhou Lu', 'Justin Lu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0');

INSERT INTO `2_crm_contacts` VALUES 
  (3, '2', 'cust_branch', 'general', '2')
, (4, '2', 'customer', 'general', '2');

INSERT INTO `2_cust_branch` VALUES
 (2, '2', 'Justin Zhou Lu', 'Justin Lu', '', '1', '1', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', '', '0', 'Male', '0');

INSERT INTO `2_debtors_master` VALUES
 ('2', 'Justin Zhou Lu', 'Justin Lu', NULL, 'PQ453625N', 'USD', '1', '0', '0', '1', '4', '0', '0', '0', 'Male', '0');

Attached is what I understand to be the ERD between these tables (they are not fully depicted in the FA v2.3 ERD pdf).

Joe / Janusz - please explain if these relationships are correct with the 2_crm_contacts.type field enforcing some sort of filter.

There is no field for gender and CitizenID Number of the person in FA as of now.....GST / VAT Number field can be used for Citizen ID Number for now whilst gender can be placed in the Notes field but these land up in the 2_cust_branch and 2_debtors_master tables!

The id field of the 2_crm_contacts table does not seem to be referenced anywhere and is just used for uniqueness for view/edit purposes.

The cust_branch.branch_ref, debtors_master.debtor_ref and the crm_persons.name (and not the crm_persons.ref) are in the select boxes.

Wiki-ed it.

4,953

(4 replies, posted in Setup)

Hiding Menu Tabs might make sense. Otherwise, if you want to have an All-Journal system, then stop the other application files from being included and being invoked to be loaded in frontaccounting.php (comment out what is not needed in the following code snippet from the said file):

..
..
    include_once($path_to_root . '/applications/customers.php');
    include_once($path_to_root . '/applications/suppliers.php');
    include_once($path_to_root . '/applications/inventory.php');
    include_once($path_to_root . '/applications/manufacturing.php');
    include_once($path_to_root . '/applications/dimensions.php');
..
..
            $this->add_application(new customers_app());
            $this->add_application(new suppliers_app());
            $this->add_application(new inventory_app());
            $this->add_application(new manufacturing_app());
            $this->add_application(new dimensions_app());
....

4,954

(12 replies, posted in FA Modifications)

Joe please add this.

4,955

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

any reason why person_id is a tinyblob?

4,956

(2 replies, posted in Report Bugs here)

Set your (currently error causing path) session path to be somewhere under your writeable path in the php.ini and make sure it is writeable by the web server user.
Otherwise, make sure the stated /var/php_sessions folder is created and writeable by the web server user.

Compare the Database backup schema with the CoA sql used and see what has changed and alter the db structure accordingly.

Be careful with any extensions used and their default data as well.

====
Google Translate: smile

Comparar el esquema de copia de seguridad de base de datos con el sql CoA utilizado y ver lo que ha cambiado y alterar la estructura db en consecuencia.

Tenga cuidado con las extensiones utilizadas y sus datos por defecto también.
====

4,958

(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,959

(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,960

(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,961

(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,962

(3 replies, posted in Installation)

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

4,963

(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,965

(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,966

(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,971

(3 replies, posted in Reporting)

The "Only Balances" Checkbox.

4,972

(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,973

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

My GitHub Repo has been updated with the latest extensions.

4,974

(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,975

(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.