trafficpest wrote:

So its working out now? It is a pretty old plugin, and looks like php has changed to be quite a bit more strict recently.
downgrade php or upgrade FA are best bets

I cannot downgrade on PHP since I am running Joomla sites where I need the higher PHP. @Joe solutions above worked, but when I upgraded to 2.4.18 the errors above reappeared, so I just used my replacement files and then we were up and running again.

2

(36 replies, posted in Reporting)

seahawk wrote:
trafficpest wrote:

I tested it and it works in my install (though it worked for me prior to the fix)
I have created a mail branch in my extensions repo again with the fix.


https://github.com/trafficpest/FA24ex … tree/mail


@apmuthu I didn't forget to hash the files for init this time if you want to pull such a trivial fix. lol


Cannot download the file.

The line 131 error on PHP 8.2 has now gone away but it has two new errors:


Undefined array key 1 in file: /home/mysite/public_html/accounts/reporting/includes/class.mail.inc at line 88

trim(): Passing null to parameter #1 ($string) of type string is deprecated in file: /home/mysite/public_html/accounts/modules/mail/includes/PHPMailer/class.phpmailer.php at line 873

Seems to be quite a challenge.


After I updated the following bugs reported in this feed, https://frontaccounting.com/punbb/viewtopic.php?id=10451
the errors disappeared.

Were these changes implemented in 2.4.18, since after the update I had to make the changes again on the same files since the errors reappeared?

4

(36 replies, posted in Reporting)

seahawk wrote:

@trafficpest I am getting the following error on only one site with the same setup as three other sites with the SMTP class.mail replacement file:

TAX INVOICE IN003/2024. Sending document by email failed. Email: (it is a working email address, and the SMTP setup was checked and rechecked, but no luck in sending the invoice.)

Not sure which other file might have an impact on the sending.

I have updated FA to 2.4.18.

It is a simular issue that happened in 2013 and 2016 by searching the phrase "Sending document by email called."


This issue on another installation is still there despite the updates.

5

(36 replies, posted in Reporting)

trafficpest wrote:

I tested it and it works in my install (though it worked for me prior to the fix)
I have created a mail branch in my extensions repo again with the fix.


https://github.com/trafficpest/FA24ex … tree/mail


@apmuthu I didn't forget to hash the files for init this time if you want to pull such a trivial fix. lol


Cannot download the file.

The line 131 error on PHP 8.2 has now gone away but it has two new errors:


Undefined array key 1 in file: /home/mysite/public_html/accounts/reporting/includes/class.mail.inc at line 88

trim(): Passing null to parameter #1 ($string) of type string is deprecated in file: /home/mysite/public_html/accounts/modules/mail/includes/PHPMailer/class.phpmailer.php at line 873

Seems to be quite a challenge.

6

(36 replies, posted in Reporting)

@trafficpest I am getting the following error on only one site with the same setup as three other sites with the SMTP class.mail replacement file:

TAX INVOICE IN003/2024. Sending document by email failed. Email: (it is a working email address, and the SMTP setup was checked and rechecked, but no luck in sending the invoice.)

Not sure which other file might have an impact on the sending.

I have updated FA to 2.4.18.

It is a simular issue that happened in 2013 and 2016 by searching the phrase "Sending document by email called."

7

(36 replies, posted in Reporting)

The strange this is despite the error, it is still sending the email as well as the Bcc emails via the smtp.

8

(36 replies, posted in Reporting)

seahawk wrote:

On all three client sites the above SMTP Mailer setup is working.

On one site I get the following error:

Creation of dynamic property email::$phpmailerCharSet is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/class.mail.inc at line 131

I have tried to redo the installation with still the same error. It is sending the email even with the error. Do not know why this is the only site with this error.

The Class.mail.inc at line 131 - 142 has the following code as downloaded for use with SMTP PHPMailer:

    public function send() {
        $this->phpmailerCharSet = $this->charset;

        //send the message, check for errors
        if (!$this->phpmailer->send()) {
            error_log('Mailer error:' . $this->phpmailer->ErrorInfo);
            //echo "Mailer Error: " . $this->phpmailer->ErrorInfo;
            return 0;
        } else {
            return 1;
        }
    }
}

-----------------
It is the same code on other installations and none of them has this particular problem.

Thanks Joe.

10

(36 replies, posted in Reporting)

On one of the installations of FA 2.4.17 get an age-old error. Do not know why on all the other FA installations I did not get this error: Sending document by email failed.

I have redone the PHPMail installation and replacement of all the files as per instruction but the error remains. The email address is correct and the SMTP mail sending setup is correct.

I have even deleted the mail account on the server and redo the setup, still have the same error.

Got this post for the same errors https://frontaccounting.com/punbb/viewtopic.php?id=6369

I am stuck again.

11

(36 replies, posted in Reporting)

On all three client sites the above SMTP Mailer setup is working.

On one site I get the following error:

Creation of dynamic property email::$phpmailerCharSet is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/class.mail.inc at line 131

I have tried to redo the installation with still the same error. It is sending the email even with the error. Do not know why this is the only site with this error.

12

(36 replies, posted in Reporting)

apmuthu wrote:

Pulled in and updated Unofficial Extensions Repo.

@apmuthu does not seem to have pulled through. Re-downloaded the file from your link, but that file has not changed same error.

13

(36 replies, posted in Reporting)

trafficpest wrote:

oh good catch! I didn't even notice that.

In the new file in the function pass the $filename then add the check if it is passed like the old version then pass it to 2nd argument in phpmailer addAttachement function. In the end the function should be this

public function attachment($file, $filename=null) {
  if (!isset($filename))
    $filename = basename($file);
  $this->phpmailer->addAttachment($file, $filename);
}

Changed it in my file and it works and display correctly now. Thanks @trafficpest.

14

(36 replies, posted in Reporting)

@traficpest I installed the extension, took me a while but eventually got it.

It works great and just one issue, the old system have the attachment as the Invoice number, but on this mailer the attachment is just a long set of numbers.

Had a quick look at the code in class.mail.inc for both files:

Old File at line 68:

function attachment($file, $filename=null)
    {
        if (!isset($filename))
            $filename = basename($file);
        $this->attachment[$filename] = $file;
    }

New replacement file line 116:

public function attachment($file) {
        $this->phpmailer->addAttachment($file);
    }

How do we change that to use the invoice number instead of a long list of codes on the pdf attachment?

15

(36 replies, posted in Reporting)

I agree, it becomes an issue with more and more servers and client email servers.

I can set up my mail server to send emails in my Joomla Installation. Works better than via the current setup in FA.

I now save my invoices and send them via Outlook.

Get the following message after the above updates:

"This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once."

This happened after I loaded a new customer and wanted to issue a direct invoice. I was still in the same tab. Using Edge.

On the setup Tab/ Company Setup gives the following error when adding the company logo and selecting update:

Creation of dynamic property TCPDF::$padding is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/tcpdf.php at line 1172

joe wrote:

I understand that you guys are very busy.

Anyhow, I am sure the fixes are ok and I am pushing the files to stable repo now.

Joe

Thank you for the changes. I have updated it as indicated by you and it works, the errors have gone.

Sorry for not coming back earlier, I did not receive the notification.

I appreciate your assistance. I trust that this will be correct in future updates.

It seems that there were several requests over the years for a POS in FA.

In searching all the information it seems that very few if any of the suggestions ever materialised except one that I could find that has updates https://sourceforge.net/projects/chromispos/

Is there a possibility of an integration between these software? Unless someone else has an alternative constructive idea.

Second related question: Can you link a till printer to the standard FA installation to print a small Till printer invoice instead of an A4 size page?

When I set my PHP to 8.2 with FA 2.4.17 the following error shows:

Creation of dynamic property front_accounting::$renderer is deprecated in file: /home/mydomain/public_html/accounts/frontaccounting.php at line 66 in Sales TAB when FA opens. When I refresh the page the error goes away.

When I switch back to php 8.1 it goes away.

--------------------------------------------------------

Another error on PHP 8.2 when you want to add a new direct invoice for a client:

Unhandled exception [0]: Attempt to assign property "reference" on null. in file: /home/mysite/public_html/accounts/sales/sales_order_entry.php at line 267

----------------------------------------------------------------------------------------------
Another PHP8.2 Error when you do a trial balance in Exel

Creation of dynamic property Spreadsheet_Excel_Writer_Parser::$ptg is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/Workbook.php at line 2412

There are 26 lines of errors in workbook.php

Creation of dynamic property FrontReport::$formatRight is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/excel_report.inc at line 127

6 lines of errors in excel_report.inc

21

(5 replies, posted in Accounts Receivable)

Another PHP8.2 Error when you do a trial balance in Exel

Creation of dynamic property Spreadsheet_Excel_Writer_Parser::$ptg is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/Workbook.php at line 2412

There are 26 lines of errors in workbook.php

Creation of dynamic property FrontReport::$formatRight is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/excel_report.inc at line 127

6 lines of errors in excel_report.inc

22

(5 replies, posted in Accounts Receivable)

Another error on PHP 8.2 when you want to add a new direct invoice for a client:

Unhandled exception [0]: Attempt to assign property "reference" on null. in file: /home/mysite/public_html/accounts/sales/sales_order_entry.php at line 267

23

(5 replies, posted in Accounts Receivable)

This is the content before and after line 66 in the frontaccounting.php file.

function display()
        {
            global $path_to_root;
           
            include_once($path_to_root . "/themes/".user_theme()."/renderer.php");

            $this->init();
            $rend = new renderer();
            $rend->wa_header();

            $rend->display_applications($this);

65            $rend->wa_footer();
66            $this->renderer =& $rend;
67        }

When I refresh the page it goes away. Do not know what is the issue?

24

(5 replies, posted in Accounts Receivable)

Has this issue been resolved?

It seems that The warning message I am seeing is related to the use of a feature in PHP called “dynamic properties”. Dynamic properties allow you to set and get object properties by using variable names, like you are doing in the __construct method of your database class. They indicate that this feature has been deprecated in PHP 8.2 and later versions.


How do we fix this in the frontaccounting.php?

I am using FA 2.4.17 and PHP 8.2

See the lines in the comment below.

25

(36 replies, posted in Reporting)

That happens when I updated FA to 2.4.17. Email an invoice to a client and that is what the client receives.

Then I will replace the standard class.mail.inc with the the one I have changed as indicated. by changing all the \n code in the file to \r\n and it works on both PHP7.4, HP8.0, 8.1 and 8.2.

Then it sends the invoice correctly as a PDF attachment.