X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fsql_external.pm;h=5233c5403b7c46370b6dd2b711670c46d336083d;hb=c2dbe36096332d1e09bc58d7d9903e05247f0c9b;hp=a3866f34e57f6fd6b2b12fcad31124ae7fe18112;hpb=d5988a9f7a3617de33da3058f2e9f1151b24420e;p=freeside.git diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm index a3866f34e..5233c5403 100644 --- a/FS/FS/part_pkg/sql_external.pm +++ b/FS/FS/part_pkg/sql_external.pm @@ -3,7 +3,7 @@ use base qw( FS::part_pkg::discount_Mixin FS::part_pkg::recur_Common ); use strict; use vars qw( %info ); -use DBI; +use FS::DBI; #use FS::Record qw(qsearch qsearchs); tie our %query_style, 'Tie::IxHash', ( @@ -44,6 +44,7 @@ our @detail_cols = ( qw(amount format duration phonenum accountcode 'default' => '', }, 'query' => { 'name' => 'SQL query', + 'type' => 'textarea', 'default' => '', }, @@ -74,10 +75,10 @@ sub calc_recur { my $price = 0; my $quantity; # can be overridden; if not we use the default - my $dbh = DBI->connect( map { $self->option($_) } + my $dbh = FS::DBI->connect( map { $self->option($_) } qw( datasrc db_username db_password ) ) - or die $DBI::errstr; + or die $FS::DBI::errstr; my $sth = $dbh->prepare( $self->option('query') ) or die $dbh->errstr;