5,701

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

Now that the report generator has been installed lets fix the usage issues.

1. Page cache affects it as the php pages are now dished out from the modules/repgen folder.

2. Quotes and other special characters being escaped and stored in db causing issues when editing.

3. After pressing the run button on any report all other types of buttons are disabled / act as run button.

5,702

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

Final Solution was the removal of a tab character after the "=" sign on line 23 in modules/repgen/hooks.php.
Any function that starts with an underscore should not have any preceding tabs in the current version of PHP (at least the one on Debian Squeeze) if immediately on the RHS of an assignment statement.

The PHP version tested was:

# php -version
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug  6 2012 20:08:59)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

There are 83 files in the standard FA distribution having a tab preceding a gettext function - _("xxx") - usage and this has never been a problem. Only in this case it was an assignment to a variable (an array variable in this instance).

The attached patch addresses a similar "=\t" issue with modules/repgen/repgen_strings.php as well.

Bugs yet to be fixed:
On activating the Reports Generator extension, when we try to edit, delete or copy the first and only report in the default list, we get to see the report iself like pressing the Run button. The Edit, Copy and Delete functionality seems lost.

5,703

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

Hi Joe, that is what I would like to have.

In the hg 3127, it appears that the hooks.php of the modules are loaded before the translation strings get added and hence the non display. This is so since the section string is available only when install_access() is invoked.
Incidentally, the module/includes/acc_levels.php file does not seem to get used anywhere at all.

As a temporary workaround, I have commented out the define for the SS_REPORT_GENERATOR in the module's hooks.php and altered the install_access() function to be:

        function install_access()
        {

                $security_sections['SS_SPEC'] = _("Special maintenance");

                $security_areas['SA_REPORT_GENERATOR'] = array(SS_SPEC|130, _("Report Generator"));

                return array($security_areas, $security_sections);
        }

and it now shows up under Special maintenance section group.

5,704

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

At Line 219 of admin/includes/security_roles.php  the value of

$parms = array(229988, "Report Generator", 116)
$ext = 3
$sec = 130

Fresh install of hg 3127 with only the repgen module installed. Module works when activated and role enabled. Only the group label is not displayed.

Attached are the snapshots of before and after ticking the checkbox.

5,705

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

The key here is that the label Report generator for the group is not displayed in the roles and after uncommenting the debug code in admin/includes/security_roles.php (lines 217, 218) and turning $go_debug = 1 in the config.php, we get the following error:

Bad section 38200:
Undefined offset: 229888 in file: /var/www/frontac/admin/security_roles.php at line 219

The security role Report generator is displayed corrrectly but the group name (line preceeding it) "Report Generator:" is not displayed but only ":".

$dummy is declared with a default value of false in the function start_form()  in includes/ui/ui_controls.inc and in reporting/includes/class.pdf.inc as null in the function ellipse() but not used inside the function and not assigned consistently anywhere with any valid values.

This results in the module extensions permissions not being read correctly as in the case of the report generator.

5,707

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

Compare the module's files with those from Sep 2010 (v2.3.0) taking into account the various extension parameters that have changed.

The error may be due to themodules/repgen/includes/acc_levels.php(must the file extension be.inc?) using the old style $security_areas. This file is not used now.

$security_areas['SA_REPORT_GENERATOR'] = array(SS_SPEC|155, _("Report Generator"));

Must the SS_SPEC|155 above be SS_REPORT_GENERATOR|130 ?

Optionally the missing single quote for thedefinein line 23 of modules/repgen/hooks.php:

I can see the Report Generator Menu link greyed out in Setup -> Maintenance on the right side. It gets corrected when we tick the Setup -> Access Setup last ":" role for System Administrator, then the Report Generator checkbox pops up and on ticking and saving, logging out and logging back in, the Report Generator works.

One correction may be needed in the modules/repgen/sql/reports.sql file at line 59, the id should be '6' instead of 'B1' which is for blocks.

Some extra report definitions have been culled out of www.fvr.ro and attached herewith. Since the table xx_reports has no primary key, it seems to be accumulating duplicate records.

The installed_extensions.php file in the webroot uses true/false for the 'active' attribute of the array whereas it is 0/1 in the company/#/installed_extensions.php files. Renumbering the array elements in both files in the same manner maintains status quo.


Can the FA Admins correct it and upload a new PKG?

5,708

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

Along with $go_debug, try $sql_trail as well and check the trail table.

Try the latest FA v2.3.13 Mercurial Build 3127 (it contains a few patches for installing modules)  from scratch - do not try restoring any previous data and do a fresh install of the module and then fix any errors in the module files and try.

The current translation strings (FA v2.3.13 Mercurial Build 3127) empty.po files generated in accordance with the sequence at the Wiki Page is attached herewith.

Many obsolete entries have been removed, existing ones updated and new ones added.

Since there are too many changes and order differences, no patch file has been generated.

The following files need to have their strings ISO-8859-2 changed to ISO-8859-1

lang/new_language_template/LC_MESSAGES/empty.po
install/lang/new_language_template/LC_MESSAGES/empty.po
update.html

The patch for the update.html file is attached.

5,711

(1 replies, posted in Setup)

Use the profit and loss account or any suspense account - it will all zero out since the Balance Sheet is balanced. Even a dummy Balance Sheet Type account possibly named "Opening Balances Transfer Account" would suffice.

5,712

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

any errors in the logs?
Windows / Linux OS?
Any line endings issue?

5,713

(11 replies, posted in Setup)

Thanks Januz.

I have standardised the method of generation of [both main and install empty.po files with:

#!/bin/bash

mkdir -p /tmp/fagettext
cd /tmp/fagettext

FAVERSION="2.3.14"
FRONTACFILE=frontaccounting-$FAVERSION.tar.gz

wget https:/sourceforge.net/projects/frontaccounting/files/FrontAccounting-2.3/$FAVERSION/$FRONTACFILE
tar -xzf $FRONTACFILE
rm -f $FRONTACFILE

MAINDIR=`pwd`/frontaccounting

cd $MAINDIR

# Generate the main empty.po file

TPL=lang/new_language_template/LC_MESSAGES/empty
GTEXEC="xgettext  -d empty --language=PHP  --from-code=ISO-8859-1 \
                  -p $MAINDIR/lang/new_language_template/LC_MESSAGES "

# Backup the old main empty.po
mv $MAINDIR/$TPL.po $MAINDIR/$TPL.po.org

# Generate main header as well
$GTEXEC -k_ -n *.php

# set the charset
sed -i 's/charset=CHARSET/charset=ISO-8859-1/g' $MAINDIR/$TPL.po


mv install ..

$GTEXEC -k_ -n -j */*.php
$GTEXEC -k_ -n -j */*/*.php
$GTEXEC -k_ -n -j */*/*/*.php
$GTEXEC -k_ -n -j */*.inc
$GTEXEC -k_ -n -j */*/*.inc
$GTEXEC -k_ -n -j */*/*/*.inc

mv ../install .

# Generate the install empty.po file

ITPL=install/lang/new_language_template/LC_MESSAGES/empty
GTEXEC="xgettext  -d empty --language=PHP  --from-code=ISO-8859-1 \
                  -p $MAINDIR/install/lang/new_language_template/LC_MESSAGES "

# Backup the old install empty.po
mv $MAINDIR/$ITPL.po $MAINDIR/$ITPL.po.org

# Generate install header as well
$GTEXEC -k_ -n install/*.php

# set the charset
sed -i 's/charset=CHARSET/charset=ISO-8859-1/g' $MAINDIR/$ITPL.po

$GTEXEC -k_ -n -j install/*.inc
$GTEXEC -k_ -n -j includes/system_tests.inc
$GTEXEC -k_ -n -j includes/packages.inc

cd $MAINDIR
tar -czf ../../fac_empty_po.tar.gz $TPL.po $ITPL.po
cd ../..
rm -rf fagettext

echo "fac_empty_po.tar.gz created"

Have Wikied it as well.

Attached are the empty.po files taken from the gettext of the FA v2.3.14 code.

Lines 490-574 in sales/includes/ui/sales_order_ui.inc - function sales_order_item_controls() dictates what goes into each row and it's columns.

5,715

(11 replies, posted in Setup)

What is the script you use to get the gettext to do the job?

5,716

(13 replies, posted in Wish List)

OK!

Oh yes, thanks. Lines 238-240 in system_tests.inc do it:

    $fname =  $path_to_root.'/lang';
    $test['test'] = $fname;
    if (!(is_dir($fname) && is_writable($fname))) {

The BBCode for StrikeThru has been enabled in the forum. Thanks Joe.

Usage:

 [del]Stricken Message[/del] 

This is a test message with a strike through text, where through is using strike out.

5,719

(13 replies, posted in Wish List)

The alter sql file can now have the following extra line:

INSERT INTO `0_sys_prefs`(`name`,`category`,`type`,`length`,`value`) VALUES ('bcc_email', 'setup.company', 'varchar', 100, '');

Yes, the function check_write() in includes/main.inc should cover the lang folder check as well.

In install/index.php mustn't there be a check to see if lang folder is writeable?

    if (!file_exists($path_to_root . "/lang/installed_languages.inc")) {
        $installed_languages = array (
            0 => array ('code' => 'C', 'name' => 'English', 'encoding' => 'iso-8859-1'));
            $dflt_lang = 'C';
            write_lang();
    }

OK!

5,722

(11 replies, posted in Setup)

@Janusz

The empty.po (and other language files possibly) have your dev machine path set like

#: /home/janusz/FA/fa_stable/Repo/srcs/2.3/requisitions/_devel/../hooks.php:16 

Very extensive work indeed. Congrats.

@Janusz
You're right. I'll post the actual changes in another extension in another post. The attachment was a jumble up of an extension that was in the process of testing the parameters. The extension name change to Item Sales Summary Report may have been appropriate in the light of a similarly named one in the Customer Reports.

5,724

(6 replies, posted in Reporting)

@Janusz
Thanks for the error correction. I'll post the actual changes in another extension in another post. The attachment was a jumble up of an extension that was in the process of testing the parameters.

@flort
The effective correction is to the sql in the rep_sales_summary.php at line 41:

".TB_PREF."debtor_trans_details.quantity

equivalently changed to

SUM(".TB_PREF."debtor_trans_details.quantity) AS quantity

and with aliases in actual code now being

SUM(line.quantity) as quantity

Since there is already a standard report by the same name under Customer Reports, it may have been better to name this report as Item Sales Summary Report.

Wikied the screenshots of both reports:

Customer Sales Summary Report
Item Sales Summary Report

5,725

(3 replies, posted in FA Modifications)

Please be specific.

What is the sequence of menu options
Which version of FA
In what browser and version

did the issue arise?