Topic: Email Receipt to customer

Hi

Is it possible to add feature to be able to email the receipt to the customer. should use the same email under the branch as that for invoicing.

regards

wynand

Wynand

Re: Email Receipt to customer

I also want to do exactly like this.

Can anybody help?

regards

saad

Re: Email Receipt to customer

+1
and please consider https://frontaccounting.com/punbb/viewtopic.php?id=5815 as a feature request.
Sending out files with random names is not good for anyone.

4 (edited by poncho1234 04/30/2019 10:18:13 pm)

Re: Email Receipt to customer

@apmuthu,
@joe,

This is an old thread, but it hasn't been answered: All the other nine document print reports have an email to option; but Print Customer Receipt rep112.php does not? Is there a reason for this? Or is it an omission?

The following code works but needs to be checked:-

---\reporting\reports_mainOLD.php
+++ \reporting\reports_main.php
@@ -156,6 +156,7 @@
     array(    _('From') => 'RECEIPT',
             _('To') => 'RECEIPT',
             _('Currency Filter') => 'CURRENCY',
+            _('Email Customers') => 'YES_NO',
             _('Comments') => 'TEXTBOX',
             _('Orientation') => 'ORIENTATION'));

and

---\reporting\rep112OLD.php
+++ \reporting\rep112.php
@@ -60,8 +60,9 @@
     $from = $_POST['PARAM_0'];
     $to = $_POST['PARAM_1'];
     $currency = $_POST['PARAM_2'];
-    $comments = $_POST['PARAM_3'];
-    $orientation = $_POST['PARAM_4'];
+    $email = $_POST['PARAM_3'];
+    $comments = $_POST['PARAM_4'];
+    $orientation = $_POST['PARAM_5'];
 
     if (!$from || !$to) return;
 
@@ -82,9 +83,14 @@
 
     $cur = get_company_Pref('curr_default');
 
-    $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
+    if ($email == 0)
+        $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
        if ($orientation == 'L')
         recalculate_cols($cols);
+    if ($email == 1)
+        {
+            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+        }
     $rep->currency = $cur;
     $rep->Font();
     $rep->Info($params, $cols, null, $aligns);
@@ -181,7 +187,12 @@
             $rep->TextCol(5, 6, "__________________", - 2);
             $rep->TextCol(6, 7, "__________________");
         }
+        if ($email == 1)
+            {
+                $rep->End($email);
+            }
     }
-    $rep->End();
+    if ($email == 0)
+        $rep->End();
 }
The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Email Receipt to customer

Hello,

The reason for that this has no email menu is that you could write something at the bottom of the Receipt.

However, it should be up to you if you want to do this or not. So this has been fixed and committed to stable repo.

/Joe

Re: Email Receipt to customer

Thanks poncho tested and it works.

Wynand

7 (edited by poncho1234 05/01/2019 02:47:48 pm)

Re: Email Receipt to customer

@joe, thank you; it improves the workflow for a paperless system.

The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Email Receipt to customer

@Joe I have submitted a merge request for exactly that functionality back in March, since I was using it already for a few years, but it was not present in 2.4.6 master
Git Merge Request #1: Added option to send Customer Receipt by e-mail (open)
https://sourceforge.net/p/frontaccounting/git/merge-requests/1/

Is there a better (preferred?) method of contributing to FrontAccounting development?
Pardon, if my question is obvious - new to Git and distributed open source development.

Re: Email Receipt to customer

I guess this forum is the best place to discuss improvements, but it is better if there are more users interesting in the improvements before implementing.

Joe

Re: Email Receipt to customer

@Joe Thanks, understood, will open forum topic first in future.
My question was more along the lines of: "is sf fork + merge request a correct way to send code for consideration or you prefer patch file posted in forum?"