grumpy1948
grumpy1948
Offline
0
Hi Germinal
We are experiencing issues with sending emails at the time of invoice creation using the API. We need to create several hundred invoices at one time and if I set the sendemail flag in the created invocies to true the script that uses the createInvoice API fails after processing about 50 invoices due to overloading the web server. This is due to the demands of dompdf creating the invoice and the smtp interface sending the emails. There is also a further problem in that the pdf invoice created in this mode has a 'can't find logo image file' message embedded in the document which is again a symptom of excessive cpu demands. Creating a single invoice in the same way results in .pdf invoice with the correct url to the image.
Creating a batch of invoices without the email flag set works perfectly. However having to manually send 500 invoices from the management screen is again undesirable.

Is there a corresponding Edit Invoice API that will cause the pre-existing invoice emails to be sent if the sendemall flag is set from false to true?

We are sending these invoices to both registered and unregistered Contacts. Is there a secure way to make a downloadable copy of the individual invoice available to unregistered Contacts without the need for them to register on the website?

Frank W
Responses (2)
  • Accepted Answer

    grumpy1948
    grumpy1948
    Offline
    Friday, April 28 2017, 04:38 PM - #Permalink
    0
    I can't disagree on the memory side of things. The problem with the batch invoice method is that it requires a great deal of manual intervention, there is no way I can see to set a start and end invoice number for each batch, and there is no way to select a different EMail Message to distinquish between first sends and resends (the latter needs to have an additional prefix/header message stateing that it is a copy/retransmission). At the present I have used a different 'TEXT_FOR_EMAIL_PDF' language override for the site and administration entries. The site one is used by the createContact API and the latter by the Administrator sendemail function. If we have to use the latter for both functions I lose that, albeit work around, functionality.

    The only From To options are for invoice dates, as all invoices will be created on the same date that is of no use whatsoever.

    There is no way I can see to select whether to view sent or not sent invoices, nor to increase the number of invoices in the view as per most of the standard Joomla list views (users, Menus, Articles etc). This would reduce the possibility of accidental multiple sends (the view could be refreshed after each batch so that only unsent invoices can be selected each time) and and provide flexibilty in the number of invoices in each batch.

    It would also be very useful to see the ID in the view, at present that column is hidden and the column space used for the Edit 'button', because that is 'key' between invoicemanager Contacts and our membership database record IDs.

    All wishful thinking I know. But I guess your customer base is not so huge so its not worth your while to enhance the product.

    Frank
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 28 2017, 03:57 PM - #Permalink
    0
    Hello

    this sounds normal. If you attempt to create hundreds of invoices with a custom batch script, with the emails and PDFs.. that's a lot of memory.

    what I would do if I were you is to leave the flag OFF, and then just use the batch email invoice function, in gorups of 50 for example (or whatever works for your memory restrictions)
    The reply is currently minimized Show
Your Reply