projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more options for netsapiens export, #14958
[freeside.git]
/
FS
/
FS
/
part_export
/
domain_sql.pm
diff --git
a/FS/FS/part_export/domain_sql.pm
b/FS/FS/part_export/domain_sql.pm
index
e7dd477
..
3010338
100644
(file)
--- 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 %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();
$_ => $svc_domain->$method();
- }
- keys %schema );
+ }
+ keys %schema
+ )
+ );
my $err_or_queue =
$self->domain_sql_queue(
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 %schema = $self->_schema_map;
my %static = $self->_static_map;
+ #my %map = (%schema, %static);
my @primary_key = ();
if ( $self->option('primary_key') =~ /,/ ) {
my @primary_key = ();
if ( $self->option('primary_key') =~ /,/ ) {
@@
-105,15
+108,18
@@
sub _export_replace {
push @primary_key, $old->$keymap();
}
} else {
push @primary_key, $old->$keymap();
}
} else {
+ my %map = (%schema, %static);
my $keymap = $map{$self->option('primary_key')};
push @primary_key, $old->$keymap();
}
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,
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 %schema = $self->_schema_map;
my %static = $self->_static_map;
+ my %map = (%schema, %static);
my %primary_key = ();
if ( $self->option('primary_key') =~ /,/ ) {
my %primary_key = ();
if ( $self->option('primary_key') =~ /,/ ) {