Topic: Release 2.4.13

Announcement

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]http://mantis.frontaccounting.com.

Download instructions

In Sourceforge FrontAccounting (http://sourceforge.net/projects/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.

Common

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

  • php8: error. class.mail.inc. 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 session.inc (comment in the file added).

Sales

  • 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.

Purchasing

  • 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"

to

"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 https://github.com/FrontAccountingERP/FA/commit/51f9e62242aa3697a2d9350d6d1040d5c647c7a5

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

FA_2.4.12_to_FA_2.4.13_changed_files.zip 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 \
--omit-header

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

@apmuthu

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.

/Joe

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

empty.zip 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

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

Thanks.

Joe

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 empty.zip. 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.

/Joe

Post's attachments

empty.zip 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.

/Joe

Post's attachments

empty.zip 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 (gettext_order.sh) to extract the strings from the empty.po file and re-organise it in an alphabetical order is here:

#!/usr/bin/bash

cat empty.po | while read -r line
do  
  if [[ ${line:0:1} == "#" ]]
  then
    echo "${line}" | sed -e 's/\\/\//g' # 116.94 secs
#    echo "${line}" | tr '\\' '/' # 118.61 secs
  else
    echo -E "${line}"
  fi
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:

#!/bin/sh

# 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 gettext_order.sh

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

empty.zip 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

@apmuthu

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.

Joe

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

Re: Release 2.4.13

Post Release Fixes attached.

CHANGELOG

Github Master (Bleeding Edge) Download Link

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

Post's attachments

FA24_post_release_fixes_2022-09-29.zip 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 "
"--b640baceb3efdf08f767f71957c1a6cf
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:

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

JVBERi0xLjMKMS4wMCB3CjMgMCBvYmoKPDwvVHlwZSAvUGFnZQovUGFyZW50IDEgMCBSCi9N
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.

Wynand

Re: Release 2.4.13

PLEASE DO NOT USE ANNOUNCEMENT FORUM FOR BUG REPORTING!!

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

Joe

Re: Release 2.4.13

@seahawk
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.

Joe