3,751

(4 replies, posted in FA Modifications)

A list of items / categories of items we need to keep track of price history for can be set as a flag in the master_stock table, the stock category table or in a separate table that has these as keys besides others.

Each item can be purchased from more than one supplier even on the same day. A table that has purchase date and stock_id as the primary key will not suffice. Hence it will need to be on a transaction basis that can be extracted through some involved SQL gymnastics.

What happens when some of these purchases are voided (and the specific case of being partially voided - some items and some quantities - short / over supply)? The SQL used will have to account for that as well.

Furthermore, manufacturing / assembly for stock issued from inventory should be disregarded in the SQL so hammered out.

FA keeps separate tables for computed data that relies on proper updation when the primary data is affected (voiding, editing, etc). This is done for speed of operation and non dependance on past accounting period data.

A modern ideal ERP would only rely on primary data and would hence need huge resources (storage space, computing power, RAM, thread slowdown and increased spawning, etc) and complex DB engines besides having an impact on archival based removal of old entries that will never become stale.

An intermediate approach would be to have some summary computed data made at the closing of each accounting year (aka P&L postings to Balance Sheet) and stored in separate tables much like opening balances. Fiddling with these values during subsequent years would
1. wreck havoc on the reporting systems and
2. hence on the decision making that depends on it and consequently
3. make for more difficult troubleshooting issues thereafter.

The tmp folder in the FrontAccounting webroot needs to be writeable by the webserver process www-data - that is where the sessions get stored in your install. These settings are in the includes/session.inc file in line 387 commented out as it is expected to be set in the php.ini file's session.save_path setting.

Remove the .htaccess file and check - then tweak it.

Even after installing the necessary locales in Windows (before starting Apache) if you cannot get gettext to work for locales other than the default one, then use the php-gettext workaround.
1. Disable the gettext extension in the php.ini file.
2. Restart Apache.
3. upload the files in the attachment into the FA webroot - your index.php will get overwritten too. If you would like to manually patch the index.php, then make the following line the first executable one in your index.php file:

include_once("gettext.inc");

Now all standard language files in FA should display.

Ref: https://launchpad.net/php-gettext

***** This is not needed anymore - see later post. Just disable gettext extension in php.ini and php_gettext_support takes over.

Windows uses 3 character locale names in (PHP 5.3.1 atleast) alomg with language_Country.encoding format for LC_CTYPE:

<?php
echo setlocale(LC_ALL, 0) . "\n";
// LC_COLLATE=C;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C

setlocale(LC_CTYPE, 'Bulgarian_Bulgaria.1251');
echo setlocale(LC_ALL, 0) . "\n";
// LC_COLLATE=C;LC_CTYPE=Bulgarian_Bulgaria.1251;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C

setlocale(LC_CTYPE, 'Tamil_India.1252');
echo setlocale(LC_ALL, 0) . "\n";
// LC_COLLATE=C;LC_CTYPE=Tamil_India.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C

setlocale(LC_ALL, "fra_fra");
echo strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
/* Output nld_nld: vrijdag 22 december 1978 */
/* Output deu_deu: Freitag 22 Dezember 1978 */
/* Output fra_fra: vendredi 22 décembre 1978 */

Pay attention to the syntax.
- UTF8 without dash ('-')
- locale.codeset and not locale-codeset.

<?php
$codeset = "UTF8";  // warning ! not UTF-8 with dash '-'
       
// for windows compatibility (e.g. xampp) : theses 3 lines are useless for linux systems

putenv('LANG='.$lang.'.'.$codeset);
putenv('LANGUAGE='.$lang.'.'.$codeset);
bind_textdomain_codeset('mydomain', $codeset);

// set locale
bindtextdomain('mydomain', ABSPATH.'/locale/');
setlocale(LC_ALL, $lang.'.'.$codeset);
textdomain('mydomain');
?>

where directory structure of locale is (for example) :

locale/fr_FR/LC_MESSAGES/mydomain.mo
locale/en_US/LC_MESSAGES/mydomain.mo

and ABSPATH is the absolute path to the locale dir

Further note, under linux systems, it seems to be necessary to create the locale at os level using 'locale-gen'.

Ref:
http://php.net/manual/en/function.setlocale.php
https://msdn.microsoft.com/en-us/library/x99tb11d%28v=vs.140%29.aspx

In XAMPP it will work only if the gettext() function is available to PHP:

<?php
$func = "gettext";
if (function_exists($func)) echo "Yes, $func() exists";
else echo "No, $func() does not exist";

What do your error logs say?

Check how your version of windows perceives your locale names:
https://bugs.php.net/bug.php?id=66265

This ofcourse does not include the scores of deployments that occur in cPanel and other Webpanels besides using OpenVZ and other paravirtualised sites.

GitHub downloads too need to be factored in.

Great show! Thanks to Joe / Janusz for their untiring efforts to keep it on top!

3,758

(2 replies, posted in Report Bugs here)

If most of your database size is due to logs, then arrange to delete them first. With such a large database, the script will timeout on a slow connection. Take a backup using CLI on the terminal.

Use the latest snapshot of the stable version.

Shouldn't this ought to be fixed in the annual expense breakdown report package as well?

Take the en_US-new.sql and modify it for your country and use it. Various charts are listed here for your reference.

@joe: is this the fix?

Does the annual expense breakdown report work okay with line 402:

        $rep->AmountCol2($i, $i + 1, $sales[$i] * -1, $dec, 0, 4, 0, $fill, NULL, 1, true);

?

Sell with 100% discount (0 price).

@Petros: Please provide a backup of the state before the Work Order commences and the steps thereafter to recreate your errors. You should have started from a fresh en_US-new.sql install.

Has anyone connected Joomla to FrontAccounting? If so what issues did you face and what was done about it?

There is a Joomla World Conference at Bangalore, India, scheduled for 06-08 November 2015 where Soren Beck Jensen, Founder, Joomla Component Creator (free too) will be speaking. He has offered key developers a Coupon Code to slash the nearly $80/- fee to just $10/- (JOOMLAIN10) including lunch and drinks for all the 3 days of the conference and 25% off on the premium fee of $299/- (ComponentCreator) which will include dinners as well and special pre and post session meetings.

If there are any FA developers around Bangalore and / or any who can make it to the event, brainstorm with him on creating a similar FA Component Creator!

@Petros: does this work on a new install as desired?
Even if so, what are the standard operating procedures to be followed for Advanced Manufacturing?
Should we set the config flag $use_costed_values?
Are there any advantages prior to using code prior to these last 2 commits?

3,767

(1 replies, posted in Items and Inventory)

Treat yourself as a supplier and buy your produce from yourself!

@Petros: Please try @itronics latest fix and revert with your findings.

@itronics: Please note that the same deprecated function in your fix is present in purchasing/includes/supp_trans_class.inc and check whether the same should be done there and the old function removed in it's entirety everywhere. The deprecated taxfree_charge_price() method/function is not being used in any standard extension.

Which item's location code/name do you want to display?
Each item can have same or different location code/name.
Is it necessary for the customer to be aware of the location code/name?
You can enter it in the memo / text line or hack the report t do so.

3,770

(5 replies, posted in Accounts Receivable)

Which version of FA are you using (use v2.3.24+).Also study the session values in both companies and see if some setting is missing or there is a difference in the schema of the charts used.

I envisage that a module to create a FA module already exists in the hands of key FA users in their private domains.

For the public domain, here is what I would consider user friendly to design and proffer for the end user:

User inputs like:

Module Name:
Short Name:
Constants:
Settings, Types and Default values:
Pages: Menu Link names, Target File Names, Link Category, Link Side (Left/Right) => Position order is taken from order of entry.
New tables/table fields to be added / removed on activation / deactivation with initial values.

should be able to write the FA Module skeleton for us.

Standard functionality for page types like Add / Update / View / List can be added as parameters to pages later.

Security labels and their standard role permissions too can be part of it.

Facility to generate a pkg for signed / unsigned hosting would be a bonus.

@itronics: probably only you can fathom the mountain of code to get this done, now that @Petros has a clear understanding to be able to test it out. Have linked it into the Wiki FWIW.

Please post your version of the modified file that works with standard settings in preferences so that it's effect may be studies in the sales and other portions it may possibly affect.

@joe / @itronics: your insights please.

3,774

(2 replies, posted in Installation)

The Wiki has the variables inspected but may not be relevant here except as a means to investigate.

The function user_def_print_orientation() is present only in FA v2.4.x beta and not in FA v2.3.x.

If you want the modded and backported version of the said file, then take it from my FAMods.