%# payment links
% my $s = 0;
-% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) {
+% if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) {
<% $s++ ? ' | ' : '' %>
<% include('/elements/popup_link-cust_main.html',
'label' => 'Enter check payment',
%>
% }
-% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) {
+% if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) {
<% $s++ ? ' | ' : '' %>
<% include('/elements/popup_link-cust_main.html',
'label' => 'Enter cash payment',
% }
% if ( ( $payby{'CARD'} || $payby{'DCRD'} )
-% && $curuser->access_right(['Process payment', 'Process credit card payment'])
+% && $curuser->access_right('Process payment')
% && ! $cust_main->is_encrypted($cust_main->payinfo)
% ) {
<% $s++ ? ' | ' : '' %>
% }
% if ( ( $payby{'CHEK'} || $payby{'DCHK'} )
-% && $curuser->access_right(['Process payment', 'Process Echeck payment'])
+% && $curuser->access_right('Process payment')
% && ! $cust_main->is_encrypted($cust_main->payinfo)
% ) {
<% $s++ ? ' | ' : '' %>
%# refund links
% $s = 0;
-% if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) {
+% if ( $payby{'BILL'} && $curuser->access_right('Post refund') ) {
<% $s++ ? ' | ' : '' %>
<% include('/elements/popup_link-cust_main.html',
'label' => 'Enter check refund',
%>
% }
-% if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) {
+% if ( $payby{'CASH'} && $curuser->access_right('Post refund') ) {
<% $s++ ? ' | ' : '' %>
<% include('/elements/popup_link-cust_main.html',
'label' => 'Enter cash refund',
};
}
+#pending payments
+foreach my $cust_pay_pending ($cust_main->cust_pay_pending) {
+ push @history, {
+ 'date' => $cust_pay_pending->_date,
+ 'desc' => include('payment_history/pending_payment.html', $cust_pay_pending, %opt ),
+ 'void_payment' => $cust_pay_pending->paid,
+ };
+}
+
+
#voided payments
foreach my $cust_pay_void ($cust_main->cust_pay_void) {
push @history, {