#payment
'Date',
- 'Order Number',
+ @on_header,
'By',
#application
? cardtype($cust_pay->paymask) : '';
},
sub { time2str('%b %d %Y', shift->get('cust_pay_date') ) },
- sub { shift->cust_bill_pay->cust_pay->order_number },
+ @on_field,
sub { shift->cust_bill_pay->cust_pay->otaker },
sub { sprintf($money_char.'%.2f', shift->amount ) },
'', #payinfo/paymask
'', #cardtype
'cust_pay_date',
- '', #order_number
+ @on_null, #order_number
'', #'otaker',
'', #amount
'', #line item description
'',
'',
'',
- '',
+ @on_null,
'',
'',
'',
FS::UI::Web::cust_header()
),
],
- 'align' => 'rcrlrrlrlll',
-#original value before cardtype & package were added
-#why are there 13 cols?
-#'rcrrlrlllrrcl'.
+ 'align' => 'rcrlr'.
+ $on_align.
+ 'lrlll'.
$post_desc_align.
'rr'.
FS::UI::Web::cust_aligns(),
'',
'',
'',
- '',
+ @on_null,
'',
'',
'',
'',
'',
'',
- '',
+ @on_null,
'',
'',
'',
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+my @on_header = ();
+my @on_field = ();
+my @on_null = ();
+my $on_align = '';
+if ($cgi->param('show_order_number')) {
+ @on_header = ('Order Number');
+ @on_field = (sub { shift->cust_bill_pay->cust_pay->order_number });
+ @on_null = ('');
+ $on_align = 'r';
+}
+
my $conf = new FS::Conf;
my %payby = FS::payby->payby2shortname;
push @fields, sub { time2str('%b %d %Y', shift->_date ) };
push @sort_fields, '_date';
-if ($opt{'show_order_number'}) {
+if ($cgi->param('show_order_number')) {
push @header, emt('Order Number');
$align .= 'r';
push @links, '';
field => 'paid',
&>
+ <& /elements/tr-checkbox.html,
+ 'label' => emt('Display order number'),
+ 'field' => 'show_order_number',
+ 'value' => 1,
+ 'cell_style' => 'font-weight: normal', #for consistency
+ &>
+
<!--
<TR>
<TD ALIGN="right"><INPUT TYPE="checkbox" NAME="nottax" VALUE="Y" onClick="nottax_changed(this)" onChange="nottax_change(thid)"></TD>