[freeside-commits] freeside/FS/FS cust_bill_ApplicationCommon.pm, 1.7.2.1, 1.7.2.2 cust_bill.pm, 1.163.2.25, 1.163.2.26

Ivan,,, ivan at wavetail.420.am
Sun Jun 1 13:14:01 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv32057

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_bill_ApplicationCommon.pm cust_bill.pm 
Log Message:
backport cust_bill_ApplicationCommon::applied_to_invoice and cust_bill::invnum_date_pretty to 1.7

Index: cust_bill_ApplicationCommon.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_ApplicationCommon.pm,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -d -r1.7.2.1 -r1.7.2.2
--- cust_bill_ApplicationCommon.pm	1 Mar 2007 16:36:09 -0000	1.7.2.1
+++ cust_bill_ApplicationCommon.pm	1 Jun 2008 20:13:56 -0000	1.7.2.2
@@ -359,6 +359,18 @@
   qsearchs( 'cust_bill', { 'invnum' => $self->invnum } );
 }
 
+=item applied_to_invoice
+
+Returns a string representing the invoice (see L<FS::cust_bill), for example:
+"applied to Invoice #54 (3/20/2008)"
+
+=cut
+
+sub applied_to_invoice {
+  my $self = shift;
+  'applied to '. $self->cust_bill->invnum_date_pretty;
+}
+
 =item lineitem_breakdown_table 
 
 =cut

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163.2.25
retrieving revision 1.163.2.26
diff -u -d -r1.163.2.25 -r1.163.2.26
--- cust_bill.pm	1 Jun 2008 00:12:19 -0000	1.163.2.25
+++ cust_bill.pm	1 Jun 2008 20:13:57 -0000	1.163.2.26
@@ -2386,6 +2386,18 @@
   $msg;
 }
 
+=item invnum_date_pretty
+
+Returns a string with the invoice number and date, for example:
+"Invoice #54 (3/20/2008)"
+
+=cut
+
+sub invnum_date_pretty {
+  my $self = shift;
+  'Invoice #'. $self->invnum. ' ('. time2str('%x', $self->_date). ')';
+}
+
 sub _items {
   my $self = shift;
 



More information about the freeside-commits mailing list