From 0715eb639658bfde2c21c39cd5ccaf4bf22b18d4 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 6 Aug 2010 00:45:29 +0000 Subject: communigate account rules: vacation & redirect all, RT#7514 --- httemplate/edit/process/cgp_rule-redirect_all.html | 24 ++++++++++ httemplate/edit/process/cgp_rule-simplified.html | 53 ++++++++++++++++++++++ httemplate/edit/process/cgp_rule-vacation.html | 29 ++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 httemplate/edit/process/cgp_rule-redirect_all.html create mode 100644 httemplate/edit/process/cgp_rule-simplified.html create mode 100644 httemplate/edit/process/cgp_rule-vacation.html (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cgp_rule-redirect_all.html b/httemplate/edit/process/cgp_rule-redirect_all.html new file mode 100644 index 000000000..162d857c2 --- /dev/null +++ b/httemplate/edit/process/cgp_rule-redirect_all.html @@ -0,0 +1,24 @@ +<% include('cgp_rule-simplified.html', + 'name' => '#Redirect', + 'priority' => 1, + 'redirect' => 'cgp_rule-redirect_all.html', + 'conditions' => [ + ( $cgi->param('RedirHuman') + ? { conditionname => 'Human Generated', } + : () + ), + ], + 'actions' => [ + { action => ( $cgi->param('KeepToAndCc') + ? 'Mirror To' + : 'Redirect To' + ), + params => scalar($cgi->param('RedirectText')), + }, + ( $cgi->param('RedirKeep') + ? () + : ( { 'action' => 'Discard' } ) + ), + ], + ) +%> diff --git a/httemplate/edit/process/cgp_rule-simplified.html b/httemplate/edit/process/cgp_rule-simplified.html new file mode 100644 index 000000000..60769d4e6 --- /dev/null +++ b/httemplate/edit/process/cgp_rule-simplified.html @@ -0,0 +1,53 @@ +% if ( $error ) { #redirect back to edit... +% $cgi->param('error', $error); +<% $cgi->redirect(popurl(3).'edit/'.$opt{'redirect'}.'?'. $cgi->query_string) %> +% } else { #success XXX better msg talking about vacation vs. redirect all + <% include('/elements/header-popup.html', 'Rule updated') %> + + + + +% } +<%init> + +my %opt = @_; + +my %hash = ( + 'svcnum' => scalar($cgi->param('svcnum')), + 'name' => $opt{'name'}, +); + +my $cgp_rule = qsearchs('cgp_rule', \%hash); + +my $error = ''; +if ( $cgp_rule ) { #updating + $error = $cgp_rule->delete; +} + +$cgp_rule = new FS::cgp_rule { %hash, 'priority' => $opt{'priority'} }; +$error ||= $cgp_rule->insert; + +foreach my $condition ( @{ $opt{'conditions'} } ) { + my $cgp_rule_condition = new FS::cgp_rule_condition { + %$condition, + 'rulenum' => $cgp_rule->rulenum, + }; + $error ||= $cgp_rule_condition->insert; +} + +foreach my $action ( @{ $opt{'actions'} } ) { + my $cgp_rule_action = new FS::cgp_rule_action { + %$action, + 'rulenum' => $cgp_rule->rulenum, + }; + $error ||= $cgp_rule_action->insert; +} + +unless ( $error ) { + my $export_error = $cgp_rule->svc_export; + die $export_error if $export_error; #error handling sucks wrt this... shouldn't happen though +} + + diff --git a/httemplate/edit/process/cgp_rule-vacation.html b/httemplate/edit/process/cgp_rule-vacation.html new file mode 100644 index 000000000..f10d72b73 --- /dev/null +++ b/httemplate/edit/process/cgp_rule-vacation.html @@ -0,0 +1,29 @@ +<% include('cgp_rule-simplified.html', + 'name' => '#Vacation', + 'priority' => 2, + 'redirect' => 'cgp_rule-vacation.html', + 'conditions' => [ + { conditionname => 'Human Generated', }, + { conditionname => 'From', + op => 'not in', + params => '#RepliedAddresses', + }, + ( $cgi->param('VacationTill') + ? ( { conditionname => 'Current Date', + op => 'less than', #is less? + params => scalar($cgi->param('VacationTill')), + } + ) + : () + ), + ], + 'actions' => [ + { action => 'Reply with', + params => scalar($cgi->param('VacationText')), + }, + { action => "Remember 'From' in", + params => 'RepliedAddresses', + }, + ], + ) +%> -- cgit v1.2.1 From b3205ddf480401284a5fc4ccbcb45d9c42b0bcf9 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 7 Aug 2010 07:39:06 +0000 Subject: communigate phase 3: RPOP/acct_snarf, RT#7515 --- httemplate/edit/process/acct_snarf.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 httemplate/edit/process/acct_snarf.html (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/acct_snarf.html b/httemplate/edit/process/acct_snarf.html new file mode 100644 index 000000000..332ac5228 --- /dev/null +++ b/httemplate/edit/process/acct_snarf.html @@ -0,0 +1,20 @@ +<% include( 'elements/process.html', + 'table' => 'acct_snarf', + 'redirect' => $redirect, + 'noerror_callback' => sub { + my( $cgi, $object ) = @_; + my $error = $object->svc_export; + #shit, not a good place for error handling :/ + die $error if $error; + }, + ) +%> +<%init> + +my $redirect = sub { + my($cgi, $new) = @_; + my $svcnum = $new->svcnum; + popurl(3)."browse/acct_snarf.html?svcnum=$svcnum;snarfnum="; +}; + + -- cgit v1.2.1 From 3b19e91a9bdf255ea1d01df7a989d955a6712903 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 12 Aug 2010 22:25:38 +0000 Subject: counter values can be negative --- httemplate/edit/process/svc_acct.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi index 0b272b5b1..ba21ab4b5 100755 --- a/httemplate/edit/process/svc_acct.cgi +++ b/httemplate/edit/process/svc_acct.cgi @@ -70,7 +70,7 @@ if ( $svcnum ) { grep { $new->$_ } qw( seconds upbytes downbytes totalbytes ); - $error ||= "invalid $_" foreach grep { $hash{$_} !~ /^\d+$/ } keys %hash; + $error ||= "invalid $_" foreach grep { $hash{$_} !~ /^-?\d+$/ } keys %hash; $error ||= $new->set_usage(\%hash); #unoverlimit and trigger radius changes last; #once is enough } -- cgit v1.2.1 From 9bdca2fe23584918219395b62effbb9ef0fc5f1c Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 17 Aug 2010 17:08:22 +0000 Subject: DNS, RT#8933 --- httemplate/edit/process/domain_record.cgi | 2 +- httemplate/edit/process/svc_domain-defaultrecords.cgi | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 httemplate/edit/process/svc_domain-defaultrecords.cgi (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi index 2e427e4fb..ff0f2d414 100755 --- a/httemplate/edit/process/domain_record.cgi +++ b/httemplate/edit/process/domain_record.cgi @@ -11,7 +11,7 @@ die "access denied" my $recnum = $cgi->param('recnum'); -my $old = qsearchs('agent',{'recnum'=>$recnum}) if $recnum; +my $old = qsearchs('domain_record',{'recnum'=>$recnum}) if $recnum; my $new = new FS::domain_record ( { map { diff --git a/httemplate/edit/process/svc_domain-defaultrecords.cgi b/httemplate/edit/process/svc_domain-defaultrecords.cgi new file mode 100644 index 000000000..feb58406c --- /dev/null +++ b/httemplate/edit/process/svc_domain-defaultrecords.cgi @@ -0,0 +1,14 @@ +<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice'); + +my $svcnum = scalar($cgi->param('svcnum')); + +my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svcnum }) + or die 'unknown svc_domain.svcnum'; + +my $error = $svc_domain->insert_defaultrecords; + + -- cgit v1.2.1 From 5250c44bd7f282c7d782bf0e8349af12376929df Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 22 Sep 2010 19:16:20 +0000 Subject: prepayment discounts rt#5318 --- httemplate/edit/process/cust_pay.cgi | 2 +- httemplate/edit/process/part_pkg.cgi | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index df506c677..c8b0aa7df 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -47,7 +47,7 @@ my $new = new FS::cust_pay ( { map { $_, scalar($cgi->param($_)); } qw( paid payby payinfo paybatch - pkgnum + pkgnum discount_term ) #} fields('cust_pay') } ); diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index c0febf828..08cc14086 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -160,6 +160,12 @@ my @process_m2m = ( 'target_table' => 'tax_class', 'params' => \@tax_overrides, }, + { 'link_table' => 'part_pkg_discount', + 'target_table' => 'discount', + 'params' => [ map $cgi->param($_), + grep /^discountnum/, $cgi->param + ], + }, { 'link_table' => 'part_pkg_link', 'target_table' => 'part_pkg', 'base_field' => 'src_pkgpart', -- cgit v1.2.1 From cb0b8c862de7c7ab68b172faa29167f47894627b Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 22 Sep 2010 21:22:03 +0000 Subject: customer credit limits, RT#8209 --- httemplate/edit/process/cust_main.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 3158d7bbf..e2238bd67 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -73,6 +73,10 @@ if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { ); } +if ( $cgi->param('no_credit_limit') ) { + $new->setfield('credit_limit', ''); +} + $new->tagnum( [ $cgi->param('tagnum') ] ); my %usedatetime = ( 'birthdate' => 1 ); -- cgit v1.2.1 From 6117058d0e3ca504bbf5ad87cc8ddeb394e2381f Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 24 Sep 2010 01:04:07 +0000 Subject: fix display of 12:00 hour in time intervals --- httemplate/edit/process/rate_time.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/rate_time.cgi b/httemplate/edit/process/rate_time.cgi index 4fa78ce6d..2b00be3ea 100644 --- a/httemplate/edit/process/rate_time.cgi +++ b/httemplate/edit/process/rate_time.cgi @@ -4,7 +4,6 @@ % } else { <% $cgi->redirect(popurl(3). "browse/rate_time.html" ) %> % } -%# dumper_html(\%vars, \%old_ints, {$rate_time->intervals}) %> <%init> my $error = ''; die "access denied" @@ -87,7 +86,7 @@ if(!$error) { sub l2wtime { my ($d, $h, $m, $a) = @_; - $h += 24*$d + 12*$a; + $h = ($h % 12) + 24*$d + 12*$a; $m += 60*$h; return 60*$m } -- cgit v1.2.1 From 8c7cc8814104fd6812477a476a2ed717c46d9417 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 29 Sep 2010 00:38:08 +0000 Subject: avoid wiping signupdate when editing cust_main, RT#9972 --- httemplate/edit/process/cust_main.cgi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index e2238bd67..24cecea64 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -251,6 +251,11 @@ if ( $new->custnum eq '' ) { $new->payinfo($new_account.'@'.$new_aba); } + if ( ! $conf->exists('cust_main-edit_signupdate') or + ! $new->signupdate ) { + $new->signupdate($old->signupdate); + } + warn "$me calling $new -> replace( $old, \ @invoicing_list )" if $DEBUG; local($FS::cust_main::DEBUG) = $DEBUG if $DEBUG; local($FS::Record::DEBUG) = $DEBUG if $DEBUG; -- cgit v1.2.1 From 22136ecc8353ff82c9a402218ce849db6cf05dab Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 4 Oct 2010 22:17:22 +0000 Subject: fs_ system accounts, RT#8731 --- httemplate/edit/process/access_user.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/access_user.html b/httemplate/edit/process/access_user.html index e6258a9b1..8e7e70a06 100644 --- a/httemplate/edit/process/access_user.html +++ b/httemplate/edit/process/access_user.html @@ -10,6 +10,7 @@ 'process_m2m' => { 'link_table' => 'access_usergroup', 'target_table' => 'access_group', }, + 'precheck_callback'=> \&precheck_callback, ) %> % } @@ -23,4 +24,13 @@ if ( FS::Conf->new->exists('disable_acl_changes') ) { die "shouldn't be reached"; } +sub precheck_callback { + my $cgi = shift; + my $o = FS::access_user->new({username => $cgi->param('username')}); + if( $o->is_system_user and !$cgi->param('usernum') ) { + $cgi->param('username',''); + return "username '".$o->username."' reserved for system account." + } + return ''; +} -- cgit v1.2.1 From eec4949e2c8f09a0b89331437186b77c4db6ff38 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 11 Oct 2010 19:00:33 +0000 Subject: external taxes support package locations RT10093 --- httemplate/edit/process/quick-cust_pkg.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 2fde17f5e..71f424ca3 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -74,7 +74,7 @@ my %opt = ( 'cust_pkg' => $cust_pkg ); if ( $locationnum == -1 ) { my $cust_location = new FS::cust_location { map { $_ => scalar($cgi->param($_)) } - qw( custnum address1 address2 city county state zip country ) + qw( custnum address1 address2 city county state zip country geocode ) }; $opt{'cust_location'} = $cust_location; } -- cgit v1.2.1 From 29472410e3b882a6a6b74fe48d28db411fe8fcff Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 12 Oct 2010 01:15:17 +0000 Subject: package contract end date field, RT#9918 --- httemplate/edit/process/quick-cust_pkg.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 71f424ca3..599f7607c 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -66,6 +66,10 @@ my $cust_pkg = new FS::cust_pkg { 'discountnum_amount' => scalar($cgi->param('discountnum_amount')), 'discountnum_percent' => scalar($cgi->param('discountnum_percent')), 'discountnum_months' => scalar($cgi->param('discountnum_months')), + 'contract_end' => ( scalar($cgi->param('contract_end')) + ? parse_datetime($cgi->param('contract_end')) + : '' + ), #'discountnum_disabled' => scalar($cgi->param('discountnum_disabled')), }; -- cgit v1.2.1 From 7bbe939d139be7edd77378cfc9a2c3ec6287749d Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 14 Oct 2010 01:14:27 +0000 Subject: more contact work and preliminary business card upload --- httemplate/edit/process/prospect_main.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html index 34d26421b..ca4dfabfe 100644 --- a/httemplate/edit/process/prospect_main.html +++ b/httemplate/edit/process/prospect_main.html @@ -4,7 +4,7 @@ 'agent_virt' => 1, 'process_o2m' => { 'table' => 'contact', - 'fields' => [qw( first last title comment )], + 'fields' => \@contact_fields, }, 'redirect' => popurl(3). 'view/prospect_main.html?', ) @@ -31,4 +31,9 @@ my $args_callback = sub { }; +my @contact_fields = qw( first last title comment emailaddress ); +foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) { + push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum; +} + -- cgit v1.2.1 From f3b1e139720b2262516ee3690b1d4b2b9941b500 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 17 Oct 2010 22:35:58 +0000 Subject: dns editing improvements: show an error from adding default records, redirect back to the dns section on all operations, finish editing. RT#8933 --- httemplate/edit/process/domain_record.cgi | 17 ++++++++++++----- httemplate/edit/process/svc_domain-defaultrecords.cgi | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi index ff0f2d414..8369f7114 100755 --- a/httemplate/edit/process/domain_record.cgi +++ b/httemplate/edit/process/domain_record.cgi @@ -1,8 +1,14 @@ %if ( $error ) { % errorpage($error); -%} else { +%} elsif ( $recnum ) { #editing +<% header('Nameservice record changed') %> + + +%} else { #adding % my $svcnum = $new->svcnum; -<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %> +<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %> %} <%init> @@ -21,10 +27,11 @@ my $new = new FS::domain_record ( { my $error; if ( $recnum ) { - $error=$new->replace($old); + $new->svcnum( $old->svcnum ); + $error = $new->replace($old); } else { - $error=$new->insert; - $recnum=$new->getfield('recnum'); + $error = $new->insert; + #$recnum = $new->getfield('recnum'); } diff --git a/httemplate/edit/process/svc_domain-defaultrecords.cgi b/httemplate/edit/process/svc_domain-defaultrecords.cgi index feb58406c..ec3d221f3 100644 --- a/httemplate/edit/process/svc_domain-defaultrecords.cgi +++ b/httemplate/edit/process/svc_domain-defaultrecords.cgi @@ -1,4 +1,8 @@ -<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %> +% if ( $error ) { +% errorpage($error); +% } else { +<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %> +% } <%init> die "access denied" -- cgit v1.2.1 From 942f129f37980d8a2a87be8c3297663ad38298ba Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 3 Nov 2010 00:33:24 +0000 Subject: bulk change package type, RT#9947 --- httemplate/edit/process/bulk-cust_pkg.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 httemplate/edit/process/bulk-cust_pkg.cgi (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/bulk-cust_pkg.cgi b/httemplate/edit/process/bulk-cust_pkg.cgi new file mode 100644 index 000000000..ede3ee8cd --- /dev/null +++ b/httemplate/edit/process/bulk-cust_pkg.cgi @@ -0,0 +1,9 @@ +<% $server->process %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $server = new FS::UI::Web::JSRPC 'FS::cust_pkg::process_bulk_cust_pkg', $cgi; + + -- cgit v1.2.1 From f099e0dfa8f438a84d8f1bce36f5e5bda60481e5 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 3 Nov 2010 23:44:48 +0000 Subject: more granular ACLs for posting check vs. cash payments, processing credit card vs echecks, RT#7887 --- httemplate/edit/process/cust_pay.cgi | 10 +++++++--- httemplate/edit/process/cust_refund.cgi | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index c8b0aa7df..0cd408958 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -27,9 +27,6 @@ %} <%init> -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Post payment'); - $cgi->param('linknum') =~ /^(\d+)$/ or die "Illegal linknum: ". $cgi->param('linknum'); my $linknum = $1; @@ -52,6 +49,13 @@ my $new = new FS::cust_pay ( { #} fields('cust_pay') } ); +my @rights = ('Post payment'); +push @rights, 'Post check payment' if $cust_pay->payby eq 'BILL'; +push @rights, 'Post cash payment' if $cust_pay->payby eq 'CASH'; + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right(\@rights); + my $error = $new->insert( 'manual' => 1 ); diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index 5749e5346..389bc990c 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -28,8 +28,21 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) my $link = $cgi->param('popup') ? 'popup' : ''; +my $payby = $cgi->param('payby'); + +my @rights = (); +push @rights, 'Post refund' if $payby /^(BILL|CASH)$/; +push @rights, 'Post check refund' if $payby eq 'BILL'; +push @rights, 'Post cash refund ' if $payby eq 'CASH'; +push @rights, 'Refund payment' if $payby /^(CARD|CHEK)$/; +push @rights, 'Refund credit card payment' if $payby eq 'CARD'; +push @rights, 'Refund Echeck payment' if $payby eq 'CHEK'; + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right(\@rights); + my $error = ''; -if ( $cgi->param('payby') =~ /^(CARD|CHEK)$/ ) { +if ( $payby =~ /^(CARD|CHEK)$/ ) { my %options = (); my $bop = $FS::payby::payby2bop{$1}; $cgi->param('refund') =~ /^(\d*)(\.\d{2})?$/ -- cgit v1.2.1 From 525583dc4bf34e3668871868b3374f590e4928a4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 4 Nov 2010 17:09:31 +0000 Subject: fix fallout from payment ACL changes, RT#10476 --- httemplate/edit/process/cust_pay.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index 0cd408958..d6bbf06b0 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -50,8 +50,8 @@ my $new = new FS::cust_pay ( { } ); my @rights = ('Post payment'); -push @rights, 'Post check payment' if $cust_pay->payby eq 'BILL'; -push @rights, 'Post cash payment' if $cust_pay->payby eq 'CASH'; +push @rights, 'Post check payment' if $new->payby eq 'BILL'; +push @rights, 'Post cash payment' if $new->payby eq 'CASH'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right(\@rights); -- cgit v1.2.1 From c9517f1f4972979fde880ade8236d31628b63834 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 4 Nov 2010 21:29:22 +0000 Subject: make contract_end editable, RT#10480 --- httemplate/edit/process/REAL_cust_pkg.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index 570f0e031..3a62ee001 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -20,7 +20,7 @@ my $pkgnum = $cgi->param('pkgnum') or die; my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); my %hash = $old->hash; $hash{$_}= $cgi->param($_) ? parse_datetime($cgi->param($_)) : '' - foreach qw( start_date setup bill last_bill adjourn expire ); + foreach qw( start_date setup bill last_bill adjourn expire contract_end ); my @errors = (); -- cgit v1.2.1 From 666ad2bb4d43e212e1a7832b16640d0f613b125e Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 4 Nov 2010 22:57:13 +0000 Subject: stop setting report_option_ to 1 --- httemplate/edit/process/part_pkg.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 08cc14086..97ae4e7ee 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -103,7 +103,7 @@ my $args_callback = sub { $options{"usage_taxproductnum_$_"} = $value; } - foreach ( $cgi->param('report_option') ) { + foreach ( grep $_, $cgi->param('report_option') ) { $error ||= "Illegal optional report class: $_" unless ( $_ =~ /^\d*$/ ); $options{"report_option_$_"} = 1; } -- cgit v1.2.1