@joe: can commit this.
Committed.
2,676 10/02/2017 03:38:48 am
Re: Optimise get_company_pref() (1 replies, posted in Report Bugs here)
2,677 10/01/2017 03:49:09 pm
Topic: User repo and unsigned packages option mod (0 replies, posted in Modules Add-on's)
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.
2,678 10/01/2017 03:41:51 pm
Re: db_pager.inc and session.inc inclusion order (6 replies, posted in Report Bugs here)
Provide context. The standard FA works fine with db_pager. Hence it must be a $path_to_root or include_once issue.
2,679 10/01/2017 12:54:18 pm
Topic: Fix pre-login errors in windows (1 replies, posted in Report Bugs here)
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 10/01/2017 12:18:46 pm
Re: Session errors (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 10/01/2017 10:12:30 am
Re: Forum Usage - best practices (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 10/01/2017 04:14:59 am
Topic: Optimise get_company_pref() (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;}
2,683 10/01/2017 04:11:29 am
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
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.
2,684 09/30/2017 06:47:05 pm
Re: rep_check_print doesn't work with 2.4.2 (6 replies, posted in Accounts Payable)
The routine has not been removed. It has been renamed and the extra arguments and their functionality has been removed.
2,685 09/30/2017 06:44:55 pm
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
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.
2,686 09/30/2017 06:06:18 am
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
Your $module_path may be wrong.
The file ../includes/session.inc should be include-able from there.
Check if DIRECTORY_SEPARATOR issue is involved.
2,687 09/30/2017 05:23:46 am
Re: rep_check_print doesn't work with 2.4.2 (6 replies, posted in Accounts Payable)
@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.
2,688 09/29/2017 10:59:15 am
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
Added to the FA24Extensions repo.
2,689 09/29/2017 06:48:50 am
Re: Cron Job Module (11 replies, posted in Modules Add-on's)
construct should be preceded by 2 underscores(_).
2,690 09/29/2017 06:46:21 am
Re: How Can I Merge Customers? (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.
2,691 09/29/2017 06:44:13 am
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
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.
2,692 09/29/2017 06:40:38 am
Re: how to Prevent changing sales persons in the Customer Branches (4 replies, posted in Accounts Receivable)
@joe: is this a core permissions issue for the standard roles?
2,693 09/28/2017 01:33:02 pm
Re: How do I view and restore voided transactions? (4 replies, posted in Setup)
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 09/28/2017 01:20:40 pm
Re: How Can I Merge Customers? (16 replies, posted in Accounts Receivable)
@boxygen: nice catch.
Committed fix in my repo.
2,695 09/28/2017 01:09:56 pm
Re: Recurring Invoices ... A Problem (35 replies, posted in Accounts Receivable)
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 09/28/2017 01:06:41 pm
Re: SQL connection error (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
2,697 09/27/2017 04:53:02 pm
Re: How do I view and restore voided transactions? (4 replies, posted in Setup)
Take a backup from Setup => Backup/Restore and then do the voiding and then revert by restoring back if anything went wrong.
2,698 09/27/2017 04:48:57 pm
Re: Quotation forms problem (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 09/27/2017 04:37:42 pm
Re: Reports Tutorial Discussion (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 09/27/2017 04:23:32 pm
Re: Show voided transactions in audit trail (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?