Automatic Emailing of Receipts
  • mrembeddedmrembedded April 2010

    I think this would be a great feature:

    When an invoice is marked as paid, a receipt (if this feature is enabled) will be automatically emailed to the payee. This receipt could be configured similarly to an invoice in the settings and the relevant bits can be copied from the original invoice to populate the receipt data.

    This shouldn't be a big thing to implement but will be a very nice feature to have.

  • imzimz April 2010

    I agree this would also be a very nice addition to the system.

  • justinjustin April 2010

    thanks guys great idea

    have added it to our ideas list
    http://code.google.com/p/simpleinvoices/wiki/ideas

    keep posting any ideas, suggestions you have

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • sparky3387sparky3387 November 2011

    Its pretty easy to have this:

    ./include/class/payment.php
    Change line 120 to

    return $db->lastInsertId()


    ./modules/payments/save.php
    Change to:

    if($saved =='true')
    {
    $display_block = "Emailing Receipt to Customer<br />";
    $display_block .= $LANG['save_payment_success'];^M

    $invoice = getInvoice($_POST['invoice_id']);
    $biller = getBiller($invoice['biller_id']);
    $customer = getCustomer($invoice['customer_id']);

    $spc2us_pref = "Reciept_".$result;
    $pdf_file_name = $spc2us_pref . '.pdf';


    $export = new export();
    $export -> format = "pdf";
    $export -> file_location = 'file';
    $export -> module = 'payment';
    $export -> id = $result;
    $export -> file_name = $spc2us_pref;
    $export -> execute();

    $email = new email();
    $email -> format = 'invoice';
    $email -> from = $biller['email'];
    $email -> from_friendly = $biller['name'];
    $email -> to = $customer['email'];
    $email -> bcc = $biller['email'];
    $email -> subject = "Receipt from ".$biller['name']." is attached";
    $email -> attachment = $pdf_file_name;
    $message = $email -> send ();
    } else {

  • air0903air0903 February 7

    Good Morning, this is an excellent idea and would need to have running. Adapted what they say but does not work, I could be? Remains unanswered in index.php? Module = payments & view = save

  • just add " ; " on
    ./include/class/payment.php

    like this return $db->lastInsertId();

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories