{
'key' => 'deletepayments',
- 'section' => 'UI',
- 'description' => 'Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
+ 'section' => 'billing',
+ 'description' => 'Enable deletion of unclosed payments. Really, with voids this is pretty much not recommended in any situation anymore. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
'type' => [qw( checkbox text )],
},
{
'key' => 'deletecredits',
- 'section' => 'UI',
- 'description' => 'Enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.',
'type' => [qw( checkbox text )],
},
{
'key' => 'unapplypayments',
- 'section' => 'UI',
- 'description' => 'Enable "unapplication" of unclosed payments.',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable "unapplication" of unclosed payments.',
'type' => 'checkbox',
},
{
'key' => 'unapplycredits',
- 'section' => 'UI',
- 'description' => 'Enable "unapplication" of unclosed credits.',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to nable "unapplication" of unclosed credits.',
'type' => 'checkbox',
},
{
'key' => 'echeck-void',
- 'section' => 'billing',
- 'description' => 'Enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
'type' => 'checkbox',
},
{
'key' => 'cc-void',
- 'section' => 'billing',
- 'description' => 'Enable local-only voiding of credit card payments in addition to refunds against the payment gateway',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable local-only voiding of credit card payments in addition to refunds against the payment gateway',
'type' => 'checkbox',
},
{
'key' => 'unvoid',
- 'section' => 'billing',
- 'description' => 'Enable unvoiding of voided payments',
+ 'section' => 'deprecated',
+ 'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable unvoiding of voided payments',
'type' => 'checkbox',
},
$post = '</FONT></B>';
$apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
$cust_pay->paynum.
- qq!', 392, 336, 'cust_credit_popup' ), CAPTION, 'Post credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+ qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
} elsif ( scalar(@cust_bill_pay) == 1
&& scalar(@cust_pay_refund) == 0
} elsif ( $app->isa('FS::cust_pay_refund') ) {
$desc .= ' '.
'$'. $app->amount.
- ' refunded on'. time2str("%D", $app->_date).
+ ' refunded on '. time2str("%D", $app->_date).
'<BR>';
} else {
die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund";
$cust_pay->unapplied. ' unapplied</FONT></B>'.
qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
$cust_pay->paynum.
- qq!', 392, 336, 'cust_credit_popup' ), CAPTION, 'Post credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
+ qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
'<BR>';
}
}
my $void = '';
if ( $cust_pay->closed !~ /^Y/i
&& ( ( $cust_pay->payby eq 'CARD'
- && $conf->exists('cc-void')
- && $curuser->acccess_right('Credit card void')
+ && $curuser->access_right('Credit card void')
)
|| ( $cust_pay->payby eq 'CHEK'
- && $conf->exists('echeck-void')
- && $curuser->acccess_right('Echeck void')
- )
+ && $curuser->access_right('Echeck void')
+ )
+ || ( $cust_pay->payby !~ /^(CARD|CHEK)$/
+ && $curuser->access_right('Regular void')
+ )
)
)
{
my $unapply = '';
if ( $cust_pay->closed !~ /^Y/i
- && $conf->exists('unapplypayments')
&& scalar(@cust_bill_pay)
&& $curuser->access_right('Unapply payment')
)
my $unvoid = '';
if ( $cust_pay_void->closed !~ /^Y/i
- && $conf->exists('unvoid')
&& $curuser->access_right('Unvoid')
)
{
$post = '</FONT></B>';
$apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
$cust_credit->crednum.
- qq!', 392, 336, 'cust_credit_popup' ), CAPTION, 'Post credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+ qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
} elsif ( scalar(@cust_credit_bill) == 1
&& scalar(@cust_credit_refund) == 0
&& $cust_credit->credited == 0 ) {
} elsif ( $app->isa('FS::cust_credit_refund') ) {
$desc .= ' '.
'$'. $app->amount.
- ' refunded on'. time2str("%D", $app->_date).
+ ' refunded on '. time2str("%D", $app->_date).
'<BR>';
} else {
die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";
$cust_credit->credited. ' unapplied</FONT></B>'.
qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
$cust_credit->crednum.
- qq!', 392, 336, 'cust_credit_popup' ), CAPTION, 'Post credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
+ qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
'<BR>';
}
}
#
my $delete = '';
if ( $cust_credit->closed !~ /^Y/i
- && $conf->exists('deletecredits')
+
+ #s'pose deleting a credit isn't bad like deleting a payment
+ # and this needs to be generally available until we have credit voiding..
+ #&& $conf->exists('deletecredits')
+
&& $curuser->access_right('Delete credit')
)
{
my $unapply = '';
if ( $cust_credit->closed !~ /^Y/i
- && $conf->exists('unapplycredits')
&& scalar(@cust_credit_bill)
&& $curuser->access_right('Unapply credit')
)
%>
-<%= include("/elements/table.html") %>
+<%= include("/elements/table-grid.html") %>
+
+<% my $bgcolor1 = '#eeeeee';
+ my $bgcolor2 = '#ffffff';
+ my $bgcolor = '';
+%>
+
<TR>
- <TH>Date</TH>
- <TH>Description</TH>
- <TH><FONT SIZE=-1>Charge</FONT></TH>
- <TH><FONT SIZE=-1>Payment</FONT></TH>
- <TH><FONT SIZE=-1>In-house<BR>Credit</FONT></TH>
- <TH><FONT SIZE=-1>Refund</FONT></TH>
- <TH><FONT SIZE=-1>Balance</FONT></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Date</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Description</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Charge</FONT></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment</FONT></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>In-house<BR>Credit</FONT></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Refund</FONT></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Balance</FONT></TH>
</TR>
<%
my $balance = 0;
foreach my $item ( sort { $a->{'date'} <=> $b->{'date'} } @history ) {
+ if ( $bgcolor eq $bgcolor1 ) {
+ $bgcolor = $bgcolor2;
+ } else {
+ $bgcolor = $bgcolor1;
+ }
+
my $charge = exists($item->{'charge'})
? sprintf('$%.2f', $item->{'charge'})
: '';
%>
<TR>
- <TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>">
<% unless ( !$target || $target{$target}++ ) { %>
<A NAME="<%= $target %>">
<% } %>
<% } %>
</FONT>
</TD>
- <TD><%= $item->{'desc'} %></TD>
- <TD ALIGN="right"><%= $charge %></TD>
- <TD ALIGN="right"><%= $payment %></TD>
- <TD ALIGN="right"><%= $credit %></TD>
- <TD ALIGN="right"><%= $refund %></TD>
- <TD ALIGN="right"><%= $showbalance %></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $item->{'desc'} %>
+ </TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $charge %>
+ </TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $payment %>
+ </TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $credit %>
+ </TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $refund %>
+ </TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <%= $showbalance %>
+ </TD>
</TR>
<% } %>