[Spce-user] Invoice sending with generate_invoices.pl
Oleg
spce at irg-x.net
Wed Mar 1 05:49:12 EST 2017
Hello,
I have noticed that "generate_invoices.pl --prevmonth --sendonly" sends
PDF files to email addresses of other clients. It creates the PDFs
correctly, but when sending them, for some reason, it looks as if there
might be an error in how the list of invoices to be sent is generated.
Example
-------
Mar 1 04:05:16 ngcp-panel: DEBUG: send email for:
provider_contact_id=2;client_contact_id=38;
client_contact->email=anonymous at anonymised.com;
invoice_ids=125,126,127,128,120,129,130,131,132,133,134,135,136,137,138;
Client with contact_id=38 receives invoice_id=125, while it really has
invoice_id=124 assigned. A SQL query
(https://gist.github.com/anonymous/bec2ad716ed4b71ca1c9fbb94138f296)
gets me the following output for this client:
+-------+-------+--------+---------------------+--------------------------+-------------------+
| cliid | invid | total | sent | email
| customer |
+-------+-------+--------+---------------------+--------------------------+-------------------+
| 33 | 124 | 5.87 | 2017-03-01 04:05:16 |
anonymous at anonymised.com | Anonymous Client |
+-------+-------+-------+----------------------+--------------------------+-------------------+
I wouldn't know how to reproduce this on an empty db, nor have I been
able to establish if the problem is in the generate_invoice.pl or in the
database data somewhere.
Appreciate any help I can get on how to debug this further.
More information about the Spce-user
mailing list