X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=c7a7c802447bc6083558fa9df684d41032f17c7b;hb=5214a5560240667a3a914c45df046b420926a5ec;hp=752f5656282a328654b2f73524c217c90c69b16f;hpb=75769d888d9c306d5d5ccde3260c0267268cf4ed;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 752f56562..c7a7c8024 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -13,6 +13,7 @@ 'cust_main' => $cust_main, 'actionlabel' => emt('Enter check payment'), 'width' => 392, + 'height' => 392, &> % } @@ -24,6 +25,7 @@ 'cust_main' => $cust_main, 'actionlabel' => emt('Enter cash payment'), 'width' => 392, + 'height' => 392, &> % } @@ -123,8 +125,14 @@ -%# invoice reports +%# invoice reports, combined statement % if ( $curuser->access_right('List invoices') ) { +% if ( $conf->exists('cust_main-print_statement_link') +% and $num_cust_bill > 0 ) { + <% + mt('Print a current statement') |h %> +
+% } <% mt('Invoice reports') |h %> % }
@@ -267,7 +275,9 @@ % % my $charge = exists($item->{'charge'}) % ? sprintf("$money_char\%.2f", $item->{'charge'}) -% : ''; +% : exists($item->{'charge_nobal'}) +% ? sprintf("$money_char\%.2f", $item->{'charge_nobal'}) +% : ''; % % my $payment = exists($item->{'payment'}) % ? sprintf("- $money_char\%.2f", $item->{'payment'}) @@ -396,22 +406,26 @@ my %opt = ( ) ); +$opt{'date_format'} ||= '%m/%d/%Y'; + #legacy invoices foreach my $legacy_cust_bill ($cust_main->legacy_cust_bill) { push @history, { 'date' => $legacy_cust_bill->_date, 'desc' => include('payment_history/legacy_invoice.html', $legacy_cust_bill, %opt ), - 'charge' => $legacy_cust_bill->charged, + 'charge_nobal' => $legacy_cust_bill->charged, }; } #invoices +my $num_cust_bill = 0; foreach my $cust_bill ($cust_main->cust_bill) { push @history, { 'date' => $cust_bill->_date, 'desc' => include('payment_history/invoice.html', $cust_bill, %opt ), 'charge' => $cust_bill->charged, }; + $num_cust_bill++; } #statements @@ -486,14 +500,15 @@ foreach my $cust_refund ($cust_main->cust_refund) { sub translate_payby { my ($payby,$payinfo) = (shift,shift); my %payby = ( + FS::payby->payby2shortname, BILL => $payinfo ? emt('Check #') : '', CHEK => emt('Electronic check '), PREP => emt('Prepaid card '), CARD => emt('Credit card #'), COMP => emt('Complimentary by '), - CASH => emt('Cash'), - WEST => emt('Western Union'), - MCRD => emt('Manual credit card'), + #CASH => emt('Cash'), + #WEST => emt('Western Union'), + #MCRD => emt('Manual credit card'), ); $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; $payby; @@ -502,6 +517,7 @@ sub translate_payby { sub translate_payby_refund { my ($payby,$payinfo) = (shift,shift); my %payby = ( + FS::payby->payby2shortname, BILL => $payinfo ? emt('Check #') : emt('Check'), CHEK => emt('Electronic check '), CARD => emt('Credit card #'),