diff options
author | ivan <ivan> | 2009-10-29 01:08:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-10-29 01:08:33 +0000 |
commit | 9d77a21db3642ca66d9a0e545b804b7e6b4090ee (patch) | |
tree | 8323e01c8e25420222c97b4e0ea87f89b73203fd /httemplate/browse | |
parent | f274814c7cde3681578ca594a2b00475370e4c92 (diff) |
customer classification, RT#6376
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/cust_category.html | 32 | ||||
-rw-r--r-- | httemplate/browse/cust_class.html | 45 | ||||
-rw-r--r-- | httemplate/browse/part_pkg_report_option.html | 2 | ||||
-rw-r--r-- | httemplate/browse/pkg_category.html | 3 | ||||
-rw-r--r-- | httemplate/browse/pkg_class.html | 4 |
5 files changed, 81 insertions, 5 deletions
diff --git a/httemplate/browse/cust_category.html b/httemplate/browse/cust_category.html new file mode 100644 index 000000000..4468d2f09 --- /dev/null +++ b/httemplate/browse/cust_category.html @@ -0,0 +1,32 @@ +<% include( 'elements/browse.html', + 'title' => 'Customer categories', + 'html_init' => $html_init, + 'name' => 'customer categories', + 'disableable' => 1, + 'disabled_statuspos' => 2, + 'query' => { 'table' => 'cust_category', + 'hashref' => {}, + 'extra_sql' => 'ORDER BY categorynum', + }, + 'count_query' => $count_query, + 'header' => [ '#', 'Category' ], + 'fields' => [ 'categorynum', 'categoryname' ], + 'links' => [ $link, $link ], + ) +%> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $html_init = + qq!<A HREF="${p}browse/cust_class.html">Customer classes</A><BR><BR>!. + 'Customer categories define groups of customer classes.<BR><BR>'. + qq!<A HREF="${p}edit/cust_category.html"><I>Add a customer category</I></A><BR><BR>!; + +my $count_query = 'SELECT COUNT(*) FROM cust_category'; + +my $link = [ $p.'edit/cust_category.html?', 'categorynum' ]; + +</%init> diff --git a/httemplate/browse/cust_class.html b/httemplate/browse/cust_class.html new file mode 100644 index 000000000..da303cf72 --- /dev/null +++ b/httemplate/browse/cust_class.html @@ -0,0 +1,45 @@ +<% include( 'elements/browse.html', + 'title' => 'Customer classes', + 'html_init' => $html_init, + 'name' => 'customer classes', + 'disableable' => 1, + 'disabled_statuspos' => 2, + 'query' => { 'table' => 'cust_class', + 'hashref' => {}, + 'extra_sql' => 'ORDER BY classnum', + }, + 'count_query' => $count_query, + 'header' => $header, + 'fields' => $fields, + 'links' => $links, + ) +%> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $html_init = + 'Customer classes define groups of customer for reporting.<BR><BR>'. + qq!<A HREF="${p}edit/cust_class.html"><I>Add a customer class</I></A><BR><BR>!; + +my $count_query = 'SELECT COUNT(*) FROM cust_class'; + +my $link = [ $p.'edit/cust_class.html?', 'classnum' ]; + +my $header = [ '#', 'Class' ]; +my $fields = [ 'classnum', 'classname' ]; +my $links = [ $link, $link ]; + +my $cat_query = 'SELECT COUNT(*) FROM cust_class where categorynum IS NOT NULL'; +my $sth = dbh->prepare($cat_query) + or die "Error preparing $cat_query: ". dbh->errstr; +$sth->execute + or die "Error executing $cat_query: ". $sth->errstr; +if ($sth->fetchrow_arrayref->[0]) { + push @$header, 'Category'; + push @$fields, 'categoryname'; + push @$links, $link; +} + +</%init> diff --git a/httemplate/browse/part_pkg_report_option.html b/httemplate/browse/part_pkg_report_option.html index 90540bca2..9745b13d2 100644 --- a/httemplate/browse/part_pkg_report_option.html +++ b/httemplate/browse/part_pkg_report_option.html @@ -20,7 +20,7 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $html_init = - 'Package optional report classes define groups of packages, for reporting purposes.'. + 'Package optional report classes define optional groups of packages for reporting only.'. qq!<BR><BR><A HREF="${p}edit/part_pkg_report_option.html"><I>Add a class</I></A><BR><BR>!; my $link = [ $p.'edit/part_pkg_report_option.html?', 'num' ]; diff --git a/httemplate/browse/pkg_category.html b/httemplate/browse/pkg_category.html index e85c0dd9c..2223445e1 100644 --- a/httemplate/browse/pkg_category.html +++ b/httemplate/browse/pkg_category.html @@ -22,8 +22,7 @@ die "access denied" my $html_init = qq!<A HREF="${p}browse/pkg_class.html">Package classes</A><BR><BR>!. - 'Package categories define groups of package classes, for reporting and '. - 'convenience purposes.<BR><BR>'. + 'Package categories define groups of package classes.<BR><BR>'. qq!<A HREF="${p}edit/pkg_category.html"><I>Add a package category</I></A><BR><BR>!; my $count_query = 'SELECT COUNT(*) FROM pkg_category'; diff --git a/httemplate/browse/pkg_class.html b/httemplate/browse/pkg_class.html index 75969dbe8..7097c8617 100644 --- a/httemplate/browse/pkg_class.html +++ b/httemplate/browse/pkg_class.html @@ -20,8 +20,8 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $html_init = - 'Package classes define groups of packages, for reporting and '. - 'convenience purposes.<BR><BR>'. + 'Package classes define groups of packages, for taxation, ordering '. + 'convenience and reporting.<BR><BR>'. qq!<A HREF="${p}edit/pkg_class.html"><I>Add a package class</I></A><BR><BR>!; my $count_query = 'SELECT COUNT(*) FROM pkg_class'; |