[freeside-commits] branch FREESIDE_3_BRANCH updated. a75e66f42a529d69d2f38a12290be29187d0d9ec

Ivan ivan at 420.am
Thu Feb 27 00:29:20 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  a75e66f42a529d69d2f38a12290be29187d0d9ec (commit)
      from  5b7ba710939e35f0ed1031e7e0abfbb21ab1bfa0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a75e66f42a529d69d2f38a12290be29187d0d9ec
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 27 00:29:19 2014 -0800

    agent-virt "email a notice to this customer" from address, RT#27424

diff --git a/httemplate/elements/email-link.html b/httemplate/elements/email-link.html
index 692e5bc..2612faa 100644
--- a/httemplate/elements/email-link.html
+++ b/httemplate/elements/email-link.html
@@ -1,9 +1,10 @@
 % if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) {
-<A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&<%$query%>"><%$label%></A>
+<A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&agent_virt_agentnum=<%$agent_virt_agentnum%>&<%$query%>"><%$label%></A>
 % }
 <%init>
 my %opt = @_;
 my $table = $opt{'table'};
+my $agent_virt_agentnum = $opt{'agent_virt_agentnum'};
 my $search_hash = $opt{'search_hash'};
 die "'table' required" if !$table;
 die "'search_hash' required" if !$search_hash;
diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html
index b47f441..de800ec 100644
--- a/httemplate/misc/email-customers.html
+++ b/httemplate/misc/email-customers.html
@@ -109,7 +109,7 @@ Template:
           <& /elements/input-text.html,
               'field' => 'from_addr',
               'type'  => 'email', # HTML5, woot
-              'value' => $conf->config('invoice_from'),
+              'value' => $conf->config('invoice_from', $agent_virt_agentnum),
               'size'  => 20,
           &>></TD>
  
@@ -154,7 +154,10 @@ die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices');
 
 my $conf = FS::Conf->new;
+
 my $table = $cgi->param('table') or die "'table' required";
+my $agent_virt_agentnum = $cgi->param('agent_virt_agentnum') || '';
+
 my %search;
 if ( $cgi->param('search') ) {
   %search = %{ thaw(decode_base64($cgi->param('search'))) };
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index ee615e8..d135248 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -131,9 +131,10 @@ function areyousure(href, message) {
 % 
 % my $email_link = ($cust_main->invoicing_list_emailonly) && 
 %   include('/elements/email-link.html',
-%            'table' => 'cust_main', 
-%            'search_hash' => { 'custnum' => $custnum },
-%            'label' => 'Email a notice to this customer',
+%            'table'               => 'cust_main', 
+%            'search_hash'         => { 'custnum' => $custnum },
+%            'agent_virt_agentnum' => $cust_main->agentnum,
+%            'label'               => 'Email a notice to this customer',
 % );
 % if ( $email_link and $br ) {
  | 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/email-link.html  |    3 ++-
 httemplate/misc/email-customers.html |    5 ++++-
 httemplate/view/cust_main.cgi        |    7 ++++---
 3 files changed, 10 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list