summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg/sql_generic.pm
diff options
context:
space:
mode:
authorivan <ivan>2008-04-13 07:41:29 +0000
committerivan <ivan>2008-04-13 07:41:29 +0000
commite3dffa23a03cd9f88946ceb78bc75ada29bc013a (patch)
treec37404e4cbdf5114cf45e451ecea3724cda3023f /FS/FS/part_pkg/sql_generic.pm
parentd4734cefabb54109fc036cb030adff6f5c5b5119 (diff)
shorter names and rearranged weights for a brighter tommorow^W^Wbetter price plan <SELECT>
Diffstat (limited to 'FS/FS/part_pkg/sql_generic.pm')
-rw-r--r--FS/FS/part_pkg/sql_generic.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/sql_generic.pm b/FS/FS/part_pkg/sql_generic.pm
index 0e6ab7c..9047294 100644
--- a/FS/FS/part_pkg/sql_generic.pm
+++ b/FS/FS/part_pkg/sql_generic.pm
@@ -10,6 +10,7 @@ use FS::part_pkg::flat;
%info = (
'name' => 'Base charge plus a per-domain metered rate from a configurable SQL query',
+ 'shortname' => 'Bulk (per-domain from SQL query)',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
@@ -45,7 +46,7 @@ use FS::part_pkg::flat;
# 'recur' => '\'my $dbh = DBI->connect(\"\' + what.datasrc.value + \'\", \"\' + what.db_username.value + \'\") or die $DBI::errstr; \'',
#'recur' => '\'my $dbh = DBI->connect(\"\' + what.datasrc.value + \'\", \"\' + what.db_username.value + \'\", \"\' + what.db_password.value + \'\" ) or die $DBI::errstr; my $sth = $dbh->prepare(\"\' + what.query.value + \'\") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq \"svc_domain\" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_flat.value + \' + $units * \' + what.recur_unit_charge.value + \';\'',
#'recur' => '\'my $dbh = DBI->connect("\' + what.datasrc.value + \'", "\' + what.db_username.value + \'", "\' what.db_password.value + \'" ) or die $DBI::errstr; my $sth = $dbh->prepare("\' + what.query.value + \'") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq "svc_domain" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_flat.value + \' + $units * \' + what.recur_unit_charge + \';\'',
- 'weight' => '70',
+ 'weight' => '56',
);
sub calc_recur {