[freeside-commits] branch FREESIDE_3_BRANCH updated. aa8d83861d725a1566375c15382780930f08fedd
Ivan
ivan at 420.am
Tue Aug 20 16:13:24 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via aa8d83861d725a1566375c15382780930f08fedd (commit)
from 141862b66a34de104f1e88527ee2ac605d2c87d9 (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 aa8d83861d725a1566375c15382780930f08fedd
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Aug 20 16:13:21 2013 -0700
continue sales person work: customer and package selection, commissions, reporting. RT#23402
diff --git a/FS/FS.pm b/FS/FS.pm
index 1751307..5419420 100644
--- a/FS/FS.pm
+++ b/FS/FS.pm
@@ -95,8 +95,6 @@ L<FS::access_usergroup> - Employee group membership
L<FS::access_groupagent> - Group reseller access
-L<FS::access_groupsales> - Group sales access
-
L<FS::access_right> - Access rights
L<FS::svc_acct_pop> - POP (Point of Presence, not Post
diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index d7e5a17..6f56465 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -345,6 +345,8 @@ tie my %rights, 'Tie::IxHash',
'Edit advertising sources',
{ rightname=>'Edit global advertising sources', global=>1 },
+ 'Edit sales people',
+
'Edit package definitions',
{ rightname=>'Edit global package definitions', global=>1 },
diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm
index bc818e5..0ebd397 100644
--- a/FS/FS/Mason.pm
+++ b/FS/FS/Mason.pm
@@ -313,7 +313,6 @@ if ( -e $addl_handler_use_file ) {
use FS::tower;
use FS::tower_sector;
use FS::sales;
- use FS::access_groupsales;
use FS::contact_class;
use FS::part_svc_class;
use FS::upload_target;
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index c2f0dca..7585188 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1013,6 +1013,7 @@ sub tables_hashref {
'columns' => [
'custnum', 'serial', '', '', '', '',
'agentnum', 'int', '', '', '', '',
+ 'salesnum', 'int', 'NULL', '', '', '',
'agent_custid', 'varchar', 'NULL', $char_d, '', '',
'classnum', 'int', 'NULL', '', '', '',
'custbatch', 'varchar', 'NULL', $char_d, '', '',
@@ -1749,6 +1750,7 @@ sub tables_hashref {
'locationnum', 'int', 'NULL', '', '', '',
'otaker', 'varchar', 'NULL', 32, '', '',
'usernum', 'int', 'NULL', '', '', '',
+ 'salesnum', 'int', 'NULL', '', '', '',
'order_date', @date_type, '', '',
'start_date', @date_type, '', '',
'setup', @date_type, '', '',
@@ -3679,17 +3681,6 @@ sub tables_hashref {
'index' => [ [ 'groupnum' ] ],
},
- 'access_groupsales' => {
- 'columns' => [
- 'groupsalesnum', 'serial', '', '', '', '',
- 'groupnum', 'int', '', '', '', '',
- 'salesnum', 'int', '', '', '', '',
- ],
- 'primary_key' => 'groupsalesnum',
- 'unique' => [ [ 'groupnum', 'salesnum' ] ],
- 'index' => [ [ 'groupnum' ] ],
- },
-
'access_right' => {
'columns' => [
'rightnum', 'serial', '', '', '', '',
diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm
index f8e30d0..85334ed 100644
--- a/FS/FS/access_right.pm
+++ b/FS/FS/access_right.pm
@@ -235,6 +235,7 @@ sub _upgrade_data { # class method
'Change customer package' => 'Detach customer package',
'Services: Accounts' => 'Services: Cable Subscribers',
'Bulk change customer packages' => 'Bulk move customer services',
+ 'Configuration' => 'Edit sales people',
;
foreach my $old_acl ( keys %onetime ) {
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 8a1a22e..310c226 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1736,6 +1736,7 @@ sub check {
|| $self->ut_foreign_key('bill_locationnum', 'cust_location','locationnum')
|| $self->ut_foreign_key('ship_locationnum', 'cust_location','locationnum')
|| $self->ut_foreign_keyn('classnum', 'cust_class', 'classnum')
+ || $self->ut_foreign_keyn('salesnum', 'sales', 'salesnum')
|| $self->ut_textn('custbatch')
|| $self->ut_name('last')
|| $self->ut_name('first')
diff --git a/FS/MANIFEST b/FS/MANIFEST
index deadb4b..e9ca551 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -635,8 +635,6 @@ FS/upgrade_journal.pm
t/upgrade_journal.t
FS/sales.pm
t/sales.t
-FS/access_groupsales.pm
-t/access_groupsales.t
FS/part_svc_class.pm
t/part_svc_class.t
FS/upload_target.pm
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index b132dac..9d33804 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -566,7 +566,7 @@ tie my %config_agent, 'Tie::IxHash',
;
tie my %config_sales, 'Tie::IxHash',
- 'Sales' => [ $fsurl.'browse/sales.cgi', 'Sales bring in new business.' ],
+ 'Sales People' => [ $fsurl.'browse/sales.html', 'Sales people bring in new business.' ],
;
tie my %config_billing_rates, 'Tie::IxHash',
@@ -674,13 +674,19 @@ if ( $curuser->access_right('Configuration' ) ) {
'Settings' => [ $fsurl.'config/config-view.cgi', '' ],
'separator' => '', #its a separator!
'Companies' => [ \%config_agent, '' ],
- 'Employees' => [ \%config_employees, '' ],
- 'Sales People' => [ \%config_sales, '' ],
- 'separator2' => '', #its a separator!
- 'Customers' => [ \%config_cust, '' ],
- #or this? 'Customers and Contacts' => [ \%config_cust, '' ],
);
}
+
+$config_menu{'Sales People'} = [ \%config_sales, '' ]
+ if $curuser->access_right('Edit sales people');
+
+if ( $curuser->access_right('Configuration' ) ) {
+ $config_menu{'Employees'} = [ \%config_employees, '' ];
+ $config_menu{'separator2'} = ''; #its a separator!
+ $config_menu{'Customers'} = [ \%config_cust, '' ];
+ #or this? 'Customers and Contacts'
+}
+
$config_menu{'Packages'} = [ \%config_pkg, '' ]
if $curuser->access_right('Configuration' )
|| $curuser->access_right('Edit package definitions')
-----------------------------------------------------------------------
Summary of changes:
FS/FS.pm | 2 --
FS/FS/AccessRight.pm | 2 ++
FS/FS/Mason.pm | 1 -
FS/FS/Schema.pm | 13 ++-----------
FS/FS/access_right.pm | 1 +
FS/FS/cust_main.pm | 1 +
FS/MANIFEST | 2 --
httemplate/elements/menu.html | 18 ++++++++++++------
8 files changed, 18 insertions(+), 22 deletions(-)
More information about the freeside-commits
mailing list