summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/cust_pay_or_refund.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-01-29 16:28:26 -0800
committerMark Wells <mark@freeside.biz>2013-01-30 12:09:29 -0800
commit61097b876e692dbf5571a17b9aa415949607085f (patch)
treeaead5bab2124ce0aaca391a15de3deeaa383f867 /httemplate/search/elements/cust_pay_or_refund.html
parent6bd91fa5feb41ea3294bdaee5fe1c1134f19c330 (diff)
record and show batch payment status info, #21117
Diffstat (limited to 'httemplate/search/elements/cust_pay_or_refund.html')
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html21
1 files changed, 17 insertions, 4 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index eeef0c0e1..b9da7ef06 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -51,6 +51,7 @@ Examples:
'sort_fields' => \@sort_fields,
'align' => $align,
'links' => \@links,
+ 'link_onclicks' => \@link_onclicks,
'color' => \@color,
'style' => \@style,
&>
@@ -134,11 +135,12 @@ if ( $cgi->param('tax_names') ) {
}
}
-my @header = ();
-my @fields = ();
-my @sort_fields = ();
+my @header;
+my @fields;
+my @sort_fields;
my $align = '';
-my @links = ();
+my @links;
+my @link_onclicks;
if ( $opt{'pre_header'} ) {
push @header, @{ $opt{'pre_header'} };
$align .= 'c' x scalar(@{ $opt{'pre_header'} });
@@ -147,6 +149,16 @@ if ( $opt{'pre_header'} ) {
push @sort_fields, @{ $opt{'pre_fields'} };
}
+my $sub_receipt = sub {
+ my $obj = shift;
+ my $objnum = $obj->primary_key . '=' . $obj->get($obj->primary_key);
+
+ include('/elements/popup_link_onclick.html',
+ 'action' => $p.'view/cust_pay.html?link=popup;'.$objnum,
+ 'actionlabel' => emt('Payment Receipt'),
+ );
+};
+
push @header, "\u$name_singular",
'Amount',
;
@@ -155,6 +167,7 @@ push @links, '', '';
push @fields, 'payby_payinfo_pretty',
sub { sprintf('$%.2f', shift->$amount_field() ) },
;
+push @link_onclicks, $sub_receipt, '',
push @sort_fields, '', $amount_field;
if ( $unapplied ) {