X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_pay.html;h=b34a908185e3b91c94d5b4c3e701487268073d44;hb=2c112f32561f23f9c538ace00db46659ce16da32;hp=b1e33e66ced300c18950e4b477a6988579dced0a;hpb=dbeee87d487220a1eea4a8f65534293bb6f82df6;p=freeside.git
diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html
index b1e33e66c..b34a90818 100644
--- a/httemplate/view/cust_pay.html
+++ b/httemplate/view/cust_pay.html
@@ -3,8 +3,10 @@
<& /elements/header-popup.html, mt("$thing Receipt") &>
% } elsif ( $link eq 'print' ) {
@@ -14,21 +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')." (#$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: $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')." (#$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,
)
&>
@@ -46,7 +48,7 @@
<% ntable("#cccccc", 2) %>
- <% mt('Payment') |h %># |
+ <% mt('Payment #') |h %> |
<% $cust_pay->paynum %> |
@@ -77,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 %> |
@@ -85,19 +87,41 @@
- <% mt('Authorization') |h %># |
- <% $cust_pay->authorization %> |
+ <% mt('Authorization #') |h %> |
+ <% $cust_pay->auth %> |
% if ( $cust_pay->order_number ) {
- <% mt('Order') |h %># |
+ <% 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 ) {
% my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay->pkgnum } );
@@ -134,8 +158,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;
@@ -158,11 +182,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;
@@ -173,8 +199,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;