X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_pay.html;h=ba4cfdafc2f18a10e9a33d1ea2854935191c19fd;hb=ada2ac371279555b1009db1f995861eee2fa4bf2;hp=76a24884af7bf11b68d517aa9f01848c7f28a709;hpb=7a618d4493ab7a87f6eabfd1ce3630a6b3436c2f;p=freeside.git
diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html
index 76a24884a..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") &>
% } elsif ( $link eq 'print' ) {
@@ -89,13 +91,14 @@
<% $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 ) {
@@ -180,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;
@@ -195,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;