diff options
author | jeff <jeff> | 2008-08-21 18:21:41 +0000 |
---|---|---|
committer | jeff <jeff> | 2008-08-21 18:21:41 +0000 |
commit | 9080a8d56896cfa2fe3f696fe087d7283d13f52c (patch) | |
tree | 750d053de14da6967b7230527b0c47ec360dda54 /bin | |
parent | a7b7036b80d87d690329748a48283ca8b9f87fb9 (diff) |
use options with proper names
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/import-optigold.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/import-optigold.pl b/bin/import-optigold.pl index b254b5c62..d32a2a129 100755 --- a/bin/import-optigold.pl +++ b/bin/import-optigold.pl @@ -393,7 +393,7 @@ part_pkg => { 'stable' => 'product', }, 'comment' => 'product_id', 'freq' => sub { pkg_freq(shift) }, - 'recur' => sub { my $href = shift; + 'recur_fee'=> sub { my $href = shift; my $price = ( pkg_freq($href) ? $href->{'unit_price'} : 0 @@ -448,7 +448,7 @@ part_pkg => { 'stable' => 'product', $part_pkg->$_(''); ($_ => $v); } - qw (setup recur) + qw (setup_fee recur_fee) }; my $error = $part_pkg->insert(options=>$options); @@ -764,7 +764,7 @@ cust_pkg => { 'stable' => 'billcycle', if ($pkg && ($pkg->freq + 0)) { my $recur = 0; - $pkg->recur =~ /\s*(\S[\S ]*?)\s*$/ && ($recur = $1); + $pkg->recur_fee =~ /\s*(\S[\S ]*?)\s*$/ && ($recur = $1); $recur = eval "$recur + 0"; $pkg = '' unless $recur == $price; @@ -792,13 +792,13 @@ cust_pkg => { 'stable' => 'billcycle', my $recur = sprintf("%.2f", ($month ? $price : 0)); for (@pkgs) { my %options = $_->options; - if ($options{recur} eq $recur) { + if ($options{recur_fee} eq $recur) { $pkg = $_; last; } } - $pkghref->{recur} = $recur + $pkghref->{recur_fee} = $recur unless $pkg; my $pkg_svc = {}; @@ -821,7 +821,7 @@ cust_pkg => { 'stable' => 'billcycle', $pkg->$_(''); ($_ => $v); } - qw (setup recur) + qw (setup_fee recur_fee) }; my $error = $pkg->insert(options=>$options); |