[freeside-commits] branch FREESIDE_3_BRANCH updated. a3371bd505dfc1b7791cfe681aa33afb1f77e063

Ivan ivan at 420.am
Tue Sep 10 21:25:18 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  a3371bd505dfc1b7791cfe681aa33afb1f77e063 (commit)
      from  493a5911544a638665eab5096425fd6785e9fe0b (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 a3371bd505dfc1b7791cfe681aa33afb1f77e063
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Sep 10 21:25:15 2013 -0700

    fix order package UI layout when there aren't any sales people for an agent, RT#24955

diff --git a/httemplate/elements/tr-select-sales.html b/httemplate/elements/tr-select-sales.html
index c29e0d7..956a9d1 100644
--- a/httemplate/elements/tr-select-sales.html
+++ b/httemplate/elements/tr-select-sales.html
@@ -155,8 +155,11 @@ my $salesnum = $opt{'curr_value'} || $opt{'value'};
 my $field = $opt{'element_name'} || $opt{'field'} || 'salesnum';
 my $id = $opt{'id'} || $opt{'field'} || 'salesnum';
 
-my @sales = qsearch({ 'table'   => 'sales',
-                      'hashref' => { 'disabled' => '' },
+my $hashref = { disabled => '' };
+$hashref->{agentnum} = $opt{agentnum} if $opt{agentnum};
+
+my @sales = qsearch({ 'table'     => 'sales',
+                      'hashref'   => $hashref,
                       'extra_sql' => ' AND '. $curuser->agentnums_sql,
                       'order_by'  => 'ORDER BY salesperson',
                    });
diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html
index febe427..03531bf 100644
--- a/httemplate/misc/order_pkg.html
+++ b/httemplate/misc/order_pkg.html
@@ -38,7 +38,8 @@
 
 <& /elements/tr-select-sales.html,
      'curr_value' => scalar($cgi->param('salesnum')),
-     'th' => 1,
+     'agentnum'   => $agent->agentnum,
+     'th'         => 1,
 &>
 
 % if ( $conf->exists('pkg_referral') ) {

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

Summary of changes:
 httemplate/elements/tr-select-sales.html |    7 +++++--
 httemplate/misc/order_pkg.html           |    3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list