X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=8745cac8740905c263bf4abb02330103d4c0bd15;hb=1df8ca6e580bffa11c412b8ae59cd98028ed6470;hp=c7a7c802447bc6083558fa9df684d41032f17c7b;hpb=3ccf7174fccb0b576a8c34838b3db4a429635483;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index c7a7c8024..8745cac87 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -34,7 +34,7 @@ <% mt('Enter Western Union payment') |h %> % } -
+<% $s ? '
' : '' %> % $s=0; % if ( ( $payby{'CARD'} || $payby{'DCRD'} ) @@ -58,11 +58,13 @@ <% mt('Post manual (offline/POS) credit card payment') |h %> % } -
+<% $s ? '
' : '' %> -%# credit link +%# credit links +% $s=0; % if ( $curuser->access_right('Post credit') ) { + <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, 'label' => emt('Enter credit'), 'action' => "${p}edit/cust_credit.cgi", @@ -70,8 +72,20 @@ 'actionlabel' => emt('Enter credit'), 'width' => 616, #make room for reasons #540 default &> -
+% } +% if ( $curuser->access_right('Credit line items') ) { + <% $s++ ? ' | ' : '' %> + <& /elements/popup_link-cust_main.html, + 'label' => emt('Credit line items'), + #'action' => "${p}search/cust_bill_pkg.cgi?nottax=1;type=select", + 'action' => "${p}edit/credit-cust_bill_pkg.html", + 'cust_main' => $cust_main, + 'actionlabel' => emt('Credit line items'), + 'width' => 968, #763, + 'height' => 575, + &> % } +<% $s ? '
' : '' %> %# refund links @@ -277,7 +291,9 @@ % ? sprintf("$money_char\%.2f", $item->{'charge'}) % : exists($item->{'charge_nobal'}) % ? sprintf("$money_char\%.2f", $item->{'charge_nobal'}) -% : ''; +% : exists($item->{'void_charge'}) +% ? sprintf("$money_char\%.2f", $item->{'void_charge'}) +% : ''; % % my $payment = exists($item->{'payment'}) % ? sprintf("- $money_char\%.2f", $item->{'payment'}) @@ -428,6 +444,15 @@ foreach my $cust_bill ($cust_main->cust_bill) { $num_cust_bill++; } +#voided invoices +foreach my $cust_bill_void ($cust_main->cust_bill_void) { + push @history, { + 'date' => $cust_bill_void->_date, + 'desc' => include('payment_history/voided_invoice.html', $cust_bill_void, %opt ), + 'void_charge' => $cust_bill_void->charged, + }; +} + #statements foreach my $cust_statement ($cust_main->cust_statement) { push @history, { @@ -491,7 +516,7 @@ foreach my $cust_credit ($cust_main->cust_credit) { foreach my $cust_refund ($cust_main->cust_refund) { push @history, { 'date' => $cust_refund->_date, - 'desc' => include('payment_history/refund.html', $cust_refund), + 'desc' => include('payment_history/refund.html', $cust_refund, %opt), 'refund' => $cust_refund->refund, };