[freeside-commits] freeside/FS/FS payinfo_Mixin.pm, 1.9, 1.10 cust_bill_pay.pm, 1.18, 1.19 cust_credit_refund.pm, 1.13, 1.14 cust_refund.pm, 1.31, 1.32 payby.pm, 1.12, 1.13

Ivan,,, ivan at wavetail.420.am
Sun May 18 21:07:04 PDT 2008


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

Modified Files:
	payinfo_Mixin.pm cust_bill_pay.pm cust_credit_refund.pm 
	cust_refund.pm payby.pm 
Log Message:
make net receipts clickable... and netreceipts != cashflow, really, so separate those concepts, and cashflow gets gross & net variants.  also add gross/net refunds.  #3012

Index: cust_refund.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_refund.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- cust_refund.pm	4 Mar 2008 21:07:14 -0000	1.31
+++ cust_refund.pm	19 May 2008 04:07:02 -0000	1.32
@@ -11,7 +11,7 @@
 use FS::cust_main;
 use FS::payinfo_Mixin;
 
- at ISA = qw( FS::Record FS::payinfo_Mixin );
+ at ISA = qw( FS::payinfo_Mixin FS::cust_main_Mixin FS::Record );
 
 @encrypted_fields = ('payinfo');
 
@@ -216,7 +216,7 @@
 
 =item replace OLD_RECORD
 
-Currently unimplemented (accounting reasons).
+Modifying a refund?  Well, don't say I didn't warn you.
 
 =cut
 

Index: payby.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/payby.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- payby.pm	1 Aug 2007 22:24:37 -0000	1.12
+++ payby.pm	19 May 2008 04:07:02 -0000	1.13
@@ -124,7 +124,7 @@
   #return "Illegal payby" unless $hash{$payby};
   return 0 unless $hash{$payby};
 
-  $table = 'cust_pay' if $table eq 'cust_pay_batch' || $table eq 'cust_refund';
+  $table = 'cust_pay' if $table =~ /^cust_(pay_pending|pay_batch|pay_void|refund)$/;
   return 0 if exists( $hash{$payby}->{$table} );
 
   return 1;

Index: payinfo_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/payinfo_Mixin.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- payinfo_Mixin.pm	5 May 2008 02:11:23 -0000	1.9
+++ payinfo_Mixin.pm	19 May 2008 04:07:01 -0000	1.10
@@ -22,9 +22,7 @@
 
 Payment Mask (Generation and Storage)
 Data Validation (parent checks need to be sure to call this)
-Encryption - In the Future (Pull from Record.pm)
-Bad Card Stuff - In the Future (Integrate Banned Pay)
-Currency - In the Future
+Pretty printing
 
 =head1 FIELDS
 
@@ -182,11 +180,6 @@
   return $paymask;
 }
 
-=cut
-
-sub _mask_payinfo {
-  my $self = shift;
-
 =item payinfo_check
 
 Checks payby and payinfo.
@@ -244,9 +237,46 @@
 
 }
 
+=item payby_payinfo_pretty
+
+Returns payment method and information (suitably masked, if applicable) as
+a human-readable string, such as:
+
+  Card #54xxxxxxxxxxxx32
+
+or
+
+  Check #119006
+
+=cut
+
+sub payby_payinfo_pretty {
+  my $self = shift;
+  if ( $self->payby eq 'CARD' ) {
+    'Card #'. $self->paymask;
+  } elsif ( $self->payby eq 'CHEK' ) {
+    'E-check acct#'. $self->payinfo;
+  } elsif ( $self->payby eq 'BILL' ) {
+    'Check #'. $self->payinfo;
+  } elsif ( $self->payby eq 'PREP' ) {
+    'Prepaid card #'. $self->payinfo;
+  } elsif ( $self->payby eq 'CASH' ) {
+    'Cash '. $self->payinfo;
+  } elsif ( $self->payby eq 'WEST' ) {
+    'Western Union'; #. $self->payinfo;
+  } elsif ( $self->payby eq 'MCRD' ) {
+    'Manual credit card'; #. $self->payinfo;
+  } else {
+    $self->payby. ' '. $self->payinfo;
+  }
+}
+
 =head1 BUGS
 
-Have to add the future items...
+Future items?
+  Encryption - In the Future (Pull from Record.pm)
+  Bad Card Stuff - In the Future (Integrate Banned Pay)
+  Currency - In the Future
 
 =head1 SEE ALSO
 

Index: cust_credit_refund.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit_refund.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cust_credit_refund.pm	8 Jan 2007 17:36:52 -0000	1.13
+++ cust_credit_refund.pm	19 May 2008 04:07:02 -0000	1.14
@@ -3,11 +3,11 @@
 use strict;
 use vars qw( @ISA );
 use FS::Record qw( qsearch qsearchs dbh );
-#use FS::UID qw(getotaker);
+use FS::cust_main_Mixin;
 use FS::cust_credit;
 use FS::cust_refund;
 
- at ISA = qw( FS::Record );
+ at ISA = qw( FS::cust_main_Mixin FS::Record );
 
 =head1 NAME
 

Index: cust_bill_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pay.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cust_bill_pay.pm	21 Jan 2007 21:45:28 -0000	1.18
+++ cust_bill_pay.pm	19 May 2008 04:07:01 -0000	1.19
@@ -3,11 +3,12 @@
 use strict;
 use vars qw( @ISA $conf );
 use FS::Record qw( qsearchs );
+use FS::cust_main_Mixin;
 use FS::cust_bill_ApplicationCommon;
 use FS::cust_bill;
 use FS::cust_pay;
 
- at ISA = qw( FS::cust_bill_ApplicationCommon );
+ at ISA = qw( FS::cust_main_Mixin FS::cust_bill_ApplicationCommon );
 
 #ask FS::UID to run this stuff for us later
 FS::UID->install_callback( sub { 



More information about the freeside-commits mailing list