[freeside-commits] freeside/FS/FS/part_event/Condition postal.pm, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Mon Apr 25 10:36:05 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition
In directory wavetail.420.am:/tmp/cvs-serv5643
Added Files:
postal.pm
Log Message:
add postal.pm condition, RT#12557
--- NEW FILE: postal.pm ---
package FS::part_event::Condition::postal;
use base qw( FS::part_event::Condition );
use strict;
sub description {
'Customer receives a postal mail invoice';
}
sub condition {
my( $self, $object ) = @_;
my $cust_main = $self->cust_main($object);
scalar( grep { $_ eq 'POST' } $cust_main->invoicing_list );
}
sub condition_sql {
my( $self, $table ) = @_;
" EXISTS( SELECT 1 FROM cust_main_invoice
WHERE cust_main_invoice.custnum = cust_main.custnum
AND cust_main_invoice.dest = 'POST'
)
";
}
1;
More information about the freeside-commits
mailing list