X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fdomain_sql.pm;h=30103385b53cb578e73ce3c743d9a037f73b1943;hb=41d0660124cf3965a4a2b4706d02e382ac4cbf01;hp=e7dd477bcea0e8d0476d0e1e70c49c96c5de62b0;hpb=4bed1c4a0b734953feac608bd8ecf87d7eee11f1;p=freeside.git diff --git a/FS/FS/part_export/domain_sql.pm b/FS/FS/part_export/domain_sql.pm index e7dd477bc..30103385b 100644 --- a/FS/FS/part_export/domain_sql.pm +++ b/FS/FS/part_export/domain_sql.pm @@ -74,11 +74,13 @@ sub _export_insert { my %schema = $self->_schema_map; my %static = $self->_static_map; - my %record = ( map { $_ => $static{$_} } keys %static ), - ( map { my $method = $schema{$_}; + my %record = ( ( map { $_ => $static{$_} } keys %static ), + ( map { my $method = $schema{$_}; $_ => $svc_domain->$method(); - } - keys %schema ); + } + keys %schema + ) + ); my $err_or_queue = $self->domain_sql_queue( @@ -97,6 +99,7 @@ sub _export_replace { my %schema = $self->_schema_map; my %static = $self->_static_map; + #my %map = (%schema, %static); my @primary_key = (); if ( $self->option('primary_key') =~ /,/ ) { @@ -105,15 +108,18 @@ sub _export_replace { push @primary_key, $old->$keymap(); } } else { + my %map = (%schema, %static); my $keymap = $map{$self->option('primary_key')}; push @primary_key, $old->$keymap(); } - my %record = ( map { $_ => $static{$_} } keys %static ), - ( map { my $method = $schema{$_}; - $_ => $new->$method(); - } - keys %schema ); + my %record = ( ( map { $_ => $static{$_} } keys %static ), + ( map { my $method = $schema{$_}; + $_ => $new->$method(); + } + keys %schema + ) + ); my $err_or_queue = $self->domain_sql_queue( $new->svcnum, @@ -131,6 +137,7 @@ sub _export_delete { my %schema = $self->_schema_map; my %static = $self->_static_map; + my %map = (%schema, %static); my %primary_key = (); if ( $self->option('primary_key') =~ /,/ ) {