X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=bc5fbab0807f62c1cec4963ee556e903f34f3bcb;hb=d77dad830dda5fbe6d807445e09fe6770efdb550;hp=a7d69901fe991056024ccbb44bd6992a4391ccc5;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index a7d69901f..bc5fbab08 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -61,7 +61,9 @@ currently supported: L and L 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), `PREP` (prepaid card), +`CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or +`COMP' (free) =item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively @@ -270,12 +272,14 @@ sub void { =item delete -Deletes this payment and all associated applications (see L), -unless the closed flag is set. In most cases, you want to use the void -method instead to leave a record of the deleted payment. +Unless the closed flag is set, deletes this payment and all associated +applications (see L and L). In most +cases, you want to use the void method instead to leave a record of the +deleted payment. =cut +# very similar to FS::cust_credit::delete sub delete { my $self = shift; return "Can't delete closed payment" if $self->closed =~ /^Y/i; @@ -343,7 +347,16 @@ sub delete { =item replace OLD_RECORD -You probably shouldn't modify payments... +You can, but probably shouldn't modify payments... + +=cut + +sub replace { + #return "Can't modify payment!" + my $self = shift; + return "Can't modify closed payment" if $self->closed =~ /^Y/i; + $self->SUPER::replace(@_); +} =item check @@ -373,7 +386,8 @@ sub check { $self->_date(time) unless $self->_date; - $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREP)$/ or return "Illegal payby"; + $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREP|CASH|WEST|MCRD)$/ + or return "Illegal payby"; $self->payby($1); #false laziness with cust_refund::check