1 package FS::Cron::disable_quotation;
3 use vars qw( @ISA @EXPORT_OK );
9 @EXPORT_OK = qw( disable_quotation );
11 sub disable_quotation {
12 if ( my $days = FS::Conf->new->config( 'quotation_disable_after_days' ) ) {
13 my $sth = dbh->prepare(
14 "UPDATE quotation SET disabled = 'Y' WHERE _date < ?"
16 $sth->execute( time - ( $days * 86400 ) ) or die $sth->errstr;
17 dbh->commit or die dbh->errstr;