=over 4
-=item begin - epoch date (UNIX timestamp) setting a lower bound for _date values
+=item begin
-=item end - epoch date (UNIX timestamp) setting an upper bound for _date values
+Epoch date (UNIX timestamp) setting a lower bound for _date values
+
+=item end
+
+Epoch date (UNIX timestamp) setting an upper bound for _date values
=item invnum_min
=over 4
-=item eventnum - primary key
+=item eventnum
-=item invnum - invoice (see L<FS::cust_bill>)
+Primary key
-=item eventpart - event definition (see L<FS::part_bill_event>)
+=item invnum
-=item _date - specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
+Invoice (see L<FS::cust_bill>)
+
+=item eventpart
+
+Event definition (see L<FS::part_bill_event>)
+
+=item _date
+
+Specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
L<Time::Local> and L<Date::Parse> for conversion functions.
-=item status - event status: B<done> or B<failed>
+=item status
+
+Event status: B<done> or B<failed>
-=item statustext - additional status detail (i.e. error message)
+=item statustext
+
+Additional status detail (i.e. error message)
=back
$self->replace($old);
}
-=item search_sql HREF
+=item search_sql HASHREF
Class method which returns an SQL WHERE fragment to search for parameters
-specified in HREF. Valid parameters are
+specified in HASHREF. Valid parameters are
=over 4
+
=item agentnum
-=item beginning - an epoch date setting a lower bound for _date values
-=item ending - an epoch date setting a upper bound for _date values
-=item failed - limits the search to failed events if true
-=item payby - requires that the search be JOIN'd to part_bill_event # Bug?
-=item currentuser - specifies the user for agent virtualization
+
+=item beginning
+
+An epoch date setting a lower bound for _date values
+
+=item ending
+
+An epoch date setting a upper bound for _date values
+
+=item failed
+
+Limits the search to failed events if true
+
+=item payby
+
+Requires that the search be JOIN'd to part_bill_event # Bug?
+
+=item currentuser
+
+Specifies the user for agent virtualization
+
=back
=cut
push @search, "part_bill_event.payby = '". $params->{payby}. "'"
if $params->{payby};
- if ($params->{CurrentUser}) {
- my $access_user = qsearchs('access_user',
- {username => $params->{CurrentUser} }
- );
+ my $currentuser = $params->{currentuser} || $params->{CurrentUser};
+ if ($currentuser) {
+ my $access_user = qsearchs('access_user', { username => $currentuser });
if ($access_user) {
push @search, $access_user->agentnums_sql;
}else{
=over 4
-=item crednum - primary key (assigned automatically for new credits)
+=item crednum
-=item custnum - customer (see L<FS::cust_main>)
+Primary key (assigned automatically for new credits)
-=item amount - amount of the credit
+=item custnum
-=item _date - specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
+Customer (see L<FS::cust_main>)
+
+=item amount
+
+Amount of the credit
+
+=item _date
+
+Specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
L<Time::Local> and L<Date::Parse> for conversion functions.
-=item otaker - order taker (assigned automatically, see L<FS::UID>)
+=item otaker
+
+Order taker (assigned automatically, see L<FS::UID>)
+
+=item reason
+
+Text ( deprecated )
+
+=item reasonnum
-=item reason - text ( deprecated )
+Reason (see L<FS::reason>)
-=item reasonum - int reason (see L<FS::reason>)
+=item closed
-=item closed - books closed flag, empty or `Y'
+Books closed flag, empty or `Y'
=back
$self->SUPER::check;
}
-=item cust_refund
-
-Depreciated. See the cust_credit_refund method.
-
-#Returns all refunds (see L<FS::cust_refund>) for this credit.
-
-=cut
-
-sub cust_refund {
- use Carp;
- croak "FS::cust_credit->cust_pay depreciated; see ".
- "FS::cust_credit->cust_credit_refund";
- #my $self = shift;
- #sort { $a->_date <=> $b->_date }
- # qsearch( 'cust_refund', { 'crednum' => $self->crednum } )
- #;
-}
-
=item cust_credit_refund
Returns all refund applications (see L<FS::cust_credit_refund>) for this credit.
# _upgrade_data
#
# Used by FS::Upgrade to migrate to a new database.
-#
-#
sub _upgrade_data { # class method
my ($class, %opts) = @_;
=over 4
-=item paypendingnum - primary key
+=item paypendingnum
-=item custnum - customer (see L<FS::cust_main>)
+Primary key
-=item paid - Amount of this payment
+=item custnum
-=item _date - specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
+Customer (see L<FS::cust_main>)
+
+=item paid
+
+Amount of this payment
+
+=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 - Payment Type (See L<FS::payinfo_Mixin> for valid payby values)
+=item payby
+
+Payment Type (See L<FS::payinfo_Mixin> for valid payby values)
+
+=item payinfo
+
+Payment Information (See L<FS::payinfo_Mixin> for data format)
-=item payinfo - Payment Information (See L<FS::payinfo_Mixin> for data format)
+=item paymask
-=item paymask - Masked payinfo (See L<FS::payinfo_Mixin> for how this works)
+Masked payinfo (See L<FS::payinfo_Mixin> for how this works)
-=item paydate - Expiration date
+=item paydate
+
+Expiration date
+
+=item payunique
+
+Unique identifer to prevent duplicate transactions.
+
+=item status
+
+Pending transaction status, one of the following:
+
+=over 4
-=item payunique - Unique identifer to prevent duplicate transactions.
+=item new
+
+Aquires basic lock on payunique
+
+=item pending
+
+Transaction is pending with the gateway
+
+=item authorized
+
+Only used for two-stage transactions that require a separate capture step
+
+=item captured
+
+Transaction completed with payment gateway (sucessfully), not yet recorded in
+the database
+
+=item declined
+
+Transaction completed with payment gateway (declined), not yet recorded in
+the database
+
+=item done
+
+Transaction recorded in database
+
+=back
-=item status - new (acquires basic lock on payunique), pending (transaction is pending with the gateway), authorized (only used for two-stage transactions that require a separate capture step), captured/declined (transaction completed with payment gateway, not yet recorded in the database), done (transaction recorded in database)
+=item statustext
-=item statustext -
+Additional status information.
=cut