[freeside-commits] freeside/FS/FS/part_event/Condition billday.pm, NONE, 1.1
Erik Levinson
levinse at wavetail.420.am
Sun Apr 24 10:05:03 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition
In directory wavetail.420.am:/tmp/cvs-serv947/FS/FS/part_event/Condition
Added Files:
billday.pm
Log Message:
add per-customer configurable billing date, RT10813
--- NEW FILE: billday.pm ---
package FS::part_event::Condition::billday;
use strict;
use Tie::IxHash;
use base qw( FS::part_event::Condition );
sub description {
"Customer's monthly billing day matches current day or customer has no billing day";
}
sub condition {
my( $self, $object ) = @_;
my $cust_main = $self->cust_main($object);
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
($mday == $cust_main->billday) || (!$cust_main->billday);
}
sub condition_sql {
my( $self, $table ) = @_;
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
"cust_main.billday is null or cust_main.billday = $mday";
}
1;
More information about the freeside-commits
mailing list