have the UI use full country names, and state names outside the US...
[freeside.git] / FS / FS / cust_refund.pm
index b9f48db..8c672b8 100644 (file)
@@ -45,11 +45,14 @@ inherits from FS::Record.  The following fields are currently supported:
 
 =item refund - Amount of the refund
 
+=item reason - Reason for the refund
+
 =item _date - specified as a UNIX timestamp; see L<perlfunc/"time">.  Also see
 L<Time::Local> and L<Date::Parse> for conversion functions.
 
 =item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
-`LECB' (Phone bill billing), `BILL' (billing), or `COMP' (free)
+`LECB' (Phone bill billing), `BILL' (billing), `CASH' (cash),
+`WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free)
 
 =item payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
 
@@ -194,6 +197,7 @@ sub check {
     $self->ut_numbern('refundnum')
     || $self->ut_numbern('custnum')
     || $self->ut_money('refund')
+    || $self->ut_text('reason')
     || $self->ut_numbern('_date')
     || $self->ut_textn('paybatch')
     || $self->ut_enum('closed', [ '', 'Y' ])
@@ -208,7 +212,8 @@ sub check {
     unless $self->crednum 
            || qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
 
-  $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP)$/ or return "Illegal payby";
+  $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|CASH|WEST|MCRD)$/
+    or return "Illegal payby";
   $self->payby($1);
 
   #false laziness with cust_pay::check