From: ivan Date: Mon, 5 Jul 2010 21:10:07 +0000 (+0000) Subject: customer exports, RT#8952 X-Git-Tag: root_of_svc_elec_features~83 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f52e5491164eb407549716ebfd36fae6f692b1c1 customer exports, RT#8952 --- diff --git a/FS/FS/part_export/cust_http.pm b/FS/FS/part_export/cust_http.pm index d2781f64b..59503e811 100644 --- a/FS/FS/part_export/cust_http.pm +++ b/FS/FS/part_export/cust_http.pm @@ -6,6 +6,8 @@ use Tie::IxHash; @ISA = qw( FS::part_export::http ); +tie my %options, 'Tie::IxHash', %FS::part_export::http::options; + $options{'insert_data'}->{'default'} = join("\n", "action 'insert'", "custnum \$cust_main->custnum", diff --git a/FS/FS/part_export/http.pm b/FS/FS/part_export/http.pm index 9a216c148..e5e5a5c48 100644 --- a/FS/FS/part_export/http.pm +++ b/FS/FS/part_export/http.pm @@ -90,13 +90,15 @@ sub _export_replace { my $new_cust_main = $new->table eq 'cust_main' ? $new : $new->cust_svc->cust_pkg->cust_main; + my $cust_main = $new_cust_main; #so folks can use $new_cust_main or $cust_main - $self->http_queue( $svc_x->svcnum, + $self->http_queue( $new->svcnum, $self->option('method'), $self->option('url'), map { /^\s*(\S+)\s+(.*)$/ or /()()/; my( $field, $value_expression ) = ( $1, $2 ); + my $value = eval $value_expression; die $@ if $@; ( $field, $value ); } split(/\n/, $self->option('replace_data') )