X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_pay.html;h=ba4cfdafc2f18a10e9a33d1ea2854935191c19fd;hp=0fb514aa3658f673300c223a1db4cac7301b24bb;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hpb=2238711675eefa60cd2feb47c8d3e43d3e6f1860 diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html index 0fb514aa3..ba4cfdafc 100644 --- a/httemplate/view/cust_pay.html +++ b/httemplate/view/cust_pay.html @@ -3,8 +3,10 @@ <& /elements/header-popup.html, mt("$thing Receipt") &>
- <% mt('Print') |h %> | - <% mt('Re-email') |h %> + <% mt('Print') |h %> +% if ( $cust_main->invoicing_list_emailonly ) { + | <% mt('Re-email') |h %> +% }

% } elsif ( $link eq 'print' ) { @@ -14,22 +16,21 @@ % #it would be nice if the menubar could be hidden for print, but better to % # have it available than not, otherwise the user winds up at a dead end <% menubar( - mt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum", + emt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum", ) %>

% } elsif ( $link eq 'email' ) { % if ( $email_error ) { - <& /elements/header-popup.html, mt("Error re-emailing receipt") &> -% warn "Error re-emailing receipt: $email_error"; + <& /elements/header-popup.html, mt("Error re-emailing receipt: [_1]", $email_error) &> % } else { <& /elements/header-popup.html, mt("Re-emailed receipt") &> % } % } else { <& /elements/header.html, mt("$thing Receipt"), menubar( - mt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum", - mt('Print receipt') => $pr_link, + emt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum", + emt('Print receipt') => $pr_link, ) &> @@ -78,7 +79,7 @@ <% $cust_pay->payby_name %> #<% $cust_pay->paymask %> -% if ( $cust_pay->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_pay->paybatch ) { +% if ( $cust_pay->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_pay->processor ) { <% mt('Processor') |h %> @@ -87,16 +88,39 @@ <% mt('Authorization #') |h %> - <% $cust_pay->authorization %> + <% $cust_pay->auth %> -% if ( $cust_pay->order_number ) { - - <% mt('Order #') |h %> - <% $cust_pay->order_number %> - -% } +% } +% # API allows setting this for any payby +% if ( $cust_pay->order_number ) { + + <% mt('Order #') |h %> + <% $cust_pay->order_number %> + +% } + +% if ( $cust_pay->payby eq 'CASH' && $cust_pay->payinfo ) { + + <% mt('Bank') |h %> + <% $cust_pay->bank %> + + + + <% mt('Teller #') |h %> + <% $cust_pay->teller %> + + + + <% mt('Depositor') |h %> + <% $cust_pay->depositor %> + + + + <% mt('Account #') |h %> + <% $cust_pay->account %> + % } % if ( $conf->exists('pkg-balances') && $cust_pay->pkgnum ) { @@ -135,8 +159,8 @@ my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" - unless $curuser->access_right('View invoices') #remove this in 1.9 EVENTUALLY - || $curuser->access_right('View customer payments'); + unless $curuser->access_right('View invoices') #remove this in 2.5 (2.7?) + || $curuser->access_right('View payments'); $cgi->param('paynum') =~ /^(\d+)$/ or die "no paynum"; my $paynum = $1; @@ -159,11 +183,13 @@ my $cust_pay = qsearchs({ }); die "$thing #$paynum not found!" unless $cust_pay; +my $cust_main = $cust_pay->cust_main; + my $pr_link = "${p}view/cust_pay.html?link=print;paynum=$paynum;void=$void"; my $email_link = "${p}view/cust_pay.html?link=email;paynum=$paynum;void=$void"; my $custnum = $cust_pay->custnum; -my $display_custnum = $cust_pay->cust_main->display_custnum; +my $display_custnum = $cust_main->display_custnum; my $conf = new FS::Conf; @@ -174,8 +200,9 @@ tie my %payby, 'Tie::IxHash', FS::payby->payby2longname; my $email_error; if ( $link eq 'email' ) { - my $email_error = $cust_pay->send_receipt( - 'manual' => 1, + $email_error = $cust_pay->send_receipt( + 'manual' => 1, + 'cust_main' => $cust_main, ); warn "can't send payment receipt/statement: $email_error" if $email_error;