X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=582fc8d7eb68ad668a0ae4f0b5cea382b7dd3d5a;hb=103527d74c16f4427b57ce88fc9b8eeb9a79cbda;hp=44a8885336125d72368797550290b21335ad5afe;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 44a888533..582fc8d7e 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -3,12 +3,28 @@ % my $s = 0; % if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) { <% $s++ ? ' | ' : '' %> - Enter check payment + <% include('/elements/popup_link-cust_main.html', + 'label' => 'Enter check payment', + 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=BILL", + 'cust_main' => $cust_main, + 'actionlabel' => 'Enter check payment', + 'width' => 392, + #default# 'height' => 336, + ) + %> % } % if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) { <% $s++ ? ' | ' : '' %> - Enter cash payment + <% include('/elements/popup_link-cust_main.html', + 'label' => 'Enter cash payment', + 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=CASH", + 'cust_main' => $cust_main, + 'actionlabel' => 'Enter cash payment', + 'width' => 392, + #default# 'height' => 336, + ) + %> % } % if ( $payby{'WEST'} && $curuser->access_right('Post payment') ) { @@ -40,7 +56,15 @@
% if ( $curuser->access_right('Post credit') ) { - Enter credit + <% include('/elements/popup_link-cust_main.html', + 'label' => 'Enter credit', + 'action' => "${p}edit/cust_credit.cgi", + 'cust_main' => $cust_main, + 'actionlabel' => 'Enter credit', + 'width' => 392, + #default# 'height' => 336, + ) + %>
% } @@ -100,8 +124,9 @@ % my $payinfo; % if ( $payby eq 'CARD' ) { % $payinfo = $cust_pay->paymask; -% } elsif ( $payby eq 'CHEK' && $cust_pay->payinfo =~ /^(\d+)\@(\d+)$/ ) { -% $payinfo = "ABA $2, Acct# $1"; +% } elsif ( $payby eq 'CHEK' ) { +% my( $account, $aba ) = split('@', $cust_pay->paymask ); +% $payinfo = "ABA $aba, Acct #$account"; % } else { % $payinfo = $cust_pay->payinfo; % } @@ -127,15 +152,21 @@ % $pre = 'Unapplied '; % $post = ''; % if ( $curuser->access_right('Apply payment') ) { -% $apply = qq! (apply)!; +% $apply = ' ('. include( '/elements/popup_link.html', +% 'label' => 'apply', +% 'action' => "${p}edit/cust_bill_pay.cgi?". +% $cust_pay->paynum, +% 'actionlabel' => 'Apply payment', +% 'width' => 392, +% #default# 'height' => 336, +% ). +% ')'; % } % } elsif ( scalar(@cust_bill_pay) == 1 % && scalar(@cust_pay_refund) == 0 % && $cust_pay->unapplied == 0 ) { % #applied to one invoice, the usual situation -% $desc = ' applied to Invoice #'. $cust_bill_pay[0]->invnum; +% $desc = ' '. $cust_bill_pay[0]->applied_to_invoice; % } elsif ( scalar(@cust_bill_pay) == 0 % && scalar(@cust_pay_refund) == 1 % && $cust_pay->unapplied == 0 ) { @@ -149,7 +180,7 @@ % if ( $app->isa('FS::cust_bill_pay') ) { % $desc .= '  '. % '$'. $app->amount. -% ' applied to Invoice #'. $app->invnum. +% ' '. $app->applied_to_invoice. % '
'; % #' on '. time2str("%D", $cust_bill_pay->_date). % } elsif ( $app->isa('FS::cust_pay_refund') ) { @@ -166,17 +197,28 @@ % '$'. % $cust_pay->unapplied. ' unapplied'; % if ( $curuser->access_right('Apply payment') ) { -% $desc .= qq! (apply)!; +% $desc = ' ('. include( '/elements/popup_link.html', +% 'label' => 'apply', +% 'action' => "${p}edit/cust_bill_pay.cgi?". +% $cust_pay->paynum, +% 'actionlabel' => 'Apply payment', +% 'width' => 392, +% #default# 'height' => 336, +% ). +% ')'; % } % $desc .= '
'; % } % } % -% my $view = qq! (view receipt)!; +% my $view = +% ' ('. include('/elements/popup_link.html', +% 'label' => 'view receipt', +% 'action' => "${p}view/cust_pay.html?link=popup;paynum=". +% $cust_pay->paynum, +% 'actionlabel' => 'Payment Receipt', +% ). +% ')'; % % my $refund = ''; % my $refund_days = $conf->config('card_refund-days') || 120; @@ -309,15 +351,21 @@ % $pre = 'Unapplied '; % $post = ''; % if ( $curuser->access_right('Apply credit') ) { -% $apply = qq! (apply)!; +% $apply = ' ('. include( '/elements/popup_link.html', +% 'label' => 'apply', +% 'action' => "${p}edit/cust_credit_bill.cgi?". +% $cust_credit->crednum, +% 'actionlabel' => 'Apply credit', +% 'width' => 392, +% #default# 'height' => 336, +% ). +% ')'; % } % } elsif ( scalar(@cust_credit_bill) == 1 % && scalar(@cust_credit_refund) == 0 % && $cust_credit->credited == 0 ) { % #applied to one invoice, the usual situation -% $desc = ' applied to Invoice #'. $cust_credit_bill[0]->invnum; +% $desc = ' '. $cust_credit_bill[0]->applied_to_invoice; % } elsif ( scalar(@cust_credit_bill) == 0 % && scalar(@cust_credit_refund) == 1 % && $cust_credit->credited == 0 ) { @@ -331,7 +379,7 @@ % if ( $app->isa('FS::cust_credit_bill') ) { % $desc .= '  '. % '$'. $app->amount. -% ' applied to Invoice #'. $app->invnum. +% ' '. $app->applied_to_invoice. % '
'; % #' on '. time2str("%D", $app->_date). % } elsif ( $app->isa('FS::cust_credit_refund') ) { @@ -347,9 +395,15 @@ % $desc .= '  $'. % $cust_credit->credited. ' unapplied'; % if ( $curuser->access_right('Apply credit') ) { -% $desc .= qq! (apply)!; +% $desc = ' ('. include( '/elements/popup_link.html', +% 'label' => 'apply', +% 'action' => "${p}edit/cust_credit_bill.cgi?". +% $cust_credit->crednum, +% 'actionlabel' => 'Apply credit', +% 'width' => 392, +% #default# 'height' => 336, +% ). +% ')'; % } % $desc .= '
'; % }