diff options
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 60 | ||||
-rwxr-xr-x | httemplate/browse/part_svc.cgi | 4 | ||||
-rw-r--r-- | httemplate/docs/install.html | 11 | ||||
-rw-r--r-- | httemplate/docs/upgrade10.html | 109 | ||||
-rw-r--r-- | httemplate/docs/upgrade9.html | 3 | ||||
-rw-r--r-- | httemplate/edit/part_export.cgi | 6 | ||||
-rwxr-xr-x | httemplate/edit/svc_domain.cgi | 2 | ||||
-rw-r--r-- | httemplate/index.html | 9 | ||||
-rwxr-xr-x | httemplate/misc/bill.cgi | 3 | ||||
-rw-r--r-- | httemplate/search/cust_bill_event.cgi | 2 | ||||
-rwxr-xr-x | httemplate/search/cust_pay.cgi | 72 | ||||
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 18 | ||||
-rw-r--r-- | httemplate/search/report_cust_pay.html | 24 | ||||
-rwxr-xr-x | httemplate/view/cust_main.cgi | 13 |
14 files changed, 291 insertions, 45 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 58422c67d..7b9436cee 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -11,15 +11,35 @@ if ( $cgi->param('showdisabled') ) { my @part_pkg = qsearch('part_pkg', \%search ); my $total = scalar(@part_pkg); +my $sortby; +my %num_active_cust_pkg; +if ( $cgi->param('active') ) { + my $active_sth = dbh->prepare( + 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. + ' AND ( cancel IS NULL OR cancel = 0 )'. + ' AND ( susp IS NULL OR susp = 0 )' + ) or die dbh->errstr; + foreach my $part_pkg ( @part_pkg ) { + $active_sth->execute($part_pkg->pkgpart) or die $active_sth->errstr; + $num_active_cust_pkg{$part_pkg->pkgpart} = + $active_sth->fetchrow_arrayref->[0]; + } + $sortby = \*active_cust_pkg_sort; +} else { + $sortby = \*pkgpart_sort; +} + %> <%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> -One or more services are grouped together into a package and given pricing -information. Customers purchase packages rather than purchase services -directly.<BR><BR> -<A HREF="<%= $p %>edit/part_pkg.cgi"><I>Add a new package definition</I></A> -<BR><BR> +<% unless ( $cgi->param('active') ) { %> + One or more service definitions are grouped together into a package + definition and given pricing information. Customers purchase packages + rather than purchase services directly.<BR><BR> + <A HREF="<%= $p %>edit/part_pkg.cgi"><I>Add a new package definition</I></A> + <BR><BR> +<% } %> -<%= $total %> packages +<%= $total %> package definitions <% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); @@ -34,6 +54,10 @@ print &table(), <<END; <TR> <TH COLSPAN=$colspan>Package</TH> <TH>Comment</TH> +END +print ' <TH><FONT SIZE=-1>Customer<BR>packages</FONT></TH>' + if $cgi->param('active'); +print <<END; <TH><FONT SIZE=-1>Freq.</FONT></TH> <TH><FONT SIZE=-1>Plan</FONT></TH> <TH><FONT SIZE=-1>Data</FONT></TH> @@ -42,9 +66,7 @@ print &table(), <<END; </TR> END -foreach my $part_pkg ( sort { - $a->getfield('pkgpart') <=> $b->getfield('pkgpart') -} @part_pkg ) { +foreach my $part_pkg ( sort $sortby @part_pkg ) { my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); @@ -73,6 +95,16 @@ END print <<END; <TD ROWSPAN=$rowspan><A HREF="${p}edit/part_pkg.cgi?$hashref->{pkgpart}">$hashref->{pkg}</A></TD> <TD ROWSPAN=$rowspan>$hashref->{comment}</TD> +END + if ( $cgi->param('active') ) { + print " <TD ROWSPAN=$rowspan>"; + print '<FONT COLOR="#00CC00"><B>'. + $num_active_cust_pkg{$hashref->{'pkgpart'}}. + qq!</B></FONT> <A HREF="${p}search/cust_pkg.cgi?magic=active;pkgpart=$hashref->{pkgpart}">active</A>!; + # suspended/cancelled + print '</TD>'; + } + print <<END; <TD ROWSPAN=$rowspan>$hashref->{freq}</TD> <TD ROWSPAN=$rowspan>$hashref->{plan}</TD> <TD ROWSPAN=$rowspan>$plandata</TD> @@ -99,4 +131,14 @@ print <<END; </BODY> </HTML> END + + +sub pkgpart_sort { + $a->pkgpart <=> $b->pkgpart; +} + +sub active_cust_pkg_sort { + $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; +} + %> diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index ee7a2622a..7c83924a2 100755 --- a/httemplate/browse/part_svc.cgi +++ b/httemplate/browse/part_svc.cgi @@ -23,7 +23,7 @@ function part_export_areyousure(href) { } </SCRIPT> - Services are items you offer to your customers.<BR><BR> + Service definitions are the templates for items you offer to your customers.<BR><BR> <FORM METHOD="POST" ACTION="<%= $p %>edit/part_svc.cgi"> <A HREF="<%= $p %>edit/part_svc.cgi"><I>Add a new service definition</I></A><% if ( @part_svc ) { %> or <SELECT NAME="clone"><OPTION></OPTION> @@ -34,7 +34,7 @@ function part_export_areyousure(href) { <% } %> </FORM><BR> -<%= $total %> services +<%= $total %> service definitions <%= $cgi->param('showdisabled') ? do { $cgi->param('showdisabled', 0); '( <a href="'. $cgi->self_url. '">hide disabled services</a> )'; } diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 533decb7b..54614ccb3 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -144,9 +144,14 @@ PerlSetVar Debug 2 </ul></td> <td><ul> <li>Run <tt>make masondocs</tt> - <li>Copy <tt>masondocs/</tt> to your web server's document space. - <li>Copy <tt>htetc/handler.pl</tt> to an appropriate directory (use htetc/handler.pl-1.0x for Mason versions before 1.10). - <li>Edit <tt>handler.pl</tt> and set an appropriate <tt>data_dir</tt>, such as <tt>/usr/local/etc/freeside/masondata</tt> + <li>Copy <tt>masondocs/</tt> to your web server's document space. (For example: <tt>/usr/local/apache/htdocs/freeside-mason</tt>) + <li>Copy <tt>htetc/handler.pl</tt> to <tt>/usr/local/etc/freeside</tt> (use htetc/handler.pl-1.0x for Mason versions before 1.10). + <li>Edit <tt>handler.pl</tt> and: + <ul> + <li> set an appropriate <tt>comp_root</tt>, such as <tt>/usr/local/apache/htdocs/freeside-mason</tt> + <li> set an appropriate <tt>data_dir</tt>, such as <tt>/usr/local/etc/freeside/masondata</tt> + </ul> + <li>Configure Apache to use the <tt>handler.pl</tt> file and to execute .cgi files using HTML::Mason. For example: <font size="-1"><pre> PerlModule HTML::Mason diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 6c4fe0c37..1035510db 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -1,7 +1,9 @@ <pre> -this is very incomplete +this is incomplete -install NetAddr::IP and Chart +install DBIx::DBSchema 0.21 + +install NetAddr::IP and Chart::Base CREATE TABLE cust_bill_pkg_detail ( detailnum serial, @@ -12,6 +14,107 @@ CREATE TABLE cust_bill_pkg_detail ( ); CREATE INDEX cust_bill_pkg_detail1 ON cust_bill_pkg_detail ( pkgnum, invnum ); -create all of the new broadband tables +CREATE TABLE router ( + routernum serial, + routername varchar(80), + svcnum int, + PRIMARY KEY (routernum) +); + +CREATE TABLE part_svc_router ( + svcpart int NOT NULL, + routernum int NOT NULL +); + +CREATE TABLE part_router_field ( + routerfieldpart serial, + name varchar(80), + length int NOT NULL, + check_block text, + list_source text, + PRIMARY KEY (routerfieldpart) +); + +CREATE TABLE router_field ( + routerfieldpart int NOT NULL, + routernum int NOT NULL, + value varchar(128) +); +CREATE UNIQUE INDEX router_field1 ON router_field ( routerfieldpart, routernum ); + +CREATE TABLE addr_block ( + blocknum serial, + routernum int NOT NULL, + ip_gateway varchar(15) NOT NULL, + ip_netmask int NOT NULL, + PRIMARY KEY (blocknum) +); +CREATE UNIQUE INDEX addr_block1 ON addr_block ( blocknum, routernum ); + +CREATE TABLE part_sb_field ( + sbfieldpart serial, + svcpart int NOT NULL, + name varchar(80) NOT NULL, + length int NOT NULL, + check_block text NULL, + list_source text NULL, + PRIMARY key (sbfieldpart) +); +CREATE UNIQUE INDEX part_sb_field1 ON part_sb_field ( sbfieldpart, svcpart ); + +CREATE TABLE sb_field ( + sbfieldpart int NOT NULL, + svcnum int NOT NULL, + value varchar(128) +); +CREATE UNIQUE INDEX sb_field1 ON sb_field ( sbfieldpart, svcnum ); + +CREATE TABLE svc_broadband ( + svcnum int NOT NULL, + blocknum int NOT NULL, + speed_up int NOT NULL, + speed_down int NOT NULL, + ip_addr varchar(15), + PRIMARY KEY (svcnum) +); + +DELETE INDEX cust_bill_pkg1; + +ALTER TABLE cust_bill_pkg ADD itemdesc varchar(80) NULL; +ALTER TABLE h_cust_bill_pkg ADD itemdesc varchar(80) NULL; +ALTER TABLE cust_main_county ADD taxname varchar(80) NULL; +ALTER TABLE h_cust_main_county ADD taxname varchar(80) NULL; +ALTER TABLE cust_pkg ADD last_bill int NULL; +ALTER TABLE h_cust_pkg ADD last_bill int NULL; + +dump database, edit: +- cust_main: increase otaker from 8 to 32 +- cust_main: change ss from char(11) to varchar(11) +- cust_credit: increase otaker from 8 to 32 +- cust_pkg: increase otaker from 8 to 32 +- cust_refund: increase otaker from 8 to 32 +- domain_record: increase reczone from 80 to 255 +- domain_record: change rectype from char to varchar +- domain_record: increase recdata from 80 to 255 +then reload + +optionally: + + CREATE INDEX cust_main6 ON cust_main ( daytime ); + CREATE INDEX cust_main7 ON cust_main ( night ); + CREATE INDEX cust_main8 ON cust_main ( fax ); + CREATE INDEX cust_main9 ON cust_main ( ship_daytime ); + CREATE INDEX cust_main10 ON cust_main ( ship_night ); + CREATE INDEX cust_main11 ON cust_main ( ship_fax ); + + serial columns + +mandatory again: + +dbdef-create username +create-history-tables username cust_bill_pkg_detail router part_svc_router part_router_field router_field addr_block part_sb_field sb_field svc_broadband +dbdef-create username + + </pre> diff --git a/httemplate/docs/upgrade9.html b/httemplate/docs/upgrade9.html index c6afe2b0f..24d1cce42 100644 --- a/httemplate/docs/upgrade9.html +++ b/httemplate/docs/upgrade9.html @@ -15,10 +15,11 @@ INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 18, 'daytime', 'en_US', 'Day Phone' ); INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 19, 'night', 'en_US', 'Night Phone' ); </pre> - <li>Optionally, apply the following changes to your database (performance improvement for large numbers of services or packages): + <li>Optionally, apply the following changes to your database (performance improvements): <pre> CREATE INDEX part_pkg1 ON part_pkg ( disabled ); CREATE INDEX part_svc1 ON part_svc ( disabled ); +CREATE INDEX cust_bill2 ON cust_bill ( _date ); </pre> <li>If you want to use ACH (electronic checks), you will need to make changes to your database. The easiest way to make these changes is to dump your database (with pg_dump), change the payinfo field in the cust_pay, cust_refund, h_cust_pay and h_cust_refund tables from varchar(16) to varchar(80), reload the database from the dump, and run dbdef-create <li>Restart Apache and freeside-queued. diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 4defbc86f..cc60f1aeb 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -67,12 +67,14 @@ my $widget = new HTML::Widgets::SelectLayers( } $html .= '</SELECT>'; } elsif ( $type eq 'textarea' ) { - $html .= qq!<TEXTAREA NAME="$option" COLS=80 WRAP="virtual">!. + $html .= qq!<TEXTAREA NAME="$option" COLS=80 ROWS=8 WRAP="virtual">!. qq!$value</TEXTAREA>!; } elsif ( $type eq 'text' ) { $html .= qq!<INPUT TYPE="text" NAME="$option" VALUE="$value" SIZE=64>!; } elsif ( $type eq 'checkbox' ) { - $html .= qq!<INPUT TYPE="checkbox" NAME="$option" VALUE="1">!; + $html .= qq!<INPUT TYPE="checkbox" NAME="$option" VALUE="1"!; + $html .= ' CHECKED' if $value; + $html .= '>'; } else { $html .= "unknown type $type"; } diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index d20e1f336..ca0e3398f 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -87,7 +87,7 @@ print ' CHECKED' if $kludge_action eq 'M'; print qq!>Transfer!; print <<END; -<P>Domain <INPUT TYPE="text" NAME="domain" VALUE="$domain" SIZE=28 MAXLENGTH=26> +<P>Domain <INPUT TYPE="text" NAME="domain" VALUE="$domain" SIZE=28 MAXLENGTH=63> <BR>Purpose/Description: <INPUT TYPE="text" NAME="purpose" VALUE="$purpose" SIZE=64> <P><INPUT TYPE="submit" VALUE="Submit"> </FORM> diff --git a/httemplate/index.html b/httemplate/index.html index e5bd11806..017ffcd88 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -67,7 +67,8 @@ <LI>120 day open invoices (<A HREF="search/cust_bill.cgi?OPEN120_invnum">by invoice number</A>) (<A HREF="search/cust_bill.cgi?OPEN120_date">by date</A>) (<A HREF="search/cust_bill.cgi?OPEN120_custnum">by customer number</A>) <LI>all invoices (<A HREF="search/cust_bill.cgi?invnum">by invoice number</A>) (<A HREF="search/cust_bill.cgi?date">by date</A>) (<A HREF="search/cust_bill.cgi?custnum">by customer number</A>) </UL> - Financial reports + <A HREF="search/report_cust_pay.html">Payment report (by type and/or date range)</A> + <BR><BR>Financial reports <UL> <LI> <A HREF="search/report_receivables.cgi">current receivables</A> <LI> <A HREF="search/report_tax.html">tax reports</A> @@ -124,7 +125,8 @@ <LI><A HREF="search/cust_pkg.cgi?APKG_pkgnum">packages with unconfigured services (by package number)</A> <LI><A HREF="search/cust_pkg.html">packages (by next bill date range)</A> </UL> - Invoices + <A HREF="browse/part_pkg.cgi?active=1">Package definitions (by number of active packages)</A> + <BR><BR>Invoices <UL> <LI><a href="search/cust_bill_event.html">Invoice event errors (failed credit cards)</a> <LI>open invoices (<A HREF="search/cust_bill.cgi?OPEN_invnum">by invoice number</A>) (<A HREF="search/cust_bill.cgi?OPEN_date">by date</A>) (<A HREF="search/cust_bill.cgi?OPEN_custnum">by customer number</A>) @@ -134,7 +136,8 @@ <LI>120 day open invoices (<A HREF="search/cust_bill.cgi?OPEN120_invnum">by invoice number</A>) (<A HREF="search/cust_bill.cgi?OPEN120_date">by date</A>) (<A HREF="search/cust_bill.cgi?OPEN120_custnum">by customer number</A>) <LI>all invoices (<A HREF="search/cust_bill.cgi?invnum">by invoice number</A>) (<A HREF="search/cust_bill.cgi?date">by date</A>) (<A HREF="search/cust_bill.cgi?custnum">by customer number</A>) </UL> - Financial reports + <A HREF="search/report_cust_pay.html">Payment Report (by type and/or date range)</A> + <BR><BR>Financial reports <UL> <LI> <A HREF="search/report_receivables.cgi">current receivables</A> <LI> <A HREF="search/report_tax.html">tax reports</A> diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index f048e5559..44d85b880 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -21,7 +21,8 @@ unless ( $error ) { #'batch_card'=> 'yes', #'batch_card'=> 'no', #'report_badcard'=> 'yes', - 'retry_card' => 'yes', + #'retry_card' => 'yes', + 'retry' => 'yes', ); } #&eidiot($error) if $error; diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi index 9cb36d28e..b76f66b76 100644 --- a/httemplate/search/cust_bill_event.cgi +++ b/httemplate/search/cust_bill_event.cgi @@ -4,7 +4,7 @@ #false laziness with view/cust_bill.cgi $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; -my $beginning = str2time($1); +my $beginning = str2time($1) || 0; $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; my $ending = str2time($1) + 86400; diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi index b5bdf8296..7a983703f 100755 --- a/httemplate/search/cust_pay.cgi +++ b/httemplate/search/cust_pay.cgi @@ -1,12 +1,47 @@ <% -$cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo"; -my $payinfo = $1; -$cgi->param('payby') =~ /^(\w+)$/ or die "illegal payby"; -my $payby = $1; -my @cust_pay = qsearch('cust_pay', { 'payinfo' => $payinfo, +my $sortby; +my @cust_pay; +if ( $cgi->param('magic') && $cgi->param('magic') eq '_date' ) { + + my %search; + if ( $cgi->param('payby') ) { + $cgi->param('payby') =~ /^(CARD|CHEK|BILL)$/ + or die "illegal payby ". $cgi->param('payby'); + $search{'payby'} = $1; + } + + #false laziness with cust_pkg.cgi + my $range = ''; + if ( $cgi->param('beginning') + && $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) { + my $beginning = str2time($1); + $range = " WHERE _date >= $beginning "; + } + if ( $cgi->param('ending') + && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) { + my $ending = str2time($1) + 86400; + $range .= ( $range ? ' AND ' : ' WHERE ' ). " _date <= $ending "; + } + $range =~ s/^\s*WHERE/ AND/ if scalar(keys %search) ; + + @cust_pay = qsearch('cust_pay', \%search, '', $range ); + + $sortby = \*date_sort; + +} else { + + $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo"; + my $payinfo = $1; + + $cgi->param('payby') =~ /^(\w+)$/ or die "illegal payby"; + my $payby = $1; + + @cust_pay = qsearch('cust_pay', { 'payinfo' => $payinfo, 'payby' => $payby } ); -my $sortby = \*date_sort; + $sortby = \*date_sort; + +} if (0) { #if ( scalar(@cust_pay) == 1 ) { @@ -16,7 +51,7 @@ if (0) { %> <!-- mason kludge --> <% - idiot("Check # not found."); + idiot("Payment not found."); #exit; } else { my $total = scalar(@cust_pay); @@ -24,9 +59,9 @@ if (0) { %> <!-- mason kludge --> <% - print header("Check # Search Results", menubar( + print header("Payment Search Results", menubar( 'Main Menu', popurl(2) - )), "$total matching check$s found<BR>", &table(), <<END; + )), "$total matching payment$s found<BR>", &table(), <<END; <TR> <TH></TH> <TH>Amount</TH> @@ -40,23 +75,36 @@ END foreach my $cust_pay ( sort $sortby grep(!$saw{$_->paynum}++, @cust_pay) ) { - my($paynum, $custnum, $payinfo, $amount, $date ) = ( + my($paynum, $custnum, $payby, $payinfo, $amount, $date ) = ( $cust_pay->paynum, $cust_pay->custnum, + $cust_pay->payby, $cust_pay->payinfo, sprintf("%.2f", $cust_pay->paid), $cust_pay->_date, ); - my $pdate = time2str("%b %d %Y", $date); + my $pdate = time2str("%b %d %Y", $date); my $rowspan = 1; my $view = popurl(2). "view/cust_main.cgi?". $custnum. "#". $payby. $payinfo; + my $payment_info; + if ( $payby eq 'CARD' ) { + $payment_info = 'Card #'. 'x'x(length($payinfo)-4). + substr($payinfo,(length($payinfo)-4)); + } elsif ( $payby eq 'CHEK' ) { + $payment_info = "E-check acct#$payinfo"; + } elsif ( $payby eq 'BILL' ) { + $payment_info = "Check #$payinfo"; + } else { + $payment_info = "$payby $payinfo"; + } + print <<END; <TR> - <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$payinfo</FONT></A></TD> + <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$payment_info</FONT></A></TD> <TD ROWSPAN=$rowspan ALIGN="right"><A HREF="$view"><FONT SIZE=-1>\$$amount</FONT></A></TD> <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$pdate</FONT></A></TD> END diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 538edf3f1..8b2fd0ca0 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -19,6 +19,8 @@ my @cust_pkg; if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { $sortby=\*bill_sort; + + #false laziness with cust_pay.cgi my $range = ''; if ( $cgi->param('beginning') && $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) { @@ -44,7 +46,19 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { } else { my $qual = ''; - if ( $query eq 'pkgnum' ) { + if ( $cgi->param('magic') && $cgi->param('magic') eq 'active' ) { + + $qual = 'WHERE ( susp IS NULL OR susp = 0 )'. + ' AND ( cancel IS NULL OR cancel = 0)'; + + $sortby = \*pkgnum_sort; + + if ( $cgi->param('pkgpart') =~ /^(\d+)$/ ) { + $qual .= " AND pkgpart = $1"; + } + + } elsif ( $query eq 'pkgnum' ) { + $sortby=\*pkgnum_sort; } elsif ( $query eq 'SUSP_pkgnum' ) { @@ -196,7 +210,7 @@ if ( scalar(@cust_pkg) == 1 ) { <TH><FONT SIZE=-1>Setup</FONT></TH> END - print '<TH><FONT SIZE=-1>Next<BR>bill</FONT></TH>' + print '<TH><FONT SIZE=-1>Last<BR>bill</FONT></TH>' if defined dbdef->table('cust_pkg')->column('last_bill'); print <<END; diff --git a/httemplate/search/report_cust_pay.html b/httemplate/search/report_cust_pay.html new file mode 100644 index 000000000..93053e1ee --- /dev/null +++ b/httemplate/search/report_cust_pay.html @@ -0,0 +1,24 @@ +<HTML> + <HEAD> + <TITLE>Payment report criteria</TITLE> + </HEAD> + <BODY> + <CENTER> + <H1>Payment report criteria</H1> + </CENTER> + <HR> + <FORM ACTION="cust_pay.cgi" METHOD="post"> + <INPUT TYPE="hidden" NAME="magic" VALUE="_date"> + Return <SELECT NAME="payby"> + <OPTION VALUE="">all</OPTION> + <OPTION VALUE="CARD">credit card</OPTION> + <OPTION VALUE="CHEK">electronic check (ACH)</OPTION> + <OPTION VALUE="BILL">check/cash</OPTION> + </SELECT> payments for period<BR> + from <INPUT TYPE="text" NAME="beginning"> <i>m/d/y</i> + to <INPUT TYPE="text" NAME="ending"> <i>m/d/y</i> + <P><INPUT TYPE="submit" VALUE="Get Report"> + </FORM> + <HR> + </BODY> +</HTML> diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 3934a3dcb..c36c9e265 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -20,7 +20,7 @@ print <<END; .package TH { font-size: medium } .package TR { font-size: smaller } .package .pkgnum { font-size: medium } -.package .provision { font-size: larger; font-weight: bold } +.package .provision { font-weight: bold } </STYLE> END @@ -290,7 +290,7 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { print '</TD></TR></TABLE>'; if ( defined $cust_main->dbdef_table->column('comments') - && $cust_main->comments ) + && $cust_main->comments =~ /[^\s\n\r]/ ) { print "<BR>Comments". &ntable("#cccccc"). "<TR><TD>". &ntable("#cccccc",2). @@ -430,7 +430,7 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { if ( $pkg->{cancel} ) { #status: cancelled - print '<TR><TD><FONT COLOR="#ff0000"><B>Cancelled</B> </FONT></TD>'. + print '<TR><TD><FONT COLOR="#ff0000"><B>Cancelled </B></FONT></TD>'. '<TD>'. pkg_datestr($pkg,'cancel'). '</TD></TR>'; unless ( $pkg->{setup} ) { print '<TR><TD COLSPAN=2>Never billed</TD></TR>'; @@ -848,9 +848,12 @@ sub svc_label_link { sub svc_provision_link { my ($pkg, $svcpart) = (shift,shift) or return ''; - return qq!<A CLASS="provision" HREF="${p1}/edit/$svcpart->{svcdb}.cgi?! . + ( my $svc_nbsp = $svcpart->{svc} ) =~ s/\s+/ /g; + return qq!<A CLASS="provision" HREF="${p}edit/$svcpart->{svcdb}.cgi?! . qq!pkgnum$pkg->{pkgnum}-svcpart$svcpart->{svcpart}">! . - qq!Provision $svcpart->{svc} (! . ($svcpart->{quantity} - $svcpart->{count}) . qq!)</A>!; + "Provision $svc_nbsp (". + ($svcpart->{quantity} - $svcpart->{count}). + ')</A>'; } sub svc_unprovision_link { |