4,976

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

$module_name is a property in the hooks class in hooks.inc and is assigned in the extensions' hooks.php:

 
  extensions\Extensions\asset_register\hooks.php
    Line 6:     var $module_name = 'asset_register'; 

  extensions\Extensions\auth_ldap\hooks.php
    Line 22:     var $module_name = 'auth_ldap'; // extension module name.

  extensions\Extensions\dashboard\hooks.php
    Line 13:     var $module_name = 'dashboard';

  extensions\Extensions\import_items\hooks.php
    Line 4:     var $module_name = 'Import CSV Items'; 

  extensions\Extensions\import_multijournalentries\hooks.php
    Line 5:     var $module_name = 'import_multijournalentries'; 

  extensions\Extensions\import_paypal\hooks.php
    Line 11:     var $module_name = 'import_paypal'; 

  extensions\Extensions\osc_orders\hooks.php
    Line 4:     var $module_name = 'osCommerce Order Import'; 

  extensions\Extensions\repgen\hooks.php
    Line 5:     var $module_name = 'repgen';

  extensions\Extensions\rep_tax_cash_basis\hooks.php
    Line 13:     var $module_name = 'Cash Basis Tax Reporting'; 

  extensions\Extensions\requisitions\hooks.php
    Line 6:     var $module_name = 'requisitions'; 

  extensions\Extensions\textcart\hooks.php
    Line 14:     var $module_name = 'textcart';

  extensions\Extensions\zen_import\hooks.php
    Line 5:     var $module_name = 'Import Zen Cart Orders'; 

Some assignments have spaces in them.

Are they used anywhere at all?

4,977

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

The list of security identifiers for the current official extensions are:

define ('SS_DASHBOARD', 150<<8);
        $security_areas['SA_DASHBOARDSETUP'] = array(SS_DASHBOARD|100, _("Setup Dashboard"));
        $security_areas['SA_DASHBOARDREMINDERS'] = array(SS_DASHBOARD|101, _("Reminder Setup"));

define ('SS_IMPORTCSVITEMS', 105<<8);
        $security_areas['SA_CSVIMPORT'] = array(SS_IMPORTCSVITEMS|105, _("Import CSV Items"));

define ('SS_IMPORTMULTIJOURNAL', 101<<8);
        $security_areas['SA_CSVMULTIJOURNALIMPORT'] = array(SS_IMPORTMULTIJOURNAL|101, _("Import Multiple Journal Entries"));

define('SS_ASSETREGISTER', 101<<8);
        $security_areas['SA_ASSETTYPE'] = array(SS_ASSETREGISTER|1, _("Asset Type Entries"));
        $security_areas['SA_ASSETS'] = array(SS_ASSETREGISTER|2, _("Assets Entries"));
        $security_areas['SA_AMORTISATION'] = array(SS_ASSETREGISTER|3, _("Amortisation Posting"));

define('SS_REQUISITIONS', 101<<8); 
        $security_areas['SA_REQUISITIONS'] = array(SS_REQUISITIONS|1, _("Requisitions Entries"));
        $security_areas['SA_REQUISITION_ALLOCATIONS'] = array(SS_REQUISITIONS|1, _("Requisitions Allocations"));

define('SS_REPORT_GENERATOR',    130<<8);
        $security_areas['SA_REPORT_GENERATOR'] = array(SS_REPORT_GENERATOR|130, _("Report Generator"));
        $security_areas['SA_REPORT_GENERATOR'] = array(SS_SPEC|155, _("Report Generator"));

define ('SS_IMPORTPAYPALITEMS', 107<<8);
        $security_areas['SA_PAYPALIMPORT'] = array(SS_IMPORTPAYPALITEMS|107, _("Import Paypal Items"));
        $security_areas['SA_PAYPALSETUP'] = array(SS_IMPORTPAYPALITEMS|108, _("Setup Paypal Import"));

define ('SS_OSCORDERS', 106<<8);
        $security_areas['SA_OSCORDERS'] = array(SS_OSCORDERS|106, _("osCommerce Order Import"));

define ('SS_TAXREPCASH', 101<<8);
        $security_areas['SA_TAXREPCASH'] = array(SS_TAXREPCASH|101, _("Tax Inquiry (Cash Basis)"));

define ('SS_ZENORDERS', 101<<8);
        $security_areas['SA_ZENIMPORT'] = array(SS_ZENORDERS|101, _("Import Zen Cart Orders"));

The 3rd, 4th, 5th and the last 2 extensions - ImportMultiJournal, ZenOrders and TaxRepCash have the same security identifier viz., 101<<8

The $security_areas assigned array has single digit entries for the 4th and 5th extensions above.

4,978

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

Can TextCart Extension be used to import items into item table?

4,979

(0 replies, posted in FA Modifications)

Attached is a nice article on understanding input filter validation in php. Are we going to use them in FA?

4,980

(1 replies, posted in Reporting)

Use the standard functions in the */includes/db/*.inc files or roll your own in your module and include them in the report. If such SQLs are going to be used exclusively in the specific report only, make the wrapper function in the report itself or use it inline.

Study the existing reporting/repXXX.php files and the variable input form parameters file reporting/reports_main.php.

If you wish to have your own class of reports (Reports and Analysis Menu), then append it to the first stanza in reporting/includes/reports_classes.inc:

// Standard report classess
define('RC_CUSTOMER', 0);
define('RC_SUPPLIER', 1);
define('RC_INVENTORY', 2);
define('RC_MANUFACTURE', 3);
define('RC_DIMENSIONS', 4);
define('RC_BANKING', 5);
define('RC_GL', 6);

define('RC_PAYROLL',7); // <------ Added now

4,981

(4 replies, posted in Reporting)

Any config.php flag to switch it on / off?

    /* for uploaded item pictures */
    $pic_width         = 80;
    $pic_height     = 50;
    $max_image_size = 500;

Whilst the units for the width/height is clearly understood as pixels, the image_size is in Kb or just bytes?
A comment in the report to indicate setting width/height in the config.php would be useful.

Which URL works?

4,983

(4 replies, posted in Translations)

Thanks Joe. The number of downloads since 1st May 2014 (FA v2.3.21 was released in May 2014) shows the US, India and Indonesia leading in that order quite closely but the rest of the world is less than 50% of the lowest of these.

This info should be useful for consultants to offer their services in virgin territories.....or position themselves where the fish are.

WEBROOT=/var/www/frontac
WORKDIR=`pwd`
cd ${WEBROOT}/
wget http://www.apmuthu.com/files/menu_entry.png
# mkdir -p themes/{aqua,cool,default}/images
echo themes/{aqua,cool,default}/images/ | xargs -n 1 cp -f menu_entry.png
rm -f menu_entry.png
cd ${WORKDIR}
WEBROOT=
WORKDIR=

This will make for a clearer Add icon.

4,985

(4 replies, posted in Translations)

It is possible that all .com, .net and .org hostnames are assumed to be from US in AWStats. The sitestats I had put up was for pages that had google analytics / ads in them and relied on GeoIP for source determination. Surprised that Kenya does not figure in the stats between India and Canada. Try updating the GeoIP in AWStats if it is used.

Actually, I find quite a lot of enquiries for FA in India recently and wondered how it grew. "Tally" is the leading brand of Accounting software here in India but customers are getting fed up with the licence activation system now that their servers seem to be getting virus and power related breakdowns frequently. Many are now looking for a skin to ape the Tally look and feel to reduce the learning curve.

I have not run a single commercial install of FA till date and have only supported others installs and that too not in India. FA has been more of an example project to convince wannahaves of the maturity of Open Source.

I would like some repo site stats too to be published - that would be more on the usage side.

Maybe we need a General Topic on the FA Forum.

4,986

(4 replies, posted in Translations)

India, Kenya and Canadian IPs seem to be the biggest visitors according to Google Analytics.

Wiki-ed it.

Ref: Forum Post

The Official Git Mirror clone url is:

git://devel.frontaccounting.com:git/fa-stable

4,989

(2 replies, posted in FA Modifications)

The extension id can be unique if it is parsed from the max value of the id in the array and not from the array count.

When an extension is removed (after de-activation from all domains), will these security parameters too be removed from the security_roles tables and be available for re-use?

Is there any list of security area_identifiers across all official extensions to prevent unintended re-use across ones from different authors?

4,990

(10 replies, posted in Installation)

The browseable url is:
http://devel.frontaccounting.com/git/?p=fa-stable.git

Hope the said port 9418 is open for such cloning.

The IP reverse resolves to my.frontaccounting.com

To troubleshoot, the PortScan will be handy:

<Scan>
    <Info>PortScan</Info>
    <Host>176.31.120.126
        <Hostname>my.frontaccounting.com</Hostname>
        <OpenPort>SSH [22]</OpenPort>
        <OpenPort>SMTP [25]</OpenPort>
        <SMTPServer>220 ks395322.kimsufi.com ESMTP Postfix (Debian/GNU)</SMTPServer>
        <OpenPort>HTTP [80]</OpenPort><OpenPort>imap [143]</OpenPort>
        <IMAPServer>[CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.</IMAPServer>
        <OpenPort>587</OpenPort>
        <HTTPServer>Apache/2.2.16 (Debian)</HTTPServer>
        <HTTPTitle>400 Bad Request</HTTPTitle>
    </Host>
</Scan>

4,991

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

The latency from here to your host at both www.garrapato.com and the repo subdomain are about 330 to 350 ms and that may not be an issue as I've worked with far slower ones.

Please delete gz files in the modules/_cache folder and then try again. The code does not bother to retrieve the gz files afresh and relies on existing ones even if their sha1sum is different if they exist locally (YMMV).

Also request how / which file you made as Release.sig.

The automation scripts placed in the farepo folder (permissions 700,  execute as ./getrelease) for creating the various gz files are:

Filename: getconfigs

#!/bin/sh

# Use with
# find ./2.3/extensions/ -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip > Extensions.gz

tar xOzf $1 _init/config |  sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' && 
echo -n SHA1sum: && 
sha1sum $1 | cut -d" " -f1 && 
echo

Filename: getrelease

#!/bin/sh

SRCDIR=./2.3/
RELFILE=${SRCDIR}Release

find ${SRCDIR}extensions/ -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Extensions.gz
find ${SRCDIR}charts/     -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Charts.gz
find ${SRCDIR}languages/  -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Languages.gz
find ${SRCDIR}themes/     -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Themes.gz

echo Path: charts > ${RELFILE}
echo Type: chart >> ${RELFILE}
echo Filename: Charts.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Charts.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: extensions >> ${RELFILE}
echo Type: extension >> ${RELFILE}
echo Filename: Extensions.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Extensions.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: languages >> ${RELFILE}
echo Type: language >> ${RELFILE}
echo Filename: Languages.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Languages.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: themes >> ${RELFILE}
echo Type: theme >> ${RELFILE}
echo Filename: Themes.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Themes.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
gzip -f ${RELFILE}

4,992

(10 replies, posted in Report Bugs here)

Fixes needed for negative stock to work and other cosmetic changes:

File: includes/db/sql_functions.inc
Fix: missing end of file closing php tag "?>"

File:  inventory/transfers.php
Fix: Change line 79 from:
global $Refs;
to
global $Refs, $SysPrefs;

File: sales/includes/ui/sales_order_ui.inc
Fix: Remove Line 138:
    global $SysPrefs;'
as it is no longer needed.

****** All these issues and others have been addressed in the subsequent commit. *******

4,993

(10 replies, posted in Installation)

Have you tried Hg2Git mirrorring?

http://stackoverflow.com/questions/1389307/convert-a-mercurial-repository-to-git

https://github.com/vitaly/hg2git

http://repo.or.cz/w/hg2git.git

http://blog.appveyor.com/2014/02/23/converting-mercurial-repository-to-git-on-windows/

http://arr.gr/blog/2011/10/bitbucket-converting-hg-repositories-to-git/

4,994

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

I deactivated the cfdi extension for the Sandbox and then tried to delete the cfdi pkg in vain. It appears that there may be some openssl issue in verification. Try to bypass the signed pkg requirement in the first post in this thread and see if that is the problem.

Also please list the steps taken to make the Release.sig file so I can replicate here.

To the extent possible try to avoid using htaccess file and place it's contents in the apache conf directly with no overrides.

In the files admin/inst_module.php (line 42) and includes/packages.inc (line 518), the extensions array element 'active' is assigned as false instead of 0.

During normal usage, the installed_extensions.php files toggle it between 0 and 1 and it is never set as true anywhere. Is this the desired functionality - boolean false on install and then integer 0 / 1 during usage?

4,996

(2 replies, posted in FA Modifications)

$next_extension_id is stored in the {webroot}/installed_extensions.php file.

It is used in:

admin/inst_module.php
admin/db/maintenance_db.inc ---> writing to the installed_extensions file(s)
includes/packages.inc
index.php ----------------------------> set during install on CoAs
sql/alter2.3/php --------------------> updation of extension array elements

In general it is declared as a global variable from within functions and used and sometimes incremented. It is never decremented.

Actually it can be obtained by querying the $installed_extensions array and choosing to be one more than the highest key number or 1 if empty array.

This way we can make the array in each company (must make it a different name) have the same elements for the activated extensions.

Is this extension id stored in any FA table as a foreign key?

A trigger on the bespoke database to populate records in the FA db might be another way out.

4,998

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

Well here is the code to make an unsigned pkg for FA:

# Install ar command
apt-get install binutils

# ar usage - not used here
# ar rcs _data customernotes.php hooks.php

MODULENAME=customernotes-2.3.21-1
WEBROOT=/var/www/frontac

mkdir -p ${WEBROOT}/modules/_cache/${MODULENAME}
# upload the _init and extn files
cd ${WEBROOT}/modules/_cache/${MODULENAME}
tar -czf _data customernotes.php hooks.php
tar -czf ../../${MODULENAME}.pkg _init _data
rm -rf ${WEBROOT}/modules/_cache/${MODULENAME}
# download the ${WEBROOT}/modules/${MODULENAME}-2.3.21-1.pkg

The _init/config file will contain the extension description and parameters and will need to be appended to the Extensions file and compressed to Extensions.gz and placed in the repo root. The Extensions.gz's sha1sum should be placed in the Release file and compressed to Release.gz and placed in the repo root.

The _init/files can be prepared by referring the FAWiki.

4,999

(1 replies, posted in Dimensions)

You may want to set a default value for the Dimension id field in the various tables in the meanwhile.

To stay within FA, use Quick Entries or use the TextCart Extension. Otherwise:

1. Take a backup of FA
2. Post a typical entry thru the FA web interface
3. take another backup of FA
4. Compare the backups using tools like WinMerge
5. Skip the normal audit trail and logging entries and focus on the meat of the insert / updates
6. Make a template out of the insert / update sqls making the timestamp entries NOW() where appropriate (and likewise for current date)
7. Export the record variables from your manual invoice system
8. Mailmerge with the sql template created in 6
9 upload the mailmerged sql statements in a MySQL client or append them to the backup and then restore it.
10. Make sure no entries are made / changed in FA in the meanwhile.