Simple Invoices logo
    • CommentAuthorclunky
    • CommentTimeNov 7th 2007 edited
     permalink
    Hi
    Cool programme this, like it loads ;-)
    I have Version: 20071002 stable, up and runing (albeit after a load of messing about with the language files and then realising that I have php 4.4.6) all things seemed to be working just fine, exporting invoices to xls, doc and pdf. Also emailing to pdf worked and successfully received some tests.
    After a bit of messing about, changed Biller in .lang to Supplier (just my own personal taste) and a few other bits and pieces, and changed the logo to another one, I tried to email a new invoice.
    It produced no errors but the email arrived without the attachment.

    Now it could be my ISP messing about thinking that I am receiving loads of spam or similar or it could be something I have "touched".
    Now if anyone can help me fix this I would be greatful.
    Cheers
    • CommentAuthorjustin
    • CommentTimeNov 8th 2007 edited
     permalink
    Hey Clunky,

    first thing is to check is it actually making a PDF

    Simple Invoices stores the PDFs in the ./include/pdf/out directory - after you send an email see if theres a PDF in there with the correct timestamp on the file
    - also may need to check ./include/pdf/cache

    if theres a PDF there - then Simple Invoices should sent it and it may be the ISP (but i doubt it)

    if theres no PDF then its is a Simple Invoices issue

    let me know how you go

    also re php 4
    - if the above doesnt work you can try going a release back in Simple Invoices and it should work fine in php4 without any modification

    Cheers

    Justin
    • CommentAuthorclunky
    • CommentTimeNov 8th 2007 edited
     permalink
    Hi Justin
    The pdf's are created in ./include/pdf/cache but not in ./include/pdf/out.
    Where is the code to generate the send from cache?
    Cheers
    • CommentAuthorclunky
    • CommentTimeNov 8th 2007 edited
     permalink
    Hi Justin
    Going back a version to see if that works ok ;-)
    • CommentAuthorclunky
    • CommentTimeNov 8th 2007 edited
     permalink
    :-( no joy with this one either
    the pdf is in cache and a binary file called test.tpl 0 bites is in out.
    any ideas
    • CommentAuthorclunky
    • CommentTimeNov 8th 2007 edited
     permalink
    OK, now... Version: 20070829 stable.

    The email which worked originally had its content type set to
    Content-Type: multipart/mixed;

    The emails which are not attaching now have their content type set to
    Content-Type: multipart/alternative;

    Presumably this is due to the pdf not being attached for some reason?

    any ideas?
    cheers
    • CommentAuthorclunky
    • CommentTimeNov 8th 2007 edited
     permalink
    AHHA......
    Think I may have sussed this out.
    If you alter the invoice or quotation settings in >> options >> invoice preferences >> manage invoice preferences and edit say, Quote by editing the Invoice Wording, and set it to Quotation of works, it fails to send the attachment.

    So therefore do not use more than one word for the Invoice Wording!!

    Hope this helps someone else ;-)

    I don't know if doing the same with the other fields will cause the same error, don't want to try as it has been a real pain trying to iron this out !!
    • CommentAuthorjustin
    • CommentTimeNov 8th 2007 edited
     permalink
    ahhh..

    the name of the PDF is determined by the Invoice wording for that invoice

    ie. if you set it to Quote then the PDF will be names Quote13.pdf

    so if you name if "My Quote" something be in emailing or PDF creation won't be happy with the space in the file name

    i'll take a look at it

    Cheers

    Justin
    • CommentAuthorapmuthu
    • CommentTimeDec 6th 2007 edited
     permalink
    Just checked in a fix to /modules/invoices/email.php to allow spaces in Invoice Preference Name in both the next-rel and trunk SVN.

    In the above file (next-rel: Line 102 and trunk: Line 93) we replace the line
    $mail->AddAttachment("./include/pdf/cache/$preference[pref_inv_wording]$invoice[id].pdf"); // add attachmentswith:
    $spc2us_pref = str_replace(" ", "_", $preference[pref_inv_wording]); // Ap.Muthu added to accomodate spaces in inv pref name
    $mail->AddAttachment("./include/pdf/cache/$spc2us_pref$invoice[id].pdf"); // add attachments
    • CommentAuthorjustin
    • CommentTimeDec 6th 2007 edited
     permalink
    Thanks Ap!!

    Cheers

    Justin
    • CommentAuthoralja
    • CommentTimeDec 11th 2007 edited
     permalink
    Hi, I have this problem now, no email I just got a gray page after sending the message. I have checked the pdf/out folder and theres nothing there but in the pdf/cache folder is the pdf file created.... how could I fix this?

    Thanks.
    • CommentAuthorjustin
    • CommentTimeDec 12th 2007 edited
     permalink
    Hey Alja,

    have you been able to create PDF normally in Simple Invoices?

    you might need to just chmod 777 the pdf dir

    let us know

    Cheers

    Justin
    • CommentAuthoralja
    • CommentTimeDec 12th 2007 edited
     permalink
    Thanks Justin, I have chmod 777 first the out folder and now the pdf (chmod -R) but no luck... As I mentioned before the file is created in the cache folder, I can see it there but not in the out folder. I am able and was before the chmod 777 to create the pdf files and download them without problem.