From fed350a1aa758b095ca220a798939733b774dcc5 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 27 Jul 2017 12:30:25 -0400 Subject: RT# 74537 - added check for config option selfservice-ACH_info_readonly to deletepayby method --- FS/FS/ClientAPI/MyAccount.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 2b4d52d8f..5c86b7820 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1748,8 +1748,13 @@ sub delete_payby { }) or return { 'error' => 'unknown custpaybynum '. $p->{'custpaybynum'} }; - return { 'error' => $cust_payby->delete }; - + my $conf = new FS::Conf; + if (($cust_payby->payby eq "DCHK" || $cust_payby->payby eq "CHEK") && $conf->exists('selfservice-ACH_info_readonly')) { + return { 'error' => "Sorry you do not have permission to delete bank information." }; + } + else { + return { 'error' => $cust_payby->delete }; + } } sub cancel { -- cgit v1.2.1 From 810e6898f2cc89911edd5a56e90ddb202867c92a Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 27 Jul 2017 12:53:59 -0400 Subject: RT# 76905 - Created ability to delete payment account thru NG selfservice to test API change in ticket 74537 --- FS/FS/ClientAPI/MyAccount.pm | 1 + ng_selfservice/payment_accounts.php | 78 +++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 ng_selfservice/payment_accounts.php diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 5c86b7820..99c5f742b 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -152,6 +152,7 @@ sub skin_info { personal.php Profile personal.php Personal Information + payment_accounts.php Payment Accounts password.php Change Password payment.php Payments diff --git a/ng_selfservice/payment_accounts.php b/ng_selfservice/payment_accounts.php new file mode 100644 index 000000000..e70142a0a --- /dev/null +++ b/ng_selfservice/payment_accounts.php @@ -0,0 +1,78 @@ + + +

My Payment Accounts

+
+ +delete_payby( array( + 'session_id' => $_COOKIE['session_id'], + 'custpaybynum' => $paybynum, + ) ); + } + else { + $error['error'] = 'Bad Payby Number'; + } + } + + if ( isset($error['error']) && $error['error'] ) { + $error = $error['error']; + } + else { + $error = "Account " . $paybynum . " Deleted"; + } + +?> + +

+list_payby( array( + 'session_id' => $_COOKIE['session_id'], + ) ); + + if ( isset($payment_info['error']) && $payment_info['error'] ) { + $error = $payment_info['error']; + header('Location:index.php?error='. urlencode($error)); + die(); + } + + extract($payment_info); +?> + + + + + + + + + + + + + + + + + + + + +
 TypeAccount TypeAccount MaskBank Name
delete
+ + + -- cgit v1.2.1 From 862381171227acfe4a7bf5e1957de991b3928704 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 27 Jul 2017 15:18:30 -0400 Subject: RT# 38517 - fixed small error causing perl warning on start. --- rt/lib/RT/Interface/Web_Vendor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm index 909127b22..737748e63 100644 --- a/rt/lib/RT/Interface/Web_Vendor.pm +++ b/rt/lib/RT/Interface/Web_Vendor.pm @@ -196,7 +196,7 @@ sub ProcessTicketCustomers { 'emailaddress' => $Requestor->{'values'}->{'emailaddress'}, 'comment' => 'Auto created from RT requestor', }; - my $error = $contact->insert; + $error = $contact->insert; push @results, 'Created Freeside contact for requestor ' . $Requestor->{'values'}->{'emailaddress'} unless $error; } -- cgit v1.2.1 From 09a43bd0984104796052ceee7fdae0581612535d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 31 Jul 2017 09:24:50 -0400 Subject: RT# 73490 - added global configuration to check if RT activity alert should be displayed. --- FS/FS/Conf.pm | 7 +++++++ httemplate/elements/notify-tickets.html | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d41cc741b..a0b9a9cde 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5304,6 +5304,13 @@ and customer address. Include units.', 'type' => 'checkbox', }, + { + 'key' => 'rt-hide_activity_notification', + 'section' => 'ticketing', + 'description' => 'Hide the notification box when there is activity on tickets', + 'type' => 'checkbox', + }, + { 'key' => 'pkg-balances', 'section' => 'packages', diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html index 35917c34d..b54506338 100644 --- a/httemplate/elements/notify-tickets.html +++ b/httemplate/elements/notify-tickets.html @@ -13,8 +13,12 @@ <%init> use Class::Load 'load_class'; +use FS::Conf; +my $conf = new FS::Conf; + my $enabled = $FS::TicketSystem::system eq 'RT_Internal'; $enabled = 0 if $FS::CurrentUser::CurrentUser->option('hide_notify_tickets'); +$enabled = 0 if $conf->exists('rt-hide_activity_notification'); my $UnrepliedTickets; if ($enabled) { my $class = 'RT::Search::UnrepliedTickets'; -- cgit v1.2.1 From 1043f465a4c6a1ab94df2e22823a2a688e102bcd Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 10:33:45 -0400 Subject: RT# 75595 - Add billing event condition that will trigger when the contract end date is coming up --- FS/FS/part_event/Condition/pkg_contract_date.pm | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 FS/FS/part_event/Condition/pkg_contract_date.pm diff --git a/FS/FS/part_event/Condition/pkg_contract_date.pm b/FS/FS/part_event/Condition/pkg_contract_date.pm new file mode 100644 index 000000000..2bf791aba --- /dev/null +++ b/FS/FS/part_event/Condition/pkg_contract_date.pm @@ -0,0 +1,38 @@ +package FS::part_event::Condition::pkg_contract_date; +use base qw( FS::part_event::Condition ); + +use strict; + +sub description { + 'Package contract date nearing'; +} + +sub eventtable_hashref { + { 'cust_main' => 1, + 'cust_bill' => 1, + 'cust_pkg' => 1, + 'cust_pay' => 1, + 'cust_pay_batch' => 1, + 'cust_statement' => 1, + }; +} + +sub option_fields { + my $class = shift; + ( + 'within' => { 'label' => 'Package contract date with in', + 'type' => 'freq', + }, + ); +} + +sub condition { + my( $self, $cust_pkg, %opt ) = @_; + + my $contract_end_date = $cust_pkg->contract_end ? $cust_pkg->contract_end : 0; + my $contract_within_time = $self->option_age_from('within', $contract_end_date ); + + $opt{'time'} >= $contract_within_time and $contract_within_time > 0; +} + +1; \ No newline at end of file -- cgit v1.2.1 From 5665dc8243598e7ca6567719b6e91efcfbbea209 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 13:53:42 -0400 Subject: RT # 73490 - removed global conf and user pref check for hide tickets and added group access control. --- FS/FS/AccessRight.pm | 4 ++++ FS/FS/Conf.pm | 7 ------- httemplate/elements/notify-tickets.html | 6 +----- httemplate/pref/pref-process.html | 1 - httemplate/pref/pref.html | 7 ------- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 9649e5e0c..6b2dc4a7b 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -362,6 +362,10 @@ tie my %rights, 'Tie::IxHash', { rightname=>'Employee preference telephony integration' }, #] + #'RT preference rights' => [ + { rightname=>'not an RT' }, + #] + ], ### diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index a0b9a9cde..d41cc741b 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5304,13 +5304,6 @@ and customer address. Include units.', 'type' => 'checkbox', }, - { - 'key' => 'rt-hide_activity_notification', - 'section' => 'ticketing', - 'description' => 'Hide the notification box when there is activity on tickets', - 'type' => 'checkbox', - }, - { 'key' => 'pkg-balances', 'section' => 'packages', diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html index b54506338..ce367deeb 100644 --- a/httemplate/elements/notify-tickets.html +++ b/httemplate/elements/notify-tickets.html @@ -13,12 +13,8 @@ <%init> use Class::Load 'load_class'; -use FS::Conf; -my $conf = new FS::Conf; - my $enabled = $FS::TicketSystem::system eq 'RT_Internal'; -$enabled = 0 if $FS::CurrentUser::CurrentUser->option('hide_notify_tickets'); -$enabled = 0 if $conf->exists('rt-hide_activity_notification'); +$enabled = 0 if $FS::CurrentUser::CurrentUser->access_right('not an RT'); my $UnrepliedTickets; if ($enabled) { my $class = 'RT::Search::UnrepliedTickets'; diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html index a87036b36..75e57958f 100644 --- a/httemplate/pref/pref-process.html +++ b/httemplate/pref/pref-process.html @@ -56,7 +56,6 @@ unless ( $error ) { # if ($access_user) { enable_mask_clipboard_hack dashboard_customers customer_view_emails printtofit - hide_notify_tickets email_address snom-ip snom-username snom-password vonage-fromnumber vonage-username vonage-password diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index bb21b0f3c..abd1ea57f 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -136,13 +136,6 @@ - - <% emt('Hide notification of new ticket activity') %> - - option('hide_notify_tickets') ? 'CHECKED' : '' %>> - - - <% emt("How many recently-modified customers displayed on dashboard") %> -- cgit v1.2.1 From cbd61e030fc33f1b858aa874fc25e138d797b4f7 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 15:08:57 -0400 Subject: RT# 75817 - fixed enable selection to send password reset and to allow you to set password in one step --- FS/FS/cust_contact.pm | 2 +- httemplate/elements/contact.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FS/FS/cust_contact.pm b/FS/FS/cust_contact.pm index 6820ac4b4..118a9e000 100644 --- a/FS/FS/cust_contact.pm +++ b/FS/FS/cust_contact.pm @@ -106,7 +106,7 @@ and replace methods. sub check { my $self = shift; - if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P') { + if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'E' || $self->selfservice_access eq 'P') { $self->selfservice_access('Y'); $self->_resend('Y'); } diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 850c2540d..7d1f16082 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -57,7 +57,7 @@ >