X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=f29ae164b9397ec158adfa29494048fd2bb0e11d;hb=08f4f553676033549452dae97b2e35b236bbcb14;hp=49d6ff4cd1c9d8b64ac04bf124707ffd98ed7399;hpb=d21d7864c1f1bc4fed05a01c0b037628a4ca5b99;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 49d6ff4cd..f29ae164b 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -4,10 +4,10 @@ % if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter check payment'), + 'label' => emt('Enter check payment'), 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=BILL", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter check payment'), + 'actionlabel' => emt('Enter check payment'), 'width' => 392, &> % } @@ -15,10 +15,10 @@ % if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter cash payment'), + 'label' => emt('Enter cash payment'), 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=CASH", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter cash payment'), + 'actionlabel' => emt('Enter cash payment'), 'width' => 392, &> % } @@ -55,10 +55,10 @@ % if ( $curuser->access_right('Post credit') ) { <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter credit'), + 'label' => emt('Enter credit'), 'action' => "${p}edit/cust_credit.cgi", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter credit'), + 'actionlabel' => emt('Enter credit'), 'width' => 616, #make room for reasons #540 default &>
@@ -70,10 +70,10 @@ % if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter check refund'), + 'label' => emt('Enter check refund'), 'action' => "${p}edit/cust_refund.cgi?popup=1;payby=BILL", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter check refund'), + 'actionlabel' => emt('Enter check refund'), 'width' => 392, &> % } @@ -81,10 +81,10 @@ % if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter cash refund'), + 'label' => emt('Enter cash refund'), 'action' => "${p}edit/cust_refund.cgi?popup=1;payby=CASH", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter cash refund'), + 'actionlabel' => emt('Enter cash refund'), 'width' => 392, &> % } @@ -131,8 +131,8 @@ % if ( $add_adjustment ) { <& /elements/popup_link.html, { 'action' => $p.'edit/cust_tax_adjustment.html?custnum='. $cust_main->custnum, - 'label' => mt('Add tax adjustment'), - 'actionlabel' => mt('Add tax adjustment'), + 'label' => emt('Add tax adjustment'), + 'actionlabel' => emt('Add tax adjustment'), 'height' => 200, } &> @@ -178,7 +178,7 @@ <% mt('Description') |h %> <% mt('Invoice') |h %> <% mt('Payment') |h %> - In-house Credit + <% mt('In-house Credit') |h %> <% mt('Refund') |h %> <% mt('Balance') |h %> @@ -453,14 +453,14 @@ foreach my $cust_refund ($cust_main->cust_refund) { sub translate_payby { my ($payby,$payinfo) = (shift,shift); my %payby = ( - BILL => $payinfo ? mt('Check #') : '', - CHEK => mt('Electronic check '), - PREP => mt('Prepaid card '), - CARD => mt('Credit card #'), - COMP => mt('Complimentary by '), - CASH => mt('Cash'), - WEST => mt('Western Union'), - MCRD => mt('Manual credit card'), + 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'), ); $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; $payby; @@ -469,15 +469,30 @@ sub translate_payby { sub translate_payby_refund { my ($payby,$payinfo) = (shift,shift); my %payby = ( - BILL => $payinfo ? mt('Check #') : mt('Check'), - CHEK => mt('Electronic check '), - CARD => 'CARD ', - COMP => 'COMP ', + BILL => $payinfo ? emt('Check #') : emt('Check'), + CHEK => emt('Electronic check '), + CARD => emt('Credit card #'), + COMP => emt('Complimentary by '), ); $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; $payby; }; +sub translate_payinfo { + my $object = shift; + my $payby = $object->payby; + my $payinfo = $object->payinfo; + + if ( $payby eq 'CARD' ) { + $payinfo = $object->paymask; + } elsif ( $payby eq 'CHEK' ) { + my( $account, $aba ) = split('@', $object->paymask ); + $payinfo = emt("ABA [_1], Acct #[_2]",$aba,$account); + } + + ($payby,$payinfo); +} + sub areyousure_link { my ($url,$msg,$title,$label) = (shift,shift,shift,shift); ' ('.$label.')';