Tagged: recurring invoices
January 11, 2021 at 11:50 am #1310
First of all, thank you for your efforts to keep this software alive. It’s a great job.
I have recently updated to 2019 version (because I can’t install php 7,4 in my server) from a very old version and finally I’ve made nearly everything work (I had problems with Spanish accents in names in the manage tables script, btw).
Then, my question now is that I want to establish a recurring invoice but when cron runs is gives me an error:
<array> <cron_message>Cron started</cron_message> <cron_message_2>Cron ID: 2 - Cron for Factura 20098 with start date of 2021-01-10 and no end date that runs each 1 day, was run today :: Info diff=1</cron_message_2> <email_message>One or more required fields is missing</email_message> </array>
It seems as it was looking somewhere for the e-mail body content. Is it? In that case, Where can I set the e-mail body for a recurring invoice? Also, do the recurring invoices generate a new “normal” invoice with it’s new invoice number and dates?
I have tested the email with pdf attach delivery and it works. What it doesn’t is the recurring one.çJanuary 12, 2021 at 7:28 am #1311RRowleyParticipant
The email body is automatically set by the code. I don’t think that is the problem. However, I don’t know which field is empty. I’ve made a modified version of the Email.php file that will put info in the tmp/log/php.log (aka error log) file indicating which email field is empty.
Extract the Email.php file from the zip file and save it in your Inc/Claz folder over the version that is there. If you run cron, you can see what it puts in the error log and let me know.
Attachments:January 12, 2021 at 10:02 am #1313
Hmmm, it looks like there is something more.
I have tried to create a new invoice to do the recurring, as I realized that I had done the testing with an imported one, but it doesn’t work.
So I’m going to see what else is going on and I’ll keep you updated. Thanks.January 12, 2021 at 11:37 am #1314
This is what the logs are saying:
[12-Jan-2021 20:09:13 Europe/Madrid] PHP Notice: Undefined index: tax_id in /var/www/vhosts/mydomain.es/httpdocs/fact2/Inc/Claz/Invoice.php on line 1344 [12-Jan-2021 20:09:13 Europe/Madrid] PHP Warning: explode() expects parameter 2 to be string, array given in /var/www/vhosts/mydomain.es/httpdocs/fact2/Inc/Claz/Email.php on line 424 [12-Jan-2021 20:09:13 Europe/Madrid] PHP Warning: array_filter() expects parameter 1 to be array, null given in /var/www/vhosts/mydomain.es/httpdocs/fact2/Inc/Claz/Email.php on line 424 [12-Jan-2021 20:09:13 Europe/Madrid] PHP Notice: Array to string conversion in /var/www/vhosts/mydomain.es/httpdocs/fact2/Inc/Claz/Email.php on line 435 [12-Jan-2021 20:09:13 Europe/Madrid] Email::setTo() - Invalid TO address[Array] [12-Jan-2021 20:09:13 Europe/Madrid] to is empty [12-Jan-2021 20:09:13 Europe/Madrid] Email::send() - One or more required fields is missing
the “To” field should not be empty, as there is an e-mail in the e-mail field of the client. My mail has a “.es” domain (Not sure if could be related).January 13, 2021 at 9:47 am #1315RRowleyParticipant
The “to” field is set to the customer and/or the biller email depending on the option to send to either one or both in the recurrence record.
The error for the tax_id field is a bug in the code. I’ve attached new Email.zip file that contains updated Email.php and Invoice.php files. The first removes the debug statements I added in the previous change, but the Invoice.php contains a fix for the tax_id issue. Extract both of these to the Inc/Claz directory.
At this point, I’m not able to test that changes, so I ask that you do and let me know the result so I can hopefully at them to the next version of 2019.2
- This reply was modified 4 days, 14 hours ago by RRowley.
- You must be logged in to reply to this topic.