2,676

(1 replies, posted in Report Bugs here)

@joe: can commit this.
Committed.

Using trusted unsigned packages possibly in the LAN is made possible by a $repo_sign flag placed in the config.php

Hosting one's own package repo is available in FA. The $repo_auth array in version.php can be overridden by one in the config.php file.

$SysPrefs array is not used in the includes/package.inc file (in FA 2.4) but the config variables are used from their global context.

Commits in my repos:
FA 2.4 commit as of today (Oct 2017).
FA 2.3 commit as of 2014.

Provide context. The standard FA works fine with db_pager. Hence it must be a $path_to_root or include_once  issue.

The fix for FA 2.3 in my FAMods repo can be ported safely to FA 2.4 to avoid errors that fill up the tmp/errors.log file each time the login screen is accessed. At that time, there is no user available to the session and the $haystack will be a null resource instead of an array. It should degrade gracefully. This is observed in Windows XAMPP (1.7.3) installs.

@joe: the two functions affected are verbatim in both versions and hence they can be ported easily.

2,680

(1 replies, posted in Installation)

Periodically purge the errors in the tmp/errors.log file.

Placing echo session_save_path(); just before the @session_destroy(); line in access/logout.php and checking the html source of the logged out page will show where the session files are stored - these too must be purged periodically - they will generally be beyond the webroot and possibly out of reach of the php's permissions to destroy them and hence the error. In linux systems I have not found this issue.

2,681

(5 replies, posted in Announcements)

Forum Usage Stats in the last 1 year is attached herewith.
Averaging a little over 1 new valid user every 2 days, ie., 17+ a month.
A little under a post a day, ie., 26+ a month.

A drastic dwindling of activity probably means that most FA users are now adept in using it and others get assistance offline or by searching the forum and the wiki.

2,682

(1 replies, posted in Report Bugs here)

The file admin/db/company_db.inc has the function get_company_pref($prefs = null):

function get_company_pref($prefs = null)
{
    global $SysPrefs, $db_version;

    if (!isset($SysPrefs->prefs))     // just after first login or reset
        $SysPrefs->refresh();

    $all = $SysPrefs->prefs;

    if (!$prefs)
        return $all;
    elseif (is_string($prefs))
        return @$all[$prefs];

    $ret = array();
    foreach($prefs as $name)
        $ret[$name] = $all[$name];

    return $ret;
}

This can be simplified and made efficient by replacing it with:

function get_company_pref($prefs = null){
    global $SysPrefs, $db_version;

    if (!isset($SysPrefs->prefs))     // just after first login or reset
        $SysPrefs->refresh();

    $all = $SysPrefs->prefs;
    if ($prefs && is_string($prefs))
        return @$all[$prefs];     // silent on absent array element

    if (!is_array($all))
        $all = array();

    return $all;}

Clear the cache and close all instance of the browser, flush the dns cache (windows: ipconfig /flushdns). Clear the errors file in both apache (webserver) and in the FA tmp/errors.log file.

The routine has not been removed. It has been renamed and the extra arguments and their functionality has been removed.

You are using an old version of the module. Get the new release from cambell's repo or take it from mine linked above. Also attached herewith.

Your $module_path may be wrong.
The file ../includes/session.inc should be include-able from there.
Check if DIRECTORY_SEPARATOR issue is involved.

@cotcomsol: Thanks for the feedback.
Updated my FA24Extensions repo for this extension.
It is also attached herewith.

@joe: would you like to copy over the said function to it's original location? This change done in FA 2.4.x has broken the extension thus far. Any changes to functions in FA 2.3 when porting to FA 2.4 should take into account atleast it's use in all official extensions or fix the latter to accommodate such changes.

Added to the FA24Extensions repo.

2,689

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

construct should be preceded by 2 underscores(_).

2,690

(16 replies, posted in Accounts Receivable)

There are many GL Accounts and Types and any merge will affect a different subset of tables.

The location redirection does not yet seem to work for the success status message to be displayed and the customer lists to be updated.

This is a composer issue. @cambell can provide an initial one so that users with no composer installed can still partake of it. Standard FA does not use composer.

@joe: is this a core permissions issue for the standard roles?

A compare of the backups before and after voiding will provide the diffs that need to be inserted when cancelling the voiding. Some computed values will be affected like average costing after such insertions.

2,694

(16 replies, posted in Accounts Receivable)

@boxygen: nice catch.

Committed fix in my repo.

Consider that the price of an item changes over time. The approach hitherto has been to use the price prevailing at the time the invoice is generated.

@joe: A field for dynamic / static pricing may be included in the recurrent invoices table/form to accommodate both situations.

2,696

(1 replies, posted in Setup)

Compare and list the versions of Apache, PHP, MySQL, FA version for both the WAMP and the working server.

If your WAMP is having PHP7 then it will not work out of the box. You need PHP 5.3 to 5.5. Only MySQLi and not MySQL driver support is available for PHP 7 onwards but FA 2.3.x needs MySQL driver support

Take a backup from Setup => Backup/Restore and then do the voiding and then revert by restoring back if anything went wrong.

2,698

(5 replies, posted in Setup)

The way you changed the VAT lines is the quick 'n dirty method to do so and is not recommended as they will get overwritten when the next update is done. The correct way is to make a change in the language .po file and compile it into the .mo file and then use it.

As an example, the standard latin1 en_US.po file is at:
https://github.com/apmuthu/frontac24/blob/master/FA24Mods/lang/en_US/LC_MESSAGES/en_US.po
and is for the standard compiled one at:
https://github.com/apmuthu/frontac24/tree/master/core/lang/en_US/LC_MESSAGES

The UTF-8 version for the en_US lang files are at:
https://github.com/apmuthu/frontac24/tree/master/FA24Mods/lang/en_US-UTF8/LC_MESSAGES

All languages necessary to be choosable must find their folders in the lang folder and be present in the lang/installed_languages.inc file.

Setup => Display Setup will navigate to the Preferences page that can also be reached using the Preferences link at the top menu near the Logout link. Your user role access permission should allow for it to be visible.

Setup => Transaction References is where the Forms Setup is located.

@joe: it would be nice to split the comments at the bottom of all reports to wrap at some width suitable for each report.

2,699

(4 replies, posted in Reporting)

The file reporting/rep107.php outputs the Invoice in FA.

The variable $cols shows the start of each field in mm. for the item list lines in the body of the invoice.
The variable $aligns sets the alignments for the above fields.

As the Header2 template is used in this report, check out the lines for address1 (154-157) and address2 (160-163) in reporting/includes/header2.inc which represent the "Charge To" and "Delivered To" addresses.

2,700

(7 replies, posted in Setup)

$show_voided_gl_trans was used in FA 2.3.x in only one place in the gl/includes/db/gl_db_trans.inc file's function get_gl_transactions() in lines 121-122:

    if (isset($show_voided_gl_trans) && $show_voided_gl_trans == 0)
        $sql .= " AND ".TB_PREF."gl_trans.amount <> 0"; 

The equivalent function of the same name in the same file in FA 2.4.2 (has an extra person_id parameter that defaults to null) does not use the said variable which is not used anywhere in the entire FA 2.4.x codebase and is also not used in any of the extensions in the official repo.

None of the extensions in FA 2.3.x use the said variable too.

Either we incorporate the said variable, $show_voided_gl_trans in it's FA 2.4.x avatar ($SysPrefs->...) or ditch it in it's entirety now.

@joe: which way?