X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_credit.pm;h=70d78749c63b121b1b8ed4e414bb5ede8e772c8e;hb=34f91089a0d54fa39d622ec5e03d9e09a50e9f79;hp=938686feafb150cfd2cc6d16815541e403438cb0;hpb=115298fa22dca2531ccb946aacc0e8053919c4bb;p=freeside.git diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 938686fea..70d78749c 100644 --- a/FS/FS/cust_credit.pm +++ b/FS/FS/cust_credit.pm @@ -331,15 +331,15 @@ sub cust_credit_bill { ; } -=item credited +=item unapplied -Returns the amount of this credit that is still outstanding; which is +Returns the amount of this credit that is still unapplied/outstanding; amount minus all refund applications (see L) and applications to invoices (see L). =cut -sub credited { +sub unapplied { my $self = shift; my $amount = $self->amount; $amount -= $_->amount foreach ( $self->cust_credit_refund ); @@ -347,6 +347,18 @@ sub credited { sprintf( "%.2f", $amount ); } +=item credited + +Deprecated name for the unapplied method. + +=cut + +sub credited { + my $self = shift; + #carp "cust_credit->credited deprecated; use ->unapplied"; + $self->unapplied(@_); +} + =item cust_main Returns the customer (see L) for this credit. @@ -527,13 +539,13 @@ sub _upgrade_data { # class method =over 4 -=item credited_sql +=item unapplied_sql Returns an SQL fragment to retreive the unapplied amount. =cut -sub credited_sql { +sub unapplied_sql { #my $class = shift; "amount @@ -551,14 +563,29 @@ sub credited_sql { } +=item credited_sql + +Deprecated name for the unapplied_sql method. + +=cut + +sub credited_sql { + #my $class = shift; + + #carp "cust_credit->credited_sql deprecated; use ->unapplied_sql"; + + #$class->unapplied_sql(@_); + unapplied_sql(); +} + =back =head1 BUGS The delete method. The replace method. -B and B should probably be called B and -B. +B and B are now called B and +B. The old method names should start to give warnings. =head1 SEE ALSO