summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history/legacy_invoice.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main/payment_history/legacy_invoice.html')
-rw-r--r--httemplate/view/cust_main/payment_history/legacy_invoice.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/payment_history/legacy_invoice.html b/httemplate/view/cust_main/payment_history/legacy_invoice.html
new file mode 100644
index 000000000..e999a251e
--- /dev/null
+++ b/httemplate/view/cust_main/payment_history/legacy_invoice.html
@@ -0,0 +1,23 @@
+<% $link %><% $invoice %><% $link ? '</A>' : '' %>
+<%init>
+
+my( $legacy_cust_bill ) = @_; #, %opt )
+
+my $invoice;
+if ( length($legacy_cust_bill->legacyid) ) {
+ $invoice = emt('Legacy Invoice #[_1]', $legacy_cust_bill->legacyid);
+} else {
+ $invoice = emt('Legacy Invoice');
+}
+
+my $legacyinvnum = $legacy_cust_bill->legacyinvnum;
+
+my $link = '';
+if ( $FS::CurrentUser::CurrentUser->access_right('View invoices') ) {
+ $link = length($legacy_cust_bill->content_html)
+ ? qq!<A HREF="${p}view/legacy_cust_bill.html?$legacyinvnum">!
+ : length($legacy_cust_bill->content_pdf)
+ ? qq!<A HREF="${p}view/legacy_cust_bill-pdf.cgi?$legacyinvnum">!
+ : '';
+
+</%init>