[Spce-user] Invoice sending with generate_invoices.pl

Oleg spce at irg-x.net
Wed Mar 1 05:49:12 EST 2017


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.


Mar  1 04:05:16 ngcp-panel: DEBUG: send email for: 
client_contact->email=anonymous at anonymised.com; 

Client with contact_id=38 receives invoice_id=125, while it really has 
invoice_id=124 assigned. A SQL query 
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