Add access right to view attachments
[freeside.git] / httemplate / view / cust_main / payment_history.html
index 8adc954..2ac3f26 100644 (file)
@@ -379,12 +379,10 @@ my %opt = (
         qw( card_refund-days )
   ),
   ( map { $_ => $conf->exists($_) } 
-        qw( deletepayments deleterefunds pkg-balances )
+        qw( deleteinvoices deletepayments deleterefunds pkg-balances )
   )
 );
 
-warn Dumper(\%opt);
-
 #invoices
 foreach my $cust_bill ($cust_main->cust_bill) {
   push @history, {
@@ -394,6 +392,15 @@ foreach my $cust_bill ($cust_main->cust_bill) {
   };
 }
 
+#statements
+foreach my $cust_statement ($cust_main->cust_statement) {
+  push @history, {
+    'date'   => $cust_statement->_date,
+    'desc'   => include('payment_history/statement.html', $cust_statement, %opt ),
+    #'charge' => $cust_bill->charged,
+  };
+}
+
 #payments (some false laziness w/credits)
 foreach my $cust_pay ($cust_main->cust_pay) {
   push @history, {