From 720cf723d2c8e88760704e2fdc50ebf48e0574f2 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 3 Aug 2010 03:30:20 +0000 Subject: customer view tab for an external info page, RT#8903 --- httemplate/view/cust_main.cgi | 6 ++++++ httemplate/view/cust_main/custom.html | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 httemplate/view/cust_main/custom.html (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index f6bef43ba..0b6148da0 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -233,6 +233,10 @@ Comments <% include('cust_main/change_history.html', $cust_main ) %> % } +% if ( $view eq 'custom' ) { +<% include('cust_main/custom.html', $cust_main ) %> +% } + <% include('/elements/footer.html') %> <%init> @@ -273,6 +277,8 @@ $views{'Payment History'} = 'payment_history' unless $conf->config('payby-default' eq 'HIDE'); $views{'Change History'} = 'change_history' if $curuser->access_right('View customer history'); +$views{$conf->config('cust_main-custom_title') || 'Custom'} = 'custom' + if $conf->config('cust_main-custom_link'); $views{'Jumbo'} = 'jumbo'; my %viewname = reverse %views; diff --git a/httemplate/view/cust_main/custom.html b/httemplate/view/cust_main/custom.html new file mode 100644 index 000000000..8e2e07b75 --- /dev/null +++ b/httemplate/view/cust_main/custom.html @@ -0,0 +1,21 @@ + + +<%init> + +my( $cust_main ) = @_; + +my $proxyurl = $p.'/misc/custom_link_proxy.cgi?custnum='.$cust_main->custnum; + -- cgit v1.2.1 From 42a1267af992831cb8069835a18b8672a5f9afcb Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 4 Aug 2010 19:14:50 +0000 Subject: show cust_pay_pending attempted payments on customer payment history, RT#8815 --- httemplate/view/cust_main/payment_history.html | 10 ++++++ .../payment_history/attempted_payment.html | 41 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 httemplate/view/cust_main/payment_history/attempted_payment.html (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 0dc4c41d5..60d33ac23 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -422,6 +422,16 @@ foreach my $cust_pay_void ($cust_main->cust_pay_void) { } +#declined payments +foreach my $cust_pay_pending ($cust_main->cust_pay_pending_attempt) { + push @history, { + 'date' => $cust_pay_pending->_date, + 'desc' => include('payment_history/attempted_payment.html', $cust_pay_pending, %opt ), + 'void_payment' => $cust_pay_pending->paid, #?? + #'target' => $target, #XXX + }; +} + #credits (some false laziness w/payments) foreach my $cust_credit ($cust_main->cust_credit) { push @history, { diff --git a/httemplate/view/cust_main/payment_history/attempted_payment.html b/httemplate/view/cust_main/payment_history/attempted_payment.html new file mode 100644 index 000000000..554aa737d --- /dev/null +++ b/httemplate/view/cust_main/payment_history/attempted_payment.html @@ -0,0 +1,41 @@ +Payment attempt <% $info |h %> +<%init> + +my( $cust_pay_pending, %opt ) = @_; + +my $date_format = $opt{'date_format'} || '%m/%d/%Y'; + +my $curuser = $FS::CurrentUser::CurrentUser; + +my $payby = $cust_pay_pending->payby; + +my $payinfo; +if ( $payby eq 'CARD' ) { + $payinfo = $cust_pay_pending->paymask; +} elsif ( $payby eq 'CHEK' ) { + my( $account, $aba ) = split('@', $cust_pay_pending->paymask ); + $payinfo = "ABA $aba, Acct #$account"; +} else { + $payinfo = $cust_pay_pending->payinfo; +} + +$payby =~ s/^BILL$/Check #/ if $payinfo; +$payby =~ s/^CHEK$/Electronic check /; +$payby =~ s/^PREP$/Prepaid card /; +$payby =~ s/^CARD$/Credit card #/; +$payby =~ s/^COMP$/Complimentary by /; +$payby =~ s/^CASH$/Cash/; +$payby =~ s/^WEST$/Western Union/; +$payby =~ s/^MCRD$/Manual credit card/; +$payby =~ s/^BILL$//; +my $info = $payby ? "($payby$payinfo)" : ''; + +if ( $opt{'pkg-balances'} && $cust_pay_pending->pkgnum ) { + my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum'=>$cust_pay_pending->pkgnum } ); + $info .= ' for '. $cust_pkg->pkg_label_long; +} + +$info .= ': '. $cust_pay_pending->statustext + if length($cust_pay_pending->statustext); + + -- cgit v1.2.1 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/view/svc_acct/communigate.html | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_acct/communigate.html b/httemplate/view/svc_acct/communigate.html index 0f090fdb9..870744a87 100644 --- a/httemplate/view/svc_acct/communigate.html +++ b/httemplate/view/svc_acct/communigate.html @@ -54,17 +54,16 @@ value=>$svc_acct->cgp_sendmdnmode ) %> %# vacation message -%#XXX finish me... do we need to search for specific rules -%# (and hide them?) need to see what CGP gives back after we've added a rule <% include('/elements/init_overlib.html') %> Vacation message + <% $vacation_rule ? 'Active' : '' %> <% include('/elements/popup_link.html', 'action' => $p.'edit/cgp_rule-vacation.html?'. 'svcnum='. $svc_acct->svcnum, - 'label' => '(add)', #XXX (edit) + 'label' => $vacation_rule ? '(edit)' : '(add)', 'actionlabel' => 'Vacation message', 'width' => 600, 'height' => 300, @@ -75,15 +74,15 @@ %# redirect all mail -%#XXX finish me... Redirect all mail + <% $redirect_rule ? 'Active' : '' %> <% include('/elements/popup_link.html', 'action' => $p.'edit/cgp_rule-redirect_all.html?'. 'svcnum='. $svc_acct->svcnum, - 'label' => '(add)', #XXX (edit) + 'label' => $redirect_rule ? '(edit)' : '(add)', 'actionlabel' => 'Redirect all mail', 'width' => 763, #'height' @@ -110,6 +109,16 @@ my $svc_acct = $opt{'svc_acct'}; #my $part_svc = $opt{'part_svc'}; my $rule_link = qq(View/edit mail rules'; + $svc_acct->svcnum. '">View/edit mail rules'; #'dum vim + +my $vacation_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum, + 'name' => '#Vacation' + } + ); + +my $redirect_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum, + 'name' => '#Redirect' + } + ); -- cgit v1.2.1 From 89da4b96c4e2fce7079be8d2729750c088f8035b Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 6 Aug 2010 21:31:04 +0000 Subject: communigate phase 3: archive messages, RT#7515 --- httemplate/view/svc_acct/communigate.html | 8 ++++++++ httemplate/view/svc_domain/acct_defaults.html | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_acct/communigate.html b/httemplate/view/svc_acct/communigate.html index 870744a87..ece1724be 100644 --- a/httemplate/view/svc_acct/communigate.html +++ b/httemplate/view/svc_acct/communigate.html @@ -32,6 +32,14 @@ <% include('/view/elements/tr.html', label=>'Add trailer to sent mail', value=>$svc_acct->cgp_addmailtrailer ? 'YES' : 'NO' ) %> +% my $archive_after = $svc_acct->cgp_archiveafter; +% $archive_after = +% $archive_after +% ? ( $archive_after / 86400 ). ' days' +% : ( $archive_after eq '0' ? 'Never' : 'default (730 days)' ); + <% include('/view/elements/tr.html', label=>'Archive messages after', + value=>$archive_after, ) %> + %# preferences <% include('/view/elements/tr.html', label=>'Message delete method', diff --git a/httemplate/view/svc_domain/acct_defaults.html b/httemplate/view/svc_domain/acct_defaults.html index 3a4e187be..b5612827b 100644 --- a/httemplate/view/svc_domain/acct_defaults.html +++ b/httemplate/view/svc_domain/acct_defaults.html @@ -71,6 +71,14 @@ ) %> +% my $archive_after = $svc_domain->acct_def_cgp_archiveafter; +% $archive_after = +% $archive_after +% ? ( $archive_after / 86400 ). ' days' +% : ( $archive_after eq '0' ? 'Never' : 'default (730 days)' ); + <% include('/view/elements/tr.html', label=>'Archive messages after', + value=>$archive_after, ) %> + %# preferences <% include('/view/elements/tr.html', -- 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/view/svc_acct/communigate.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_acct/communigate.html b/httemplate/view/svc_acct/communigate.html index ece1724be..179facfa0 100644 --- a/httemplate/view/svc_acct/communigate.html +++ b/httemplate/view/svc_acct/communigate.html @@ -107,6 +107,13 @@ ) %> +%# RPOP + + <% include('/view/elements/tr.html', label=>'Remote POP accounts', + value=>$rpop_link, + ) + %> + <%init> my %opt = @_; @@ -116,8 +123,11 @@ my %opt = @_; my $svc_acct = $opt{'svc_acct'}; #my $part_svc = $opt{'part_svc'}; -my $rule_link = qq(View/edit mail rules'; #'dum vim +my $rule_link = qq(svcnum. '">View/edit mail rules'; + +my $rpop_link = qq(svcnum. '">View/edit remote POP accounts'; my $vacation_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum, 'name' => '#Vacation' -- cgit v1.2.1 From fc6928bd855d50cbd96b977746baf47c27fd99df Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 11 Aug 2010 03:49:18 +0000 Subject: valign=top --- httemplate/view/cust_main/payment_history.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 60d33ac23..b84883a2f 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -291,7 +291,7 @@ > - + % unless ( !$target || $target{$target}++ ) { @@ -308,19 +308,19 @@ <% $item->{'desc'} %> - + <% $charge %> - + <% $payment %> - + <% $credit %> - + <% $refund %> - + <% $showbalance %> -- cgit v1.2.1 From 955c17771c7aa05a2609309809809be37f4c8267 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 13 Aug 2010 19:26:22 +0000 Subject: add cust_main-title-display_custnum, RT#9621 --- httemplate/view/cust_main.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 0b6148da0..cb325e21d 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,5 +1,5 @@ <% include('/elements/header.html', { - 'title' => "Customer: ". $cust_main->name, + 'title' => $title, 'nobr' => 1, }) %> @@ -265,6 +265,11 @@ my $cust_main = qsearchs( { }); die "Customer not found!" unless $cust_main; +my $title = $cust_main->name; +$title = '('. $cust_main->display_custnum. ") $title" + if $conf->exists('cust_main-title-display_custnum'); +$title = "Customer: $title"; + #false laziness w/pref/pref.html and Conf.pm (cust_main-default_view) tie my %views, 'Tie::IxHash', 'Basics' => 'basics', -- cgit v1.2.1 From 39a2828f29728d34af96fc6e0aef23ea01f7a7a2 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Aug 2010 19:45:25 +0000 Subject: fix search of pending/billed CDRs to find src field too, RT#9640 --- httemplate/view/svc_phone.cgi | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 75591c747..3424d34f3 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -120,19 +120,28 @@ my $html_foot = sub { 'billed' => 'done', ; - #XXX src & charged party (& default prefix) as per voip_cdr.pm - #XXX handle toll free too - my $number = $svc_phone->phonenum; $number = $svc_phone->countrycode. $number unless $svc_phone->countrycode eq '1'; + #src & charged party as per voip_cdr.pm + my $search; + my $cust_pkg = $svc_phone->cust_svc->cust_pkg; + if ( $cust_pkg && $cust_pkg->part_pkg->option('disable_src') ) { + $search = "charged_party_or_src=$number"; + } else { + $search = "src=$number"; + } + + #XXX default prefix as per voip_cdr.pm + #XXX handle toll free too + #my @links = map { # qq(). # "View $_ CDRs"; #} keys(%what); my @links = map { - qq(). + qq(). "View $_ CDRs"; } keys(%what); -- cgit v1.2.1 From 106f396d4d9f14859674bc6156027a33e0b093ab Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Aug 2010 20:24:19 +0000 Subject: fix search of pending/billed CDRs to find src field too, RT#9640 --- httemplate/view/svc_phone.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 3424d34f3..27d270c89 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -128,9 +128,9 @@ my $html_foot = sub { my $search; my $cust_pkg = $svc_phone->cust_svc->cust_pkg; if ( $cust_pkg && $cust_pkg->part_pkg->option('disable_src') ) { - $search = "charged_party_or_src=$number"; + $search = "charged_party=$number"; } else { - $search = "src=$number"; + $search = "charged_party_or_src=$number"; } #XXX default prefix as per voip_cdr.pm -- 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/view/svc_domain/dns.html | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_domain/dns.html b/httemplate/view/svc_domain/dns.html index 88a9bda95..a73a27e57 100644 --- a/httemplate/view/svc_domain/dns.html +++ b/httemplate/view/svc_domain/dns.html @@ -8,7 +8,12 @@ } -DNS records +
+
+
+ DNS Records +
+ % my @records; if ( @records = $svc_domain->domain_record ) { <% include('/elements/table-grid.html') %> @@ -38,6 +43,7 @@ DNS records % || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') % ) { % ( my $recdata = $domain_record->recdata ) =~ s/"/\\'\\'/g; + (edit) (delete) % } @@ -53,15 +59,23 @@ DNS records % } -% } +% } else { + +
+ + +
+ +% } % if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) { +
IN @@ -69,6 +83,7 @@ DNS records
+
Or @@ -86,6 +101,8 @@ DNS records % } +
+
<%init> my($svc_domain, %opt) = @_; -- cgit v1.2.1 From 48e3f879908a13cb87786e32e158ff8a8bf18fbb Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 4 Sep 2010 02:19:03 +0000 Subject: set expire date for customer packages, RT#9697 --- httemplate/view/cust_main.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index cb325e21d..b4a6170c5 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -57,6 +57,7 @@ function areyousure(href, message) { 'color' => '#ff0000', 'cust_main' => $cust_main, 'width' => 616, #make room for reasons + 'height' => 366, } ) %> | -- cgit v1.2.1 From d583a5d3c0647488bac7b7a33d319fd1a85c05b3 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 11 Sep 2010 17:02:59 +0000 Subject: dns updates from Erik L: add ttl support, add check for SRV and finish allowing additional rectypes, allow forward slashes for RFC2317 classless in-arpa delegation, RT#8933 --- httemplate/view/svc_domain/dns.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_domain/dns.html b/httemplate/view/svc_domain/dns.html index a73a27e57..6380db7b2 100644 --- a/httemplate/view/svc_domain/dns.html +++ b/httemplate/view/svc_domain/dns.html @@ -26,6 +26,7 @@ Zone Type Data + TTL % foreach my $domain_record ( @records ) { @@ -37,7 +38,9 @@ <% $domain_record->reczone %> <% $type %> - <% $domain_record->recdata %> + <% $domain_record->recdata %> + <% $domain_record->ttl %> + % unless ( $domain_record->rectype eq 'SOA' % || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') @@ -80,6 +83,7 @@ % } + -- cgit v1.2.1 From fa7e044b2829a4e913c8094c7e8c59146a055efc Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 11 Sep 2010 17:27:56 +0000 Subject: UI hints for adding new nameservice records, too many to be intuitive now, RT#8933 --- httemplate/view/svc_domain/dns.html | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_domain/dns.html b/httemplate/view/svc_domain/dns.html index 6380db7b2..82cab068a 100644 --- a/httemplate/view/svc_domain/dns.html +++ b/httemplate/view/svc_domain/dns.html @@ -75,16 +75,36 @@
- - IN - - - - + + + + + + + + + +
+
+ Zone +
+ IN + +
+ Type +
+
+ Data +
+
+ TTL +
+ +

-- 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/view/cust_main/packages/package.html | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index 3c486dd25..3b58f9ec0 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -39,6 +39,7 @@ % if ( $curuser->access_right('Discount customer package') % && $part_pkg->can_discount % && ! scalar($cust_pkg->cust_pkg_discount_active) +% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) % ) % { % $br=1; -- 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/view/cust_main/billing.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 54c180bdd..dd195236a 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -206,6 +206,14 @@ Billing information <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %> + + Credit limit + + <% length($cust_main->credit_limit) ? + $money_char.sprintf("%.2f", $cust_main->credit_limit) : + 'Unlimited' %> + + % if ( $conf->exists('voip-cust_cdr_spools') ) { -- 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/view/cust_main/packages/status.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index a6868434b..74e52efdd 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -56,6 +56,7 @@ <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %> % # pkg_status_row($cust_pkg, 'Next bill', 'bill', %opt) <% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %> + <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %> > @@ -167,6 +168,7 @@ <% pkg_status_row_if($cust_pkg, 'Will automatically suspend by', 'autosuspend', %opt) %> <% pkg_status_row_if( $cust_pkg, 'Will suspend on', 'adjourn', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %> + <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %> % if ( $part_pkg->freq ) { -- 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/view/image.cgi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 httemplate/view/image.cgi (limited to 'httemplate/view') diff --git a/httemplate/view/image.cgi b/httemplate/view/image.cgi new file mode 100644 index 000000000..153ec858e --- /dev/null +++ b/httemplate/view/image.cgi @@ -0,0 +1,31 @@ +<% $data %>\ +<%init> + +#die "access denied" +# unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $conf = new FS::Conf; + +my $type; +if ( $cgi->param('type') eq 'png' ) { + $type = 'png'; +} elsif ( $cgi->param('type') eq 'eps' ) { + $type = 'eps'; +} else { + die "unknown image type ". $cgi->param('type'); +} + +my $data; +if ( $cgi->param('prefname') =~ /^(\w+)$/ ) { + + my $prefname = $1; + my $curuser = $FS::CurrentUser::CurrentUser; + $data = decode_base64( $curuser->option("$prefname") ); + +} else { + die "no preview_session specified"; +} + +http_header('Content-Type' => 'image/png' ); + + -- 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/view/svc_domain/dns.html | 86 +++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 36 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/svc_domain/dns.html b/httemplate/view/svc_domain/dns.html index 82cab068a..184286c31 100644 --- a/httemplate/view/svc_domain/dns.html +++ b/httemplate/view/svc_domain/dns.html @@ -7,28 +7,30 @@ return confirm("Remove all records and slave from " + document.SlaveForm.recdata.value + "?"); } +<% include('/elements/init_overlib.html') %> +
DNS Records
-% my @records; if ( @records = $svc_domain->domain_record ) { - - <% include('/elements/table-grid.html') %> +<% include('/elements/table-grid.html') %> % my $bgcolor1 = '#eeeeee'; -% my $bgcolor2 = '#ffffff'; -% my $bgcolor = $bgcolor2; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = $bgcolor2; Zone Type Data TTL + +% my @records = $svc_domain->domain_record; % foreach my $domain_record ( @records ) { % my $type = $domain_record->rectype eq '_mstr' % ? "(slave)" @@ -45,9 +47,20 @@ % unless ( $domain_record->rectype eq 'SOA' % || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') % ) { +% my $edit_link = include('/elements/popup_link.html', +% 'label' => 'edit', +% 'action' => $p.'edit/domain_record.html?recnum='. +% $domain_record->recnum, +% 'actionlabel' => 'Edit nameservice record', +% 'width' => 655, +% 'height' => 176, +% #'color' => '#ff0000', +% ); % ( my $recdata = $domain_record->recdata ) =~ s/"/\\'\\'/g; - (edit) - (delete) +% my $delete_url= "javascript:areyousure('${p}misc/delete-domain_record.cgi?". +% $domain_record->recnum. "', 'Delete ". +% $domain_record->reczone. " $type $recdata ?' )"; + <%$edit_link%> | delete % } @@ -61,50 +74,48 @@ % } - -% } else { +% if ( ! @records ) {
+ + + +
% } % if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) { -
- - - - - - + + - - - - -
-
- Zone -
- IN - + +
+
+ Zone +
+
Type -
-
- Data -
-
- TTL -
- -
+ + +
+ Data + + +
+ TTL + + + + +

@@ -122,9 +133,12 @@ +

% } + +
<%init> -- cgit v1.2.1 From e2cff16135741b166473d18f828ad54f57037dae Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 18 Oct 2010 02:46:33 +0000 Subject: suspend_bill package option to continue recurring billing while suspended and part_pkg-default_suspend_bill conf option to set it by default, RT#10148 --- httemplate/view/cust_main/packages/status.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index 74e52efdd..c05cd5a94 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -54,7 +54,9 @@ <% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %> <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %> -% # pkg_status_row($cust_pkg, 'Next bill', 'bill', %opt) +% if ( $part_pkg->option('suspend_bill') ) { + <% pkg_status_row_if( $cust_pkg, 'Next bill', 'bill', %opt, curuser=>$curuser ) %> +% } <% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %> -- cgit v1.2.1 From a8e4b1744a6bbd2e1509b58e73b1d52751563880 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 20 Oct 2010 02:07:02 +0000 Subject: customer merging, RT#10247 --- httemplate/view/cust_main.cgi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index b4a6170c5..0f9c1e250 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -64,6 +64,22 @@ function areyousure(href, message) { % } +% if ( $curuser->access_right('Merge customer') ) { + + <% include( '/elements/popup_link-cust_main.html', + { 'action' => $p. 'misc/merge_cust.html', + 'label' => 'Merge this customer', + 'actionlabel' => 'Merge customer', + #'color' => '#ff0000', + 'cust_main' => $cust_main, + 'width' => 480, + 'height' => 192, + } + ) + %> | + +% } + % if ( $conf->exists('deletecustomers') % && $curuser->access_right('Delete customer') % ) { -- cgit v1.2.1 From 3e8635e9b88abdd5da862870184d9318c076933c Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 22 Oct 2010 06:14:24 +0000 Subject: display both original usernum and void usernum vfor voided payments, RT#10280 --- httemplate/view/cust_main/payment_history/voided_payment.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html index be68ff091..5d7f60cf5 100644 --- a/httemplate/view/cust_main/payment_history/voided_payment.html +++ b/httemplate/view/cust_main/payment_history/voided_payment.html @@ -1,6 +1,10 @@ -Payment <% $info %> +Payment <% $info %> by <% $cust_pay_void->otaker %> voided <% time2str($date_format, $cust_pay_void->void_date) %> -by <% $cust_pay_void->otaker %><% $unvoid %> +% my $void_user = $cust_pay_void->void_access_user; +% if ($void_user) { + by <% $void_user->username %> +% } +<% $unvoid %> <%init> my( $cust_pay_void, %opt ) = @_; -- cgit v1.2.1 From d2aa9a479f8d45ef18ef9076e7e72865b8665491 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 22 Oct 2010 06:29:09 +0000 Subject: respect voip-cdr_email config when viewing invoices in the backend, RT#10280 --- httemplate/view/cust_bill.cgi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index ce8d96a95..f1618fa4b 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -117,13 +117,14 @@ if ( $query =~ /^((.+)-)?(\d+)$/ ) { $notice_name = $cgi->param('notice_name'); } +my $conf = new FS::Conf; + my %opt = ( - 'template' => $template, - 'notice_name' => $notice_name, + 'unsquelch_cdr' => $conf->exists('voip-cdr_email'), + 'template' => $template, + 'notice_name' => $notice_name, ); -my $conf = new FS::Conf; - my @payby = grep /\w/, $conf->config('payby'); #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) -- cgit v1.2.1 From 140b381af1008dad929b4d3b87aa1e54747d534f Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 25 Oct 2010 00:28:41 +0000 Subject: svc_pbx and whole-customer links to CDRs, RT#10315 --- httemplate/view/cust_main/packages.html | 4 +- httemplate/view/svc_pbx.cgi | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 httemplate/view/svc_pbx.cgi (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 811ac3c98..f0f156bf8 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -57,7 +57,9 @@ Current packages Package reports
Service reports: - accounts + accounts
+ Usage reports: + CDRs diff --git a/httemplate/view/svc_pbx.cgi b/httemplate/view/svc_pbx.cgi new file mode 100644 index 000000000..79cafed4d --- /dev/null +++ b/httemplate/view/svc_pbx.cgi @@ -0,0 +1,72 @@ +<% include('elements/svc_Common.html', + 'table' => 'svc_pbx', + 'edit_url' => $p."edit/svc_Common.html?svcdb=svc_pbx;svcnum=", + 'labels' => \%labels, + 'html_foot' => $html_foot, + ) +%> +<%init> + +my $fields = FS::svc_pbx->table_info->{'fields'}; +my %labels = map { $_ => ( ref($fields->{$_}) + ? $fields->{$_}{'label'} + : $fields->{$_} + ); + } + keys %$fields; + +my $html_foot = sub { + my $svc_pbx = shift; + + ## + # CDR links + ## + + tie my %what, 'Tie::IxHash', + 'pending' => 'NULL', + 'billed' => 'done', + ; + + #matching as per package def cdr_svc_method + my $cust_pkg = $svc_pbx->cust_svc->cust_pkg; + return '' unless $cust_pkg; + + my @voip_pkgs = + grep { $_->plan eq 'voip_cdr' } $cust_pkg->part_pkg->self_and_bill_linked; + if ( scalar(@voip_pkgs) > 1 ) { + warn "multiple voip_cdr packages bundled\n"; + return ''; + } elsif ( !@voip_pkgs ) { + warn "no voip_cdr packages\n"; + } + my $voip_pkg = @voip_pkgs[0]; + + my $cdr_svc_method = $voip_pkg->option('cdr_svc_method') + || 'svc_phone.phonenum'; + return '' unless $cdr_svc_method =~ /^svc_pbx\.(\w+)$/; + my $field = $1; + + my $search; + if ( $field eq 'title' ) { + $search = 'charged_party='. uri_escape($svc_pbx->title); + } elsif ( $field eq 'svcnum' ) { + $search = 'svcnum='. $svc_pbx->svcnum; + } else { + warn "unknown cdr_svc_method svc_pbx.$field"; + return ''; + } + + my @links = map { + qq(). + "View $_ CDRs"; + } keys(%what); + + ### + # concatenate & return + ### + + join(' | ', @links ). '
'; + +}; + + -- cgit v1.2.1 From 0a51b87d75f8c93de863f729ef1ca568ca227e32 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 25 Oct 2010 22:22:42 +0000 Subject: summary display of bulk packages with many services, RT#9821 --- httemplate/view/cust_main/packages.html | 1 + httemplate/view/cust_main/packages/services.html | 44 ++++++++++++++++++++++-- httemplate/view/elements/svc_Common.html | 16 +++++---- 3 files changed, 51 insertions(+), 10 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index f0f156bf8..660d0ef86 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -163,6 +163,7 @@ my %conf_opt = ( 'legacy_link' => $conf->exists('legacy_link'), 'svc_broadband-manage_link' => scalar($conf->config('svc_broadband-manage_link')), 'maestro-status_test' => $conf->exists('maestro-status_test'), + 'cust_pkg-large_pkg_size' => $conf->config('cust_pkg-large_pkg_size'), ); #subroutines diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index 6e30922c5..512efccc4 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -4,12 +4,40 @@ + % #foreach my $svcpart (sort {$a->{svcpart} <=> $b->{svcpart}} @{$pkg->{svcparts}}) { % foreach my $part_svc ( $cust_pkg->part_svc ) { -% #foreach my $service (@{$svcpart->{services}}) { -% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) { +% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and +% $opt{'cust_pkg-large_pkg_size'} <= $cust_pkg->num_svcs ) { +% # summarize + + + +% } +% else { +% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) { @@ -65,7 +93,8 @@ -% } +% } #foreach $cust_svc +% } % if ( ! $cust_pkg->get('cancel') % && $curuser->access_right('Provision customer service') @@ -137,4 +166,13 @@ sub svc_unprovision_link { qq!', 'Permanently unprovision and delete this service?')">Unprovision!; } +my %hints = ( +svc_acct => '(user or email)', +svc_domain => '(domain)', +svc_broadband => '(ip or mac)', +svc_forward => '(email)', +svc_phone => '(phone)', +svc_pbx => '(phone)', +); + diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 852640e0c..8a352f3fa 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -21,6 +21,13 @@ ) + + % if ( $custnum ) { <% include("/elements/header.html","View $label: $value") %> @@ -36,18 +43,13 @@ "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" )) %> - - % } Service #<% $svcnum %> % my $url = $opt{'edit_url'} || $p. 'edit/'. $opt{'table'}. '.cgi?'; | Edit this <% $label %> +| +Unprovision this Service
<% ntable("#cccccc") %> - + % } elsif ( $cust_main->payby eq 'COMP' ) { diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index e88c02ea5..e91af54e6 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -10,7 +10,7 @@ % if ( $which eq '' && $conf->exists('show_ss') ) { @@ -19,11 +19,11 @@ - + - + % if ( $cust_main->get("${pre}address2") ) { @@ -36,20 +36,20 @@ - + % } - + % if ( $cust_main->get("${pre}county") ) { - + % } - + -- 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/view/cust_bill.cgi | 10 +++++----- httemplate/view/cust_main/payment_history.html | 12 ++++++------ httemplate/view/cust_main/payment_history/payment.html | 5 ++++- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index f1618fa4b..0928d04bc 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -26,7 +26,7 @@ % if ( $cust_bill->owed > 0 % && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD) ) -% && $curuser->access_right('Post payment') +% && $curuser->access_right(['Post payment', 'Post check payment', 'Post cash payment']) % && ! $conf->exists('pkg-balances') % ) % { @@ -34,22 +34,22 @@ Post -% if ( $payby{'BILL'} ) { +% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) { <% $s++ ? ' | ' : '' %> check % } -% if ( $payby{'CASH'} ) { +% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> cash % } -% if ( $payby{'WEST'} ) { +% if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { <% $s++ ? ' | ' : '' %> Western Union % } -% if ( $payby{'MCRD'} ) { +% if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { <% $s++ ? ' | ' : '' %> manual credit card % } diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index b84883a2f..111810e4f 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -1,7 +1,7 @@ %# payment links % my $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) { +% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check payment', @@ -14,7 +14,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) { +% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash payment', @@ -33,7 +33,7 @@ % } % if ( ( $payby{'CARD'} || $payby{'DCRD'} ) -% && $curuser->access_right('Process payment') +% && $curuser->access_right(['Process payment', 'Process credit card payment']) % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -41,7 +41,7 @@ % } % if ( ( $payby{'CHEK'} || $payby{'DCHK'} ) -% && $curuser->access_right('Process payment') +% && $curuser->access_right(['Process payment', 'Process Echeck payment']) % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -73,7 +73,7 @@ %# refund links % $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right('Post refund') ) { +% if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check refund', @@ -86,7 +86,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right('Post refund') ) { +% if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash refund', diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html index 6ec9fdb96..e745864b7 100644 --- a/httemplate/view/cust_main/payment_history/payment.html +++ b/httemplate/view/cust_main/payment_history/payment.html @@ -155,11 +155,14 @@ my $view = my $refund = ''; my $refund_days = $opt{'card_refund-days'} || 120; +my @rights = ('Refund payment'); +push @rights, 'Refund credit card payment' if $payby eq 'CARD'; +push @rights, 'Refund Echeck payment' if $payby eq 'CHEK'; if ( $cust_pay->closed !~ /^Y/i && $cust_pay->payby =~ /^(CARD|CHEK)$/ && time-$cust_pay->_date < $refund_days*86400 && $cust_pay->unrefunded > 0 - && $curuser->access_right('Refund payment') + && $curuser->access_right(\@rights) ) { $refund = qq! ( Date: Thu, 4 Nov 2010 00:54:36 +0000 Subject: added an e-mail link on payment receipts, RT7946 --- httemplate/view/cust_pay.html | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html index 2f23d9e14..1408b3db2 100644 --- a/httemplate/view/cust_pay.html +++ b/httemplate/view/cust_pay.html @@ -2,7 +2,10 @@ <% include('/elements/header-popup.html', "$thing Receipt" ) %> -
Print

+
+ Print | + Re-email +

% } elsif ( $link eq 'print' ) { @@ -15,7 +18,12 @@ ) %>

- +% } elsif ( $link eq 'email' ) { +% if ( $email_error ) { + <% include('/elements/header-popup.html', "Error re-emailing receipt: $email_error" ) %> +% } else { + <% include('/elements/header-popup.html', "Re-emailed receipt" ) %> +% } % } else { <% include('/elements/header.html', "$thing Receipt", menubar( @@ -26,7 +34,7 @@ % } -% unless ($link eq 'popup' ) { +% unless ($link =~ /^(popup|email)$/ ) { <% include('/elements/small_custview.html', $custnum, scalar($conf->config('countrydefault')), @@ -110,9 +118,14 @@ window.print(); -% } +% } elsif ( $link eq 'email' ) { -% if ( $link =~ /^(popup|print)$/ ) { + + +% } +% if ( $link =~ /^(popup|print|email)$/ ) { % } else { @@ -149,6 +162,7 @@ my $cust_pay = qsearchs({ die "$thing #$paynum not found!" unless $cust_pay; my $pr_link = "${p}view/cust_pay.html?link=print;paynum=$paynum;void=$void"; +my $email_link = "${p}view/cust_pay.html?link=email;paynum=$paynum;void=$void"; my $custnum = $cust_pay->custnum; my $display_custnum = $cust_pay->cust_main->display_custnum; @@ -159,4 +173,14 @@ my $money_char = $conf->config('money_char') || '$'; tie my %payby, 'Tie::IxHash', FS::payby->payby2longname; +my $email_error; + +if ( $link eq 'email' ) { + my $email_error = $cust_pay->send_receipt( + 'manual' => 1, + ); + + warn "can't send payment receipt/statement: $email_error" if $email_error; +} + -- cgit v1.2.1 From 8be75d426dfc9125fa49dce625d40b7462b9be09 Mon Sep 17 00:00:00 2001 From: levinse Date: Fri, 5 Nov 2010 18:46:25 +0000 Subject: display any pending payments in customer view, RT10270 --- httemplate/view/cust_main/payment_history.html | 22 +++++--- .../cust_main/payment_history/pending_payment.html | 61 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 httemplate/view/cust_main/payment_history/pending_payment.html (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 111810e4f..5586897fb 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -1,7 +1,7 @@ %# payment links % my $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { +% if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check payment', @@ -14,7 +14,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { +% if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash payment', @@ -33,7 +33,7 @@ % } % if ( ( $payby{'CARD'} || $payby{'DCRD'} ) -% && $curuser->access_right(['Process payment', 'Process credit card payment']) +% && $curuser->access_right('Process payment') % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -41,7 +41,7 @@ % } % if ( ( $payby{'CHEK'} || $payby{'DCHK'} ) -% && $curuser->access_right(['Process payment', 'Process Echeck payment']) +% && $curuser->access_right('Process payment') % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -73,7 +73,7 @@ %# refund links % $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { +% if ( $payby{'BILL'} && $curuser->access_right('Post refund') ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check refund', @@ -86,7 +86,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { +% if ( $payby{'CASH'} && $curuser->access_right('Post refund') ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash refund', @@ -412,6 +412,16 @@ foreach my $cust_pay ($cust_main->cust_pay) { }; } +#pending payments +foreach my $cust_pay_pending ($cust_main->cust_pay_pending) { + push @history, { + 'date' => $cust_pay_pending->_date, + 'desc' => include('payment_history/pending_payment.html', $cust_pay_pending, %opt ), + 'void_payment' => $cust_pay_pending->paid, + }; +} + + #voided payments foreach my $cust_pay_void ($cust_main->cust_pay_void) { push @history, { diff --git a/httemplate/view/cust_main/payment_history/pending_payment.html b/httemplate/view/cust_main/payment_history/pending_payment.html new file mode 100644 index 000000000..40805b1aa --- /dev/null +++ b/httemplate/view/cust_main/payment_history/pending_payment.html @@ -0,0 +1,61 @@ +Pending payment <% "$info $status ($link)" %> +<%init> + +my( $cust_pay_pending, %opt ) = @_; + +my $conf = new FS::Conf; + +my $curuser = $FS::CurrentUser::CurrentUser; + +my $payby = $cust_pay_pending->payby; + +my $payinfo; +if ( $payby eq 'CARD' ) { + $payinfo = $cust_pay_pending->paymask; +} elsif ( $payby eq 'CHEK' ) { + my( $account, $aba ) = split('@', $cust_pay_pending->paymask ); + $payinfo = "ABA $aba, Acct #$account"; +} else { + $payinfo = $cust_pay_pending->payinfo; +} + +my $target = "$payby$payinfo"; +$payby =~ s/^BILL$/Check #/ if $payinfo; +$payby =~ s/^CHEK$/Electronic check /; +$payby =~ s/^PREP$/Prepaid card /; +$payby =~ s/^CARD$/Credit card #/; +$payby =~ s/^COMP$/Complimentary by /; +$payby =~ s/^CASH$/Cash/; +$payby =~ s/^WEST$/Western Union/; +$payby =~ s/^MCRD$/Manual credit card/; +$payby =~ s/^BILL$//; +my $info = $payby ? "($payby$payinfo)" : ''; + +my %statusaction = ( + 'new' => 'delete', + 'pending' => 'complete', + 'captured' => 'capture', +); + +my $edit_pending = + $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments'); + +my $status = "Status: ".$cust_pay_pending->status; + +my $action = $statusaction{$cust_pay_pending->status}; + +my $link = ""; +if ( $action && $edit_pending ) { + $link = include('/elements/popup_link.html', + 'action' => $p. 'edit/cust_pay_pending.html'. + '?paypendingnum='. $cust_pay_pending->paypendingnum. + ";action=$action", + 'label' => $action, + 'color' => '#ff0000', + 'width' => 655, + 'height' => ( $action eq 'delete' ? 480 : 575 ), + 'actionlabel' => ucfirst($action). ' pending payment', + ); +} + + -- cgit v1.2.1 From 9b2de4257b6a2877434008188e52b8ef71ff339d Mon Sep 17 00:00:00 2001 From: levinse Date: Fri, 5 Nov 2010 19:05:56 +0000 Subject: Fix undoing of changes caused by previous commit --- httemplate/view/cust_main/payment_history.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 5586897fb..046899e5e 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -1,7 +1,7 @@ %# payment links % my $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) { +% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check payment', @@ -14,7 +14,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) { +% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash payment', @@ -33,7 +33,7 @@ % } % if ( ( $payby{'CARD'} || $payby{'DCRD'} ) -% && $curuser->access_right('Process payment') +% && $curuser->access_right(['Process payment', 'Process credit card payment']) % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -41,7 +41,7 @@ % } % if ( ( $payby{'CHEK'} || $payby{'DCHK'} ) -% && $curuser->access_right('Process payment') +% && $curuser->access_right(['Process payment', 'Process Echeck payment']) % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> @@ -73,7 +73,7 @@ %# refund links % $s = 0; -% if ( $payby{'BILL'} && $curuser->access_right('Post refund') ) { +% if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter check refund', @@ -86,7 +86,7 @@ %> % } -% if ( $payby{'CASH'} && $curuser->access_right('Post refund') ) { +% if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { <% $s++ ? ' | ' : '' %> <% include('/elements/popup_link-cust_main.html', 'label' => 'Enter cash refund', -- cgit v1.2.1
+% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart. +% ";pkgnum=".$cust_pkg->pkgnum; + <% $part_svc->svc %>  + (view all <% $cust_pkg->num_svcs %>) +% my $hint = $hints{$part_svc->svcdb}; +% if ( $hint ) { +
+
+ + + +
+% } #$hint +
<% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %>
<% ntable("#cccccc",2) %> -- cgit v1.2.1 From 82de9040b2d99c05060be6396bab8bd74db96f6c Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 2 Nov 2010 00:28:13 +0000 Subject: fix for uumlaut problem, RT#10359 --- httemplate/view/cust_main/billing.html | 2 +- httemplate/view/cust_main/contacts.html | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index dd195236a..014ddaba2 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -132,7 +132,7 @@ Billing information
Attention<% $cust_main->payname %><% $cust_main->payname |h %>
Contact name - <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %> + <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> SS#
Company<% $cust_main->get("${pre}company") %><% $cust_main->get("${pre}company") |h %>
Address<% $cust_main->get("${pre}address1") %><% $cust_main->get("${pre}address1") |h %>
<% $address2_label %><% $cust_main->get("${pre}address2") %><% $cust_main->get("${pre}address2") |h %>
City<% $cust_main->get("${pre}city") %><% $cust_main->get("${pre}city") |h %>County<% $cust_main->get("${pre}county") %><% $cust_main->get("${pre}county") |h %>State<% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) %><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %> Zip <% $cust_main->get("${pre}zip") %>