@@ -79,6 +75,11 @@ local $SIG{__DIE__}; #disable Mason error trap
my $DEBUG = 0;
+my $head = '
+
+
+';
+
my $census_year = $cgi->param('census_year');
my $pre = $cgi->param('pre');
my $zip_code = $cgi->param('zip_code');
--
cgit v1.2.1
From 0d62051d0e0ed3bd2e26e1a619dcb6190b653ab8 Mon Sep 17 00:00:00 2001
From: Christopher Burger
Date: Thu, 5 Oct 2017 10:17:36 -0400
Subject: RT# 76968 - Added logo only header file
---
httemplate/elements/header-logo.html | 114 +++++++++++++++++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 httemplate/elements/header-logo.html
(limited to 'httemplate')
diff --git a/httemplate/elements/header-logo.html b/httemplate/elements/header-logo.html
new file mode 100644
index 000000000..f272c56f6
--- /dev/null
+++ b/httemplate/elements/header-logo.html
@@ -0,0 +1,114 @@
+<%doc>
+
+Example:
+
+ <& /elements/header-logo.html',
+ {
+ 'title' => 'Title',
+ 'menubar' => \@menubar,
+ 'etc' => '', #included in tag, for things like onLoad=
+ 'head' => '', #included before closing tag
+ 'nobr' => 0, #1 for no after the title
+ 'no_jquery' => #for use from RT, which loads its own
+ }
+ &>
+
+%doc>
+
+%#
+%# above is what RT declares, should we switch now? hopefully no glitches result
+%# or just fuck it, XHTML died anyway, HTML 5 or bust?
+
+
+
+ <% encode_entities($title) || $title_noescape |n %>
+
+
+
+
+
+
+
+% if ( $mobile ) {
+
+% }
+
+% unless ( $nocss ) {
+
+
+% }
+
+% unless ( $no_jquery ) {
+
+
+
+
+% if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
+
+% }
+% }
+ <% include('init_overlib.html') |n %>
+ <% include('rs_init_object.html') |n %>
+
+ <% $head |n %>
+
+%# announce our base path, and the Mason comp path of this page
+
+
+
+ STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
+
+
+<%init>
+
+my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
+my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
+
+my $mobile;
+
+my $opt = shift;
+$title = $opt->{title};
+$title_noescape = $opt->{title_noescape};
+$menubar = $opt->{menubar};
+$etc = $opt->{etc};
+$head = $opt->{head};
+$nobr = $opt->{nobr};
+$nocss = $opt->{nocss};
+$mobile = $opt->{mobile};
+$no_jquery = $opt->{no_jquery};
+
+my $conf = new FS::Conf;
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+my $menu_position = $curuser->option('menu_position')
+ || 'top'; #new default for 1.9
+
+if ( !defined($mobile) ) {
+ $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
+}
+if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
+ $mobile = $1;
+}
+
+my($company_name, $company_url);
+my @agentnums = $curuser->agentnums;
+if ( scalar(@agentnums) == 1 ) {
+ $company_name = $conf->config('company_name', $agentnums[0] );
+ $company_url = $conf->config('company_url', $agentnums[0] );
+} else {
+ $company_name = $conf->config('company_name');
+ $company_url = $conf->config('company_url');
+}
+
+%init>
\ No newline at end of file
--
cgit v1.2.1
From 3baaec7890cb90834878c915b589a2eaf2ee437c Mon Sep 17 00:00:00 2001
From: Ivan Kohler
Date: Sat, 14 Oct 2017 17:04:04 -0700
Subject: no AGPL on customer self-service
---
httemplate/docs/license.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'httemplate')
diff --git a/httemplate/docs/license.html b/httemplate/docs/license.html
index 4ab596db2..91fbbe286 100644
--- a/httemplate/docs/license.html
+++ b/httemplate/docs/license.html
@@ -36,7 +36,9 @@ All rights reserved
option) any later version.
- At your option, you may also redistribute and/or modify the
+ At your option, you may also redistribute and/or modify the files in
+ fs_selfservice/drupal/ fs_selfservice/wordpress/ fs_selfservice/perl/ and
+ fs_selfservice/java/ directories and the
fs_selfservice/php/freeside.class.php file (but not the rest of the
software) under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the License,
--
cgit v1.2.1
From 5ac72e74de9e105c8952eee7cf905ab9116926e1 Mon Sep 17 00:00:00 2001
From: Ivan Kohler
Date: Sat, 14 Oct 2017 17:04:17 -0700
Subject: show compliance solutions JSON, RT#77789
---
httemplate/view/cust_bill-taxengine_request.html | 14 ++++++++++++++
httemplate/view/cust_bill.cgi | 12 ++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 httemplate/view/cust_bill-taxengine_request.html
(limited to 'httemplate')
diff --git a/httemplate/view/cust_bill-taxengine_request.html b/httemplate/view/cust_bill-taxengine_request.html
new file mode 100644
index 000000000..991e65f46
--- /dev/null
+++ b/httemplate/view/cust_bill-taxengine_request.html
@@ -0,0 +1,14 @@
+<& /elements/header-popup.html &>
+<% $cust_bill->taxengine_request |h %>
+<& /elements/footer-popup.html &>
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied"
+ unless $curuser->access_right('View invoices');
+
+my $invnum = $cgi->param('invnum');
+my $cust_bill = qsearchs('cust_bill', { invnum=>$invnum });
+
+%init>
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index e35d7f1cf..762eec033 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -171,6 +171,18 @@ function change_invoice_mode(obj) {
&>
% $br++;
% }
+% if ( $cust_bill->taxengine_request ) { # inefficient
+<% $br ? '|' : '' %>
+<& /elements/popup_link.html,
+ 'action' => 'cust_bill-taxengine_request.html?invnum=' . $cust_bill->invnum,
+ 'label' => mt('View raw tax engine request'),
+ 'actionlabel' => mt('Tax engine request'),
+ 'width' => 1050,
+ 'height' => 600,
+ 'title' => emt('Tax engine request'),
+&>
+% $br++;
+% }
--
cgit v1.2.1
From f654e068b6e7be55bdbd749293c1bda7737cf870 Mon Sep 17 00:00:00 2001
From: Christopher Burger
Date: Tue, 17 Oct 2017 09:41:12 -0400
Subject: RT# 78019 - Added total revenue line to Package churn report
---
httemplate/graph/cust_pkg.html | 13 ++++++++++---
httemplate/graph/elements/monthly.html | 2 ++
httemplate/graph/elements/report.html | 3 ++-
3 files changed, 14 insertions(+), 4 deletions(-)
(limited to 'httemplate')
diff --git a/httemplate/graph/cust_pkg.html b/httemplate/graph/cust_pkg.html
index 3b6552ba8..68c5b2136 100644
--- a/httemplate/graph/cust_pkg.html
+++ b/httemplate/graph/cust_pkg.html
@@ -7,12 +7,13 @@
'links' => \@links,
'params' => \@params,
'agentnum' => $agentnum,
- 'sprintf' => ( $normalize ? '%0.1f%%' : '%u'),
+ 'sprintf' => ( $normalize ? '%0.1f%%' : '%u'),
+ 'sprintf_fields' => $sprintf_fields,
'normalize' => ( $normalize ? 0 : undef ),
'disable_money' => 1,
'remove_empty' => (scalar(@group_keys) > 1 ? 1 : 0),
'nototal' => 1,
- 'no_graph' => [ 1, 0, 0, 0, 0 ], # don't graph 'active'
+ 'no_graph' => [ 1, 0, 0, 0, 0, 1 ], # don't graph 'active, total_revenue'
&>
<%init>
@@ -33,7 +34,7 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
my $agentname = $agent ? $agent->agent.' ' : '';
-my @base_items = qw( active_pkg setup_pkg susp_pkg unsusp_pkg cancel_pkg );
+my @base_items = qw( active_pkg setup_pkg susp_pkg unsusp_pkg cancel_pkg total_revenue_pkg );
my %base_labels = (
'active_pkg' => 'Active packages',
@@ -41,6 +42,7 @@ my %base_labels = (
'susp_pkg' => 'Suspensions',
'unsusp_pkg' => 'Unsuspensions',
'cancel_pkg' => 'Cancellations',
+ 'total_revenue_pkg' => 'Total Revenue'
);
my %base_colors = (
@@ -49,8 +51,13 @@ my %base_colors = (
'susp_pkg' => 'ff9900', #yellow
'unsusp_pkg' => '44ff44', #light green
'cancel_pkg' => 'cc0000', #red
+ 'total_revenue_pkg' => '0000ff', #blue
);
+my $sprintf_fields = {
+ 'total_revenue_pkg' => '%.2f', #format to 2 decimal places
+};
+
my %base_links;
foreach my $status (qw(active setup cancel susp unsusp)) {
$base_links{$status.'_pkg'} =
diff --git a/httemplate/graph/elements/monthly.html b/httemplate/graph/elements/monthly.html
index 1a9428115..cfe5a3c6d 100644
--- a/httemplate/graph/elements/monthly.html
+++ b/httemplate/graph/elements/monthly.html
@@ -59,6 +59,7 @@ Example:
'no_graph' => \@no_graph,
'bottom_link' => \@bottom_link,
'transpose' => $opt{'daily'},
+ 'sprintf_fields' => $sprintf_fields,
map { $_, $opt{$_} } (qw(title
nototal
graph_type
@@ -79,6 +80,7 @@ my $fromparam = $opt{'link_fromparam'} || 'begin';
my $toparam = $opt{'link_toparam'} || 'end';
my @items = @{ $opt{'items'} };
+my $sprintf_fields = $opt{'sprintf_fields'};
foreach my $other (qw( labels graph_labels colors links )) {
if ( ref($opt{$other}) eq 'HASH' ) {
diff --git a/httemplate/graph/elements/report.html b/httemplate/graph/elements/report.html
index b5d214816..70c3a9e94 100644
--- a/httemplate/graph/elements/report.html
+++ b/httemplate/graph/elements/report.html
@@ -249,7 +249,7 @@ any delimiter and linked from the elements in @data.
% my $e = 0;
% foreach ( @$data_row ) {
% my $entry = $_;
-% $entry = $money_char . sprintf($sprintf, $entry);
+% $entry = $money_char . sprintf($sprintf_fields->{$row} ? $sprintf_fields->{$row} : $sprintf, $entry);
% $entry = $link_prefix . shift(@$links) . "\">$entry" if $link_prefix;
% push @{$cell[$i]}, $entry;
% $bottom_total[$e++] += $_ unless $opt{no_graph}[$i-1];
@@ -343,6 +343,7 @@ my $conf = new FS::Conf;
my $money_char = $opt{'disable_money'} ? '' : $conf->config('money_char');
my @items = @{ $opt{'items'} };
+my $sprintf_fields = $opt{'sprintf_fields'};
foreach my $other (qw( col_labels row_labels graph_labels axis_labels colors links )) {
if ( ref($opt{$other}) eq 'HASH' ) {
--
cgit v1.2.1