X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_credit_bill_pkg.html;h=0f78344468b3d861e404d069c4a1c5c2100e1c8e;hb=b1d445f94514a29e5d4753839798b0291d89aee3;hp=a1d4561237ed2938ec1b2f0aac115d55391b1781;hpb=a5c4a4352ed1ed761f9e040d72e3ad9ea7d8f1ac;p=freeside.git diff --git a/httemplate/search/cust_credit_bill_pkg.html b/httemplate/search/cust_credit_bill_pkg.html index a1d456123..0f7834446 100644 --- a/httemplate/search/cust_credit_bill_pkg.html +++ b/httemplate/search/cust_credit_bill_pkg.html @@ -8,41 +8,32 @@ #'#', 'Amount', - # credit date, By, Reason, - # line item, invoice + #credit + 'Date', + 'By', + 'Reason', + + # line item 'Description', - 'Setup charge', - ( $use_usage eq 'usage' - ? 'Usage charge' - : 'Recurring charge' - ), + + #invoice 'Invoice', 'Date', FS::UI::Web::cust_header(), ], 'fields' => [ #'creditbillpkgnum', - 'amount', + sub { sprintf($money_char.'%.2f', shift->amount ) }, + + sub { time2str('%b %d %Y', shift->get('cust_credit_date') ) }, + 'otaker', + sub { shift->cust_credit_bill->cust_credit->reason }, sub { $_[0]->pkgnum > 0 ? $_[0]->get('pkg') # possibly use override.pkg : $_[0]->get('itemdesc') # but i think this correct }, - #strikethrough or "N/A ($amount)" or something these when - # they're not applicable to pkg_tax search - sub { sprintf($money_char.'%.2f', shift->setup ) }, - sub { my $row = shift; - my $value = 0; - if ( $use_usage eq 'recurring' ) { - $value = $row->recur - $row->usage; - } elsif ( $use_usage eq 'usage' ) { - $value = $row->usage; - } else { - $value = $row->recur; - } - sprintf($money_char.'%.2f', $value ); - }, 'invnum', sub { time2str('%b %d %Y', shift->_date ) }, \&FS::UI::Web::cust_fields, @@ -52,13 +43,14 @@ '', '', '', + '', $ilink, $ilink, ( map { $_ ne 'Cust. Status' ? $clink : '' } FS::UI::Web::cust_header() ), ], - 'align' => 'rlrrrc'.FS::UI::Web::cust_aligns(), + 'align' => 'rrlllrr'.FS::UI::Web::cust_aligns(), 'color' => [ '', '', @@ -66,6 +58,7 @@ '', '', '', + '', FS::UI::Web::cust_colors(), ], 'style' => [ @@ -75,6 +68,7 @@ '', '', '', + '', FS::UI::Web::cust_styles(), ], ) @@ -98,9 +92,6 @@ my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi); push @where, "cust_bill._date >= $beginning", "cust_bill._date <= $ending"; -push @where , " payby != 'COMP' " - unless $cgi->param('include_comp_cust'); - if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { push @where, "cust_main.agentnum = $1"; } @@ -495,8 +486,10 @@ my $join_credit = ' LEFT JOIN cust_credit_bill USING ( creditbillnum ) $where"; #} -my @select = ( 'cust_credit_bill_pkg.amount', +my @select = ( 'cust_credit_bill_pkg.*', 'cust_bill_pkg.*', + 'cust_credit.otaker', + 'cust_credit._date AS cust_credit_date', 'cust_bill._date', ); push @select, 'part_pkg.pkg' unless $cgi->param('istax');