[freeside-commits] branch master updated. 12c74e8d7c58b6620a124275e125424fc5d9b66e

Ivan ivan at 420.am
Wed Jan 29 22:06:24 PST 2014


The branch, master has been updated
       via  12c74e8d7c58b6620a124275e125424fc5d9b66e (commit)
       via  82f20c89d63c5b1ef3b2106370a44d030fd26453 (commit)
      from  9c78a52fcd35d7d0c39a4798d583ca4d7b20fd73 (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 12c74e8d7c58b6620a124275e125424fc5d9b66e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 29 22:06:21 2014 -0800

    better menu organization (hopefully)

diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index b423fa9..976f712 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -298,13 +298,6 @@ tie my %report_ticketing, 'Tie::IxHash',
   'Advanced ticket reports' => [ $fsurl.'rt/Search/Build.html?NewQuery=1', 'List tickets by any criteria' ],
 ;
 
-tie my %report_employees, 'Tie::IxHash';
-$report_employees{'Employee Commission Report'} = [ $fsurl.'search/report_employee_commission.html', '' ]
-  if $curuser->access_right('Employees: Commission Report');
-$report_employees{'Employee Audit Report'} = [ $fsurl.'search/report_employee_audit.html', 'Employee audit report' ]
-  if $curuser->access_right('Employees: Audit Report');
-;
-
 tie my %report_bill_event, 'Tie::IxHash',
   'All billing events' => [ $fsurl.'search/report_cust_event.html', 'All billing events for a date range' ],
   'Billing event errors' => [ $fsurl.'search/report_cust_event.html?failed=1', 'Failed credit cards, processor or printer problems, etc.' ],
@@ -343,18 +336,23 @@ tie my %report_sales, 'Tie::IxHash',
   'Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg.html', 'Sales report and graph (by agent, package class and/or date range)' ],
   'Rated Call Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg_detail.html', 'Sales report and graph (by agent, package class, usage class and/or date range)' ],
   'Sales with Advertising Source' => [ $fsurl.'search/report_cust_bill_pkg_referral.html' ],
-  'Agent Commissions' => [ $fsurl.'search/report_agent_commission.html' ],
-  'Sales Person Commissions' => [ $fsurl.'search/report_sales_commission.html' ],
-  'Sales Person Commission per package' => [ $fsurl.'search/report_sales_commission_pkg.html' ],
+;
+
+tie my %report_commissions, 'Tie::IxHash',
+  'Agent' => [ $fsurl.'search/report_agent_commission.html' ],
+  'Sales Person' => [ $fsurl.'search/report_sales_commission.html' ],
+  'Sales Person per package' => [ $fsurl.'search/report_sales_commission_pkg.html' ],
+  'Employee' => [ $fsurl.'search/report_employee_commission.html', '' ]
 ;
 
 tie my %report_financial, 'Tie::IxHash';
 if( $curuser->access_right('Financial reports') ) {
 
   %report_financial = (
-    'Sales' => [ \%report_sales, 'Sales reports', ],
-    'Credits' => [ \%report_credits, 'Credit reports', ],
-    'Refunds' => [ \%report_refunds, 'Refund reports', ],
+    'Sales'       => [ \%report_sales, 'Sales reports', ],
+    'Commissions' => [ \%report_commissions, 'Commission reports', ],
+    'Credits'     => [ \%report_credits, 'Credit reports', ],
+    'Refunds'     => [ \%report_refunds, 'Refund reports', ],
   );
   $report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ];
   $report_financial{'Prepaid Income'} = [ $fsurl.'search/report_prepaid_income.html', 'Prepaid income (unearned revenue)  report' ];
@@ -380,10 +378,14 @@ tie my %report_payable, 'Tie::IxHash',
 ;
 
 tie my %report_logs, 'Tie::IxHash';
-  $report_logs{'System log'} = [ $fsurl.'search/log.html', 'View system events and debugging information.' ],
+$report_logs{'Billing events'} =  [ \%report_bill_event, 'Billing events' ]
+  if $curuser->access_right('Billing event reports');
+$report_logs{'Employee activity'} = [ $fsurl.'search/report_employee_audit.html', '' ]
+  if $curuser->access_right('Employees: Audit Report');
+$report_logs{'System log'} = [ $fsurl.'search/log.html', 'View system events and debugging information.' ],
   if $curuser->access_right('View system logs')
   || $curuser->access_right('Configuration');
-  $report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgoing message log' ]
+$report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgoing message log' ]
   if $curuser->access_right('View email logs')
   || $curuser->access_right('Configuration');
 
@@ -411,10 +413,6 @@ $report_menu{'Usage'}          =  [ \%report_rating,    'Usage reports'  ]
 $report_menu{'Tickets'}        = [ \%report_ticketing, 'Ticket reports' ]
   if $conf->config('ticket_system')
   ;#&& FS::TicketSystem->access_right(\%session, 'Something');
-$report_menu{'Employees'}      =  [ \%report_employees, 'Employee reports'  ]
-  if keys %report_employees;
-$report_menu{'Billing events'} =  [ \%report_bill_event, 'Billing events' ]
-  if $curuser->access_right('Billing event reports');
 $report_menu{'Financial (Receivables)'} = [ \%report_financial, 'Financial reports (Receivables)' ]
   if $curuser->access_right('Financial reports') 
   or $curuser->access_right('Receivables report');

commit 82f20c89d63c5b1ef3b2106370a44d030fd26453
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 29 21:56:05 2014 -0800

    sales person report w/package breakdown, RT#22090

diff --git a/httemplate/search/report_sales_commission.html b/httemplate/search/report_sales_commission.html
index 19af428..9ad9e6a 100644
--- a/httemplate/search/report_sales_commission.html
+++ b/httemplate/search/report_sales_commission.html
@@ -4,34 +4,7 @@
 
 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
 
-% if ( $curuser->report_salesnum ) {
-
-    <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $curuser->report_sales->agentnum %>">
-    <INPUT TYPE="hidden" NAME="salesnum" VALUE="<% $curuser->report_salesnum %>">
-
-% } else {
-
-    <& /elements/tr-select-agent.html,
-         'onchange'      => 'agent_changed(this)',
-    &>
-
-    <SCRIPT TYPE="text/javascript">
-
-      function agent_changed(what) {
-        salesnum_agentnum_changed(what);
-      }
-
-      <&| /elements/onload.js &>
-      agent_changed(document.getElementById('agentnum'))
-      </&>
-
-    </SCRIPT>
-
-    <& /elements/tr-select-sales.html,
-        'empty_label' => 'all',
-    &>
-
-% }
+<& /elements/tr-select-agent-sales.html &>
 
 <& /elements/tr-checkbox.html,
     'label' => 'Customer sales person if there is no package sales person',
@@ -55,8 +28,7 @@
 <% include('/elements/footer.html') %>
 <%init>
 
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-die "access denied" unless $curuser->access_right('Financial reports');
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
 
 </%init>

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

Summary of changes:
 httemplate/elements/menu.html                  |   36 +++++++++++------------
 httemplate/search/report_sales_commission.html |   34 ++--------------------
 2 files changed, 20 insertions(+), 50 deletions(-)




More information about the freeside-commits mailing list