Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customer referance in email Subject
06-10-2018, 12:53 AM, (This post was last modified: 06-10-2018, 01:50 AM by TurboPT.)
#3
RE: Customer referance in email Subject
Thank you TurboPT!!
I tested the following solution and it is in production now:

Solution: copy bellow lines to PrintCustTrans.php webERP version 4.14.1, line to replaced 492:

original:
PHP Code:
$mail->SetSubject($InvOrCredit ' ' $FromTransNo); 
new:
PHP Code:
/* Get Customer Order reference no. from salesorders and add it to the email Subject line - start */
        
$sql "SELECT customerref
            FROM salesorders
            LEFT JOIN debtortrans
            ON salesorders.orderno=debtortrans.order_
            WHERE debtortrans.transno='" 
.$_GET['FromTransNo'] . "'";
        
$result=DB_query($sql);
        if (
DB_num_rows($result)==1) {
            
$myrow DB_fetch_array($result);
            
$POnum $myrow['customerref'];
        }
        else { 
$POnum '';
        }
        if (
stripos$POnum'P') !== false || $POnum == '') {
        
$mail->SetSubject($InvOrCredit ' ' $FromTransNo ' ' $POnum );
        }
        else {
        
$mail->SetSubject($InvOrCredit ' ' $FromTransNo ' PO: ' $POnum );
        }

/* Get Customer Order reference no. from salesorders and add it to the email Subject line  - end */ 
Reply


Messages In This Thread
Customer referance in email Subject - by srdjanm - 06-08-2018, 08:48 AM
RE: Customer referance in email Subject - by srdjanm - 06-10-2018, 12:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)