Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic notification for recurred invoices during cron task is not sending the invoice pdf #32069

Open
Cirillo007 opened this issue Nov 22, 2024 · 0 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@Cirillo007
Copy link

Bug

Hello everyone,

when using the cron and the creation of new recurred invoices, using the automatic notification of new invoice for third party, the mail send talks about an invoice that is not validated (PROV) and there is no pdf attached to the mail.

Discovering the log, it seems that the sending process come before the validation process of invoice. That's why there is no pdf and name is PROV.

Dolibarr Version

19.0.3

Environment PHP

8.2

Environment Database

No response

Steps to reproduce the behavior and expected behavior

For a client, I've decided to notify him every time there is a new invoice validated.
So I've created the third party as follow:
image

I create a recur invoice model.

In email I've selected the right format FCAuto as follow:
image

In automatic notification I've selected also the right preset:
image

The cron worked well and created the new invoice as it should do so till this point it's all ok
image

image

But in the email received, it says:
image

So first thing wrong:

  • the name of the invoice is PROV47 that is an invoice not validated.
  • the pdf doesn't exists

In the invoice module all is correct to me
image

When I saw the lof, I saw that mail are send before validating the invoice.
In the log I see this :
CMailFile::CMailfile: charset=UTF-8 from=
CMailFile::CMailfile: subject= Votre facture (PROV44)
CMailFile::CMailfile: sendmode=smtps addr_bcc=, replyto=
HookManager::initHooks Loading hooks: context=mail-path=/removeconf/class/actions_removeconf.class.php
CMailFile::sendfile: sendMsg, HOST=ssl://ssl0.ovh.net, PORT=465
CMailFile::sendfile: mail end success

and AFTER I see this:
commonGenerateDocument modele=sponge outputlangs->defaultlang=fr_FR

So that could tell that the mail is send before the validation process.

Is it enough to understand this bug ?

I had also the same issue while validating memberships where a new member received the mail of the new membership saying that it was enclosed the invoice, but without the invoice. Maybe I can reproduce the issue in another article ?

Thank you,

Attached files

No response

@Cirillo007 Cirillo007 added the Bug This is a bug (something does not work as expected) label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant