Topic: Release 2.4.13


This is a 2.4.13 release, which is mainly a seriously bugfix release, but also contains an improvement and additional security fixes.

More php 8 problems has been fixed. This release should now be PHP 8 compatible. The following versions has been tested: 8.0.0, 8.0.7, 8.0.12 and 8.1.6. In Mysql 8, groups is a reserved word and was fixed by adding Backticks. Was only a problem when no table prefixes was used.

Please report any bugs/problems found via our Mantis Bugtracker at [size=5]

Download instructions

In Sourceforge FrontAccounting (, select
Files -> FrontAccounting 2.4 ->2.4.13.

For Windows users select the zip file. For all other users select the tar.gz file.


  • php8: strpos(): Passing null to parameter #1 ($haystack) of type string in is deprecated. Fixed.

  • php8: error. line 149. #5 parameter cannot be null.

  • Feature. Show also Upcoming Purchase Invoices in Dashboard.

  • FA should not be used via unsecure http protocol. If you really need this - change SECURE_ONLY constant in (comment in the file added).


  • Invoice not converting from Delivery Note due to PHP 8 floating bug (dec in units).

  • php8: cannot generate recurring invoices. Fixed.

  • Customer Credit note could be posted without customer selected when search customer List is enabled in Company Setup. Fixed.

  • php8: array bool error in customer-payments.php fixed.


  • get_stock_gl_code function called twice in the add_supp_invoice. Fixed.

  • Supplier Invoice and Credit Note can be posted without supplier selected when search supplier List is enabled in Company Setup. Fixed.

Bank and General Ledger

  • Incorrect Journal Balance (from sales invoice) when many decimals in tax and price. Fixed.


Re: Release 2.4.13

Please correct lang/new_language_template/LC_MESSAGES/empty.po:

"Content-Type: text/plain; charset=ISO_8859-1\n"


"Content-Type: text/plain; charset=ISO-8859-1\n"

The underscore is not valid in charset.

Re: Release 2.4.13

Oops. Will-do.

4 (edited by apmuthu 09/23/2022 04:18:37 pm)

Re: Release 2.4.13

Release date 2022-09-18 as of GitHub commit

SF Download Link
MD5: 1ac64b93254febdb59eaab6cac02b1eb
Filesize: 1,879,784 bytes

The attachment contains the language fix from this commit but will need this commit too.

First 3 day download stats in SourceForge

Post's attachments 147.8 kb, 4 downloads since 2022-09-23 

You don't have the permssions to download the attachments of this post.

5 (edited by apmuthu 09/23/2022 08:12:16 pm)

Re: Release 2.4.13

Inadvertently, the install/lang strings got injected into the core empty.po file during the release of 2.4.13.

1 string is changed between the older core and the current one:
" overdue Purchase Invoices"
is now
" unpaid Purchase Invoices"

It is better to re-create the core empty.po file and make for a re-release.

There is really no new strings in the empty.po other than the changed string listed above.

Here is a quick 'n dirty script to extract all gettext strings in FA:

find /var/www/frontac/ \( -name "*.php" -o -name "*.inc" \) ! -path "./tmp/*" | \
sort -bdf | \
xargs xgettext \
--default-domain=myapp \
--output=myapp.pot \
--language=PHP \
--indent \
--no-wrap \
--sort-output \

The --omit-header can be omitted along with the last back slash for comparison purposes like in WinMerge.

As these strings will be sorted, it will be easy to compare *.po files between versions. Comments can be stripped with:

grep ^'^#' sourcefile.txt > output.txt

Re: Release 2.4.13


I used a linux bash file from Janusz, that I translated to Windows bat file. I see that it is not working correctly.

My environment is Windows 11 and I am working in WampApache64 and this environment is very handy trapping  php 8 errors.

Please provide an empty.po file for download here. Are you good at translating linux bash file into Windows bat file? If so, please provide a translation here.


Re: Release 2.4.13

Tools like Online bash to windows batch file convertor will not address missing linux binaries.

Install Git for windows (47 MB) and TortoiseGit (20 MB).

Right Click on any folder (like frontac24 repo folder) and choose "Git Bash Here" and you can execute linux commands natively. Some missing linux binaries for windows like wget can be obtained from the likes of here. The wget.exe file needs to be placed at C:\Program Files\Git\mingw64\bin.

Re: Release 2.4.13

Attached is the empty.po for the core. Please verify where "\\n" string is there as they are from js files which have not been parsed but taken from the pot files.

Post's attachments 69.9 kb, 3 downloads since 2022-09-24 

You don't have the permssions to download the attachments of this post.

Re: Release 2.4.13

I do have and use git and Tortoise git, so I will give your advice a try.



Re: Release 2.4.13

Hello @apmuthu,

I have now found the solution for fixing the empty.po file in Windows.

Please have a look at the The empty.po is sorted and no install files are included longer. And the line-ending is unix.

Could it be better?

If ok, I will commit it to stable.


Post's attachments 66.1 kb, 2 downloads since 2022-09-24 

You don't have the permssions to download the attachments of this post.

Re: Release 2.4.13

The backslashes for file paths should all be forward slashes. Will check the rest in a while.

Re: Release 2.4.13

The following when run on your file may suffice to change backslashes to forward slashes:

cat empty_bs.po |  tr '\\' '\/' > empty_fs.po

Further "if" can be introduced to restrict it to lines that start with "#".

Re: Release 2.4.13

Still, the Windows xgettext is rather buggy.
I have done this extraction now with Poedit and all the conditions are fullfilled. A minor information header is put at the top according to recomendations.
Take a look at the final here:

I will push this to repo tomorrow.


Post's attachments 65.5 kb, 1 downloads since 2022-09-25 

You don't have the permssions to download the attachments of this post.

Re: Release 2.4.13

The final script ( to extract the strings from the empty.po file and re-organise it in an alphabetical order is here:


cat empty.po | while read -r line
  if [[ ${line:0:1} == "#" ]]
    echo "${line}" | sed -e 's/\\/\//g' # 116.94 secs
#    echo "${line}" | tr '\\' '/' # 118.61 secs
    echo -E "${line}"
done  > empty_ordered.po;

I have added in the "fuzzy" line and the "Report Bugs to" line as well and ordered all the strings and attached it herein, Compared with yours too and strings are all okay except for some #references out of order.

The timer script for efficiency checks is:


# This should be at the top of the script to get the start time of the script
start=$(date +%s.%N)

# Here you can place your function
sh $1

# bc not there in Git Bash
# duration=$(echo "$(date +%s.%N) - $start" | bc)
fin=$(date +%s.%N)
duration=$(awk '{print $1-$2}' <<<"${fin} ${start}")
execution_time=`printf "%.2f seconds" $duration`

echo "Script $1 Execution Time: $execution_time"

# Usage: timer

Place the timer script in C:\Program Files\Git\mingw64\bin folder for windows users as there is no "bc" command in the minimal bash in Windows Git and an "awk" workaround is substituted and used for testing any script.

Post's attachments 66 kb, 1 downloads since 2022-09-25 

You don't have the permssions to download the attachments of this post.

Re: Release 2.4.13


After consulting Janusz regarding the --sort-output, we have decided NOT to change the sorting now. If this could be matured a bit then maybe in some coming minors.

A final version of the empty.po will be committed to stable in a while.


16 (edited by apmuthu 09/29/2022 05:42:23 pm)

Re: Release 2.4.13

Post Release Fixes attached.


Github Master (Bleeding Edge) Download Link

These fixes can be applied to (overwrite) the release version to be fully functional.

Post's attachments 252.7 kb, 7 downloads since 2022-09-29 

You don't have the permssions to download the attachments of this post.

17 (edited by seahawk 10/18/2022 11:21:04 am)

Re: Release 2.4.13

I have now updated one of my FA installations on PHP8 and got the following errors:

1. On 2.4.12 it did not email the invoice when the server runs on PHP8, when reverting to 7.4 it sends correctly. On 2.4.13  with PHP8, the email is sent, but only in text. The invoice is then also in text and no copy to the bcc field. Also now pdf attachment.

"Subject: Invoice AWI0152 from Aquilla "
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit

Dear ,"

The client's name is not in the email,

The rest of the content sent to the client:

Content-Type: application/unknown; name="InvoiceAWI0152.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="InvoiceAWI0152.pdf"

ZWRpYUJveCBbMCAwIDU5NS4yOCA4NDEuODldCi9SZXNvdXJjZXMgMiAwIFIKL0NvbnRlbnRz" This goes on for a bit.

This is just one error that I have picked up.

When reverting back to 7.4 it sends it correctly, to the client but does not send a bcc email to the company.


Re: Release 2.4.13


I cannot reproduce this for release 2.4.13. Regarding sending to bcc, I can see a problem. Will investigate this.


Re: Release 2.4.13

No, the BCC is sent also without problems. Bear in mind, that the bcc is never seen on the emails. It is only a copy with the from and to on. So if you use the same email as the normal  as bcc too, you will get confused. But it works.

So at my place everything works ok both in php8 and minors.