From 94ff0d1fe71494acad3cb252b1054c2768671c4a Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 17 Jun 2009 06:43:08 +0000 Subject: [PATCH] Added separate access right for receivables report --- FS/FS/AccessRight.pm | 1 + httemplate/elements/menu.html | 3 ++- httemplate/search/report_receivables.cgi | 2 +- httemplate/search/report_receivables.html | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index e29620dc5..146b9fa4e 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -211,6 +211,7 @@ tie my %rights, 'Tie::IxHash', { rightname=> 'List rating data', desc=>'Usage reports', global=>1 }, 'Billing event reports', + 'Receivables report', 'Financial reports', ], diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 487373710..5154e1127 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -195,7 +195,8 @@ $report_financial{'Pending Payment Report'} = [ $fsurl.'search/cust_pay_pending. if $curuser->access_right('View customer pending payments'); $report_financial{'Payment Batch Report'} = [ $fsurl.'search/pay_batch.html', 'Payment batches (by status and/or date range)' ] if $conf->exists('batch-enable') || $conf->config('batch-enable_payby'); -$report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ]; +$report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ] + if $curuser->access_right('Receivables report'); $report_financial{'Prepaid Income'} = [ $fsurl.'search/report_prepaid_income.html', 'Prepaid income (unearned revenue) report' ]; $report_financial{'Sales Tax Liability'} = [ $fsurl.'search/report_tax.html', 'Sales tax liability report (old taxclass system)' ]; $report_financial{'Tax Liability'} = [ $fsurl.'search/report_newtax.html', 'Tax liability report (new tax products system)' ] diff --git a/httemplate/search/report_receivables.cgi b/httemplate/search/report_receivables.cgi index c5ca45338..21d7d94c6 100755 --- a/httemplate/search/report_receivables.cgi +++ b/httemplate/search/report_receivables.cgi @@ -71,7 +71,7 @@ <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); + unless $FS::CurrentUser::CurrentUser->access_right('Receivables report'); my @ranges = ( [ 0, 30 ], diff --git a/httemplate/search/report_receivables.html b/httemplate/search/report_receivables.html index 1ebe08cb8..4f29b063e 100755 --- a/httemplate/search/report_receivables.html +++ b/httemplate/search/report_receivables.html @@ -35,6 +35,6 @@ <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); + unless $FS::CurrentUser::CurrentUser->access_right('Receivables report'); -- 2.11.0