Post Reply 
 
Thread Rating:
  • 0 Votes - 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.)
Post: #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 */ 
Find all posts by this user
Quote this message in a reply
Post Reply 


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

Forum Jump:


User(s) browsing this thread: 1 Guest(s)