Mobile phones in some ISP environments (most?) tend to provide an IP change for each bunch of submissions..... Some el-cheapo mobiles also change their MAC Address for each session!

There has been atleast one post in this forum where you can disable IP address change protection for your specific need. Bluehost's version of FA is pretty old. Install from latest Git v2.3.35+.

https://frontaccounting.com/punbb/viewtopic.php?id=2581
https://frontaccounting.com/punbb/viewtopic.php?id=4700

Just edit the 1002 gms mango as 1000gms real mango and 2gms of "wastage" that you forgo.... or alternatively order for 1002gms mango and provide a 2gm "discount" for writeoff.

3,353

(11 replies, posted in FA Modifications)

It is probably the scaling (rounding off) of the height with respect to the actual width (if smaller) or that of the width if the height is smaller, that may be the cause of the error. Any way to avoid scaling altogether as distortion occurs sometimes?

3,354

(8 replies, posted in Reporting)

If you do not intend to track Supplier Invoices at all (and also not bother to enter them with individual line items as you do not want inventory), just pass journal vouchers for the Supplier invoice gross totals and make payments directly into the supplier accounts and use the general ledger to track account summary balances for the suppliers.

3,355

(5 replies, posted in Translations)

You need to use either "-o" or "--output-file=" but not both. Try:

msgunfmt -i ar_EG-2.3.12-1.mo -o ar_EG-2.3.12-1.po
// CRLF => LF for new .po and for empty.po files
// format and space of msgstr and msgid upto first double quote must be same
msgmerge -s --no-location ar_EG-2.3.12-1.po empty.po -o ar_EG-2.3.12-2.po
// Edit the ar_EG-2.3.12-2.po file and compile
msgfmt ar_EG-2.3.12-2.po -o ar_EG-2.3.12-2.mo

3,356

(5 replies, posted in Translations)

If you have the .mo file, use msgunfmt to extract back the .po file.

3,357

(8 replies, posted in Reporting)

@dls: In your method of entering payments, there is no "allocation" done from it to the actual invoice. Hence the ageing reports cannot be fully computed in the standard method used in reports.

Hope you are doing all this on the latest Git version 2.3.25+.

3,358

(11 replies, posted in FA Modifications)

On further investigation, it appears that the logo width, if too high only results in truncation of image when displayed in the report header.

Some sort of cache may be playing havoc.

The solution is to
1. upload some other Company logo (Setup -> Company Setup) and update the company and then
2. revert back to the original logo and update the company and then
3. print range of invoices

Attached is a set of logos of varying widths and the way they get displayed in the Invoice header.

3,359

(11 replies, posted in FA Modifications)

All usual config settings on timeouts of PHP/Apache, were exhausted and finally the range of invoices printing issue was solved by reducing the width of the logo that initially spanned 660 pixels!

Diagnosing Memory Leaks - Allowed memory size of # bytes exhausted

When a large width logo is used, the FA's PDF object cannot spawn a NewPage and the webserver dies ceasing browser output that makes the system appear to hang.

The attachment shows the diagnostic for a small logo where the output is as desired and has been wikied.

Other References:
Memory Leaks With Objects in PHP 5
How to find which PHP script is leaking memory?

3,360

(11 replies, posted in FA Modifications)

It is imperative for the stock_id field to be indexed in the debtor_trans_details table for all FA databases used with the equivalent of:

ALTER TABLE `0_debtor_trans_details` ADD INDEX `stock_trans` (`stock_id`);

The function get_customer_trans_details() in the file sales/icludes/db/cust_trans_details_db.inc is used in reporting/rep107.php (and in 110, 113 reports as well) to acquire the transaction list filtered as appropriate. The non filtered SQL in it is:

SELECT trans.*,
       trans.unit_price + trans.unit_tax AS FullUnitPrice,
       trans.description AS StockDescription,
       stock.units,
       stock.mb_flag
FROM 0_debtor_trans_details trans
        INNER JOIN 0_stock_master stock USING (stock_id)
ORDER BY id;

As the stock_master.stock_id and debtor_trans_details.id fields are primary keys, they stand already indexed. Hence the foreign key debtor_trans_details.stock_id is the one that is left to be indexed as it is the INNER JOIN field.

The said function can be modified to be:

function get_customer_trans_details($debtor_trans_type, $debtor_trans_no)
{
    if (!is_array($debtor_trans_no))
        $debtor_trans_no = array( 0=>$debtor_trans_no );
    $sql = "SELECT trans.*,
        trans.unit_price + trans.unit_tax AS FullUnitPrice,
        trans.description As StockDescription,
        stock.units, stock.mb_flag
        FROM ".TB_PREF."debtor_trans_details trans
             INNER JOIN ".TB_PREF."stock_master stock USING (stock_id)
         WHERE (";

    $tr=array();
    foreach ($debtor_trans_no as $trans_no)
        $tr[] = 'debtor_trans_no='.db_escape($trans_no);
    $sql .= implode(' OR ', $tr);

    $sql.=    ") AND debtor_trans_type=".db_escape($debtor_trans_type)."
        ORDER BY id";
    return db_query($sql, "The debtor transaction detail could not be queried");
}

@joe: want to include it in the core? Committed in my FAMods.

I can confirm that even after this, when a range of invoices is attempted to be printed, the webserver hangs. Single invoice printing works. Multi Invoice (range) printing fails at second invoice call of function get_sales_parent_lines() in file sales/includes/sales_db.inc.
In the first invoice call in the Training Co (Demo Co) it succeeds:

SELECT parent.*
FROM 1_debtor_trans_details parent
    LEFT JOIN 0_debtor_trans_details trans 
        ON trans.src_id=parent.id
WHERE trans.debtor_trans_type='10' 
  AND trans.debtor_trans_no='17' 
GROUP BY parent.debtor_trans_no 
ORDER BY parent.debtor_trans_no;

SQL SELECT debug Trail attached.

Web Server hangs when the statement $rep->NewPage() tries to get executed for the second page in rep107.php - tested in XAMPP v1.7.3 on WinXP SP3 / FireFox v37.0.

fa_IR is Farsi / Persian - is it very different from ar_EG (Arabic / Egypt) ?

fr_FR is French

Just translate the lang/new_language_template/LC_MESSAGES/empty.po into your language and name it fa_IR_2.4.0-1.po, upload it somewhere and place the link here and also send it to the dev team by email for inclusion into the official repo.

List of ISO-2 language codes | Library of Congress Standards.

3,362

(3 replies, posted in Translations)

msgmerge ar_EG-2.4.0-2.po empty.po > ar_EG_new.po

Now translate the merged .po into a .mo file and use it.

3,363

(20 replies, posted in Announcements)

Just filling in the .po file is not enough. You need to compile it as a .mo file and then use the .mo file. Some strings may come from extensions as well but in FA 2.4.x the extensions may not work fully. Upload your fully translated .po file and provide the link here.

3,364

(3 replies, posted in Translations)

Edit the .po file by comparing it with the empty.po file and put in the missing strings and then compile it with PoEdit (atleast in Windows) to a .mo file and use it instead of the existing one for your language.

3,365

(20 replies, posted in Announcements)

Set language preferences for the user / default, Logout, Login and see if the language is active.
On windows, the language should be installed in the OS as well.
In debian linux, install the language for example with:

sed -i -e 's/# ta_IN UTF-8/ta_IN UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales
update-locale UTF-8 ta_IN

3,366

(20 replies, posted in Announcements)

It is the .mo file that is used by the php gettext function. If moving the .po has solved your problem, then it is the lack of gettext functionality that caused the graceful degrade to gettext.php file where an array of translated strings would come in. File ownership may have been the issue otherwise but since 777 did not work that is ruled out.

3,367

(20 replies, posted in Announcements)

There have been several updates since this release. It is possible you "bug" if any has been sorted out. Install from Git. Make sure you have Arabic locale installed in your Operating System (Ubuntu).

3,368

(2 replies, posted in Reporting)

There are some minor issues you will come across on such upgradation.

Release Date: 2008-09-19
https://sourceforge.net/projects/tcpdf/files/OldFiles/tcpdf_4_0_027.zip
https://sourceforge.net/projects/tcpdf/files/OldFiles/tcpdf_4_0_027_php4.zip

The latest in that series was released on 2008-10-13:
https://sourceforge.net/projects/tcpdf/files/OldFiles/tcpdf_4_0_033.zip
https://sourceforge.net/projects/tcpdf/files/OldFiles/tcpdf_4_0_033_php4.zip

All these files are just under 9.5 MB.

Import and commit them (intervening versions as well) one by one into a local Git repo and see what changes occurred between successive versions and what breaks.

3,369

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

Pick something say from 100 to 250 - check what the standard existing plugins use and choose something different f you do not want the system to pick one out of it's convenience in case of a clash with existing ones.

3,370

(7 replies, posted in Setup)

FA sports a variety of APIs - SOAP / Restful APIs are listed in the wiki.

You can engage a developer to do it and submit it back to the project or better still, ask those at Stripe if they will make a plugin for FA for the community to use their payment services.

3,371

(7 replies, posted in Setup)

If there is a url for the specific e-commerce payment gateway, then it can replace the PayPal link in FA.

You can allocate customer payment to only their own bills in FA.

To allocate one customer's payment to another's bills, pass a journal voucher:
By Customer A Credit $ 3000
To Customer B Debit  $ 3000
The above must have supporting documents from both parties agreeing to the above transfer on your books of account.


Then allocate the $3000/- from Customer A to their own bill.

3,373

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

The "<<" is the binary bit left shift operator. The index 150 decimal is 96 hex which when shifted left by 8 bits (those in the first 8 bit range are reserved for system application security roles) will be 9600 hex which is 38400 dec. It is this number that you will see in the security_roles table's sections and areas fields for the various roles.

In case the said index has already been assigned, then the system automatically assigns the next available one.

Read the Wiki for more info. Read this post for insights.

add_access_extensions() have to be called inside extension files to have security areas maintained by core source code. This way module access areas does not interfere with core nor any other module security areas.

3,374

(0 replies, posted in Setup)

The Wiki has this post's contents.

Backup Code Analysis

  • The key file where the backup originates is admin/db/maintenance_db.inc

  • In it, the key function that starts the backup is function db_backup()

    • Parameter $tbpref makes it generic enabling usage of other prefixes possibly within extensions or in customisations

    • Creates the name of the backup sql file and goes to function db_export()

  • The actual backing up is done in the function db_export()

    • Parameter $tbpref makes it generic enabling usage of other prefixes possibly within extensions or in customisations

    • If no prefix is there for a company and other companies data resides in the same db, then all tables in the db including those of other companies in it too will get backed up!

    • Sets max chunk size before writing to sql backup file to 2MB or if present, from memory_limit value in php.ini

    • Writes standard parameters to sql backup as comments

    • Writes user comments to sql backup as comments

    • Acquire all table names in db and shortlist them based on prefix or all on no prefix!

    • SQL comment character hardcoded as "#" throughout

If your backup is taking too long, then tune the MySQL server with mysqltuner. In debian, install with apt-get install mysqltuner. Usage:

mysqlcheck -o mydbname
mysqltuner

and monitor with:

tail -fn0 /var/log/mysql.err
tail -n15 /var/log/mysql.err
vmstat 5 5

@jnunez: Hope the reports display correctly, in which case make sure that double-encoding does not take place when it is saved again.

BTW, for me, it prints and displays on screen correctly though it is stored encoded in the table field for both the sys_prefs table records and the item_codes table as well.

Tested on XAMPP v1.7.3 on WinXP SP3 (and Debian 6) and FF 37 browser.