projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was generated by cvs2svn to compensate for changes in r4888,
[freeside.git]
/
FS
/
FS
/
cust_pay.pm
diff --git
a/FS/FS/cust_pay.pm
b/FS/FS/cust_pay.pm
index
a7d6990
..
bc5fbab
100644
(file)
--- a/
FS/FS/cust_pay.pm
+++ b/
FS/FS/cust_pay.pm
@@
-61,7
+61,9
@@
currently supported:
L<Time::Local> and L<Date::Parse> for conversion functions.
=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
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), `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
=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively
@@
-270,12
+272,14
@@
sub void {
=item delete
=item delete
-Deletes this payment and all associated applications (see L<FS::cust_bill_pay>),
-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<FS::cust_bill_pay> and L<FS::cust_pay_refund>). In most
+cases, you want to use the void method instead to leave a record of the
+deleted payment.
=cut
=cut
+# very similar to FS::cust_credit::delete
sub delete {
my $self = shift;
return "Can't delete closed payment" if $self->closed =~ /^Y/i;
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
=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
=item check
@@
-373,7
+386,8
@@
sub check {
$self->_date(time) unless $self->_date;
$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
$self->payby($1);
#false laziness with cust_refund::check