% }
% if ( $cust_bill->owed > 0
-% && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD MCHK) )
% && $curuser->access_right(['Post payment', 'Post check payment', 'Post cash payment'])
% && ! $conf->exists('pkg-balances')
% )
<% mt('Post') |h %>
-% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) {
+% if ( $curuser->access_right(['Post payment', 'Post check payment']) ) {
<% $s++ ? ' | ' : '' %>
<A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>"><% mt('check') |h %></A>
% }
-% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) {
+% if ( $curuser->access_right(['Post payment', 'Post cash payment']) ) {
<% $s++ ? ' | ' : '' %>
<A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>"><% mt('cash') |h %></A>
% }
-% if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) {
- <% $s++ ? ' | ' : '' %>
- <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>"><% mt('Western Union') |h %></A>
-% }
-
-% if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) {
- <% $s++ ? ' | ' : '' %>
- <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>"><% mt('manual credit card') |h %></A>
-% }
-
-% if ( $payby{'MCHK'} && $curuser->access_right(['Post payment']) ) {
- <% $s++ ? ' | ' : '' %>
- <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCHK;invnum=<% $invnum %>"><% mt('manual electronic check') |h %></A>
-% }
+%# % if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) {
+%# <% $s++ ? ' | ' : '' %>
+%# <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>"><% mt('Western Union') |h %></A>
+%# % }
+%#
+%# % if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) {
+%# <% $s++ ? ' | ' : '' %>
+%# <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>"><% mt('manual credit card') |h %></A>
+%# % }
+%#
+%# % if ( $payby{'MCHK'} && $curuser->access_right(['Post payment']) ) {
+%# <% $s++ ? ' | ' : '' %>
+%# <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCHK;invnum=<% $invnum %>"><% mt('manual electronic check') |h %></A>
+%# % }
<% mt('payment against this invoice') |h %><BR><BR>
$opt{'barcode_img'} = 1 if $conf->exists('invoice-barcode');
-my @payby = grep /\w/, $conf->config('payby');
-@payby = (qw( CARD DCRD CHEK DCHK BILL CASH ))
- unless @payby;
-my %payby = map { $_=>1 } @payby;
-
my $cust_bill = qsearchs({
'select' => 'cust_bill.*',
'table' => 'cust_bill',
width => 763,
height => 392,
acl => [ 'Post payment', 'Post check payment' ],
- condition => sub { $payby{BILL} },
},
{
label => 'Enter cash payment',
width => 763,
height => 392,
acl => [ 'Post payment', 'Post cash payment' ],
- condition => sub { $payby{CASH} },
- },
- {
- label => 'Enter Western Union payment',
- popup => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
- actionlabel => 'Enter Western Union payment',
- width => 763,
- height => 392,
- acl => [ 'Post payment', ],
- condition => sub { $payby{WEST} },
- },
- {
- label => 'Record manual (offline/POS) credit card payment',
- popup => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
- actionlabel => 'Enter credit card payment',
- width => 763,
- height => 392,
- acl => [ 'Post payment', ],
- condition => sub { $payby{MCRD} },
- },
- {
- label => 'Record manual (offline/POS) electronic check',
- popup => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
- actionlabel => 'Enter credit card payment',
- width => 763,
- height => 392,
- acl => [ 'Post payment', ],
- condition => sub { $payby{MCHK} },
},
+ #{
+ # label => 'Enter Western Union payment',
+ # popup => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
+ # actionlabel => 'Enter Western Union payment',
+ # width => 763,
+ # height => 392,
+ # acl => [ 'Post payment', ],
+ ## condition => sub { $payby{WEST} },
+ #},
+ #{
+ # label => 'Record manual (offline/POS) credit card payment',
+ # popup => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
+ # actionlabel => 'Enter credit card payment',
+ # width => 763,
+ # height => 392,
+ # acl => [ 'Post payment', ],
+ ## condition => sub { $payby{MCRD} },
+ #},
+ #{
+ # label => 'Record manual (offline/POS) electronic check',
+ # popup => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
+ # actionlabel => 'Enter credit card payment',
+ # width => 763,
+ # height => 392,
+ # acl => [ 'Post payment', ],
+ ## condition => sub { $payby{MCHK} },
+ #},
],
},
actionlabel => 'Enter check refund',
width => 440,
acl => ['Post refund', 'Post check refund'],
- condition => sub { $payby{BILL} },
},
{
label => 'Enter cash refund',
actionlabel => 'Enter cash refund',
width => 392,
acl => ['Post refund', 'Post cash refund'],
- condition => sub { $payby{CASH} },
- },
- {
- label => 'Record manual (offline/POS) credit card refund',
- popup => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
- actionlabel => 'Enter credit card refund',
- width => 440,
- acl => ['Post refund' ],
- condition => sub { $payby{MCRD} },
- },
- {
- label => 'Record manual (offline/POS) electronic check refund',
- popup => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
- actionlabel => 'Enter electronic check refund',
- width => 440,
- acl => ['Post refund' ],
- condition => sub { $payby{MCHK} },
},
+ #{
+ # label => 'Record manual (offline/POS) credit card refund',
+ # popup => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
+ # actionlabel => 'Enter credit card refund',
+ # width => 440,
+ # acl => ['Post refund' ],
+ ## condition => sub { $payby{MCRD} },
+ #},
+ #{
+ # label => 'Record manual (offline/POS) electronic check refund',
+ # popup => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
+ # actionlabel => 'Enter electronic check refund',
+ # width => 440,
+ # acl => ['Post refund' ],
+ ## condition => sub { $payby{MCHK} },
+ #},
],