diff options
author | ivan <ivan> | 2002-01-09 13:29:34 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-01-09 13:29:34 +0000 |
commit | d73c1796de9df0ed14469f745d985cd706137d6d (patch) | |
tree | 39ce3d97b90c29c069f9c7a35b684067f6f1a81b /FS | |
parent | 69a0a7504f84aa9bb1f204d1f3522e1520e0885e (diff) |
update fuzzy cache files on customer replace.
do an exact search along with the fuzzy search (webui)
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main.pm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 3e92417c4..1a9d43e94 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -347,6 +347,7 @@ sub insert { } } + #false laziness with sub replace my $queue = new FS::queue { 'job' => 'FS::cust_main::append_fuzzyfiles' }; $error = $queue->insert($self->getfield('last'), $self->company); if ( $error ) { @@ -362,6 +363,7 @@ sub insert { return "queueing job (transaction rolled back): $error"; } } + #eslaf $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; @@ -509,6 +511,24 @@ sub replace { $self->invoicing_list( $invoicing_list ); } + #false laziness with sub insert + my $queue = new FS::queue { 'job' => 'FS::cust_main::append_fuzzyfiles' }; + $error = $queue->insert($self->getfield('last'), $self->company); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return "queueing job (transaction rolled back): $error"; + } + + if ( defined $self->dbdef_table->column('ship_last') && $self->ship_last ) { + $queue = new FS::queue { 'job' => 'FS::cust_main::append_fuzzyfiles' }; + $error = $queue->insert($self->getfield('last'), $self->company); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return "queueing job (transaction rolled back): $error"; + } + } + #eslaf + $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; @@ -1946,7 +1966,7 @@ sub append_fuzzyfiles { =head1 VERSION -$Id: cust_main.pm,v 1.53 2001-12-28 15:14:01 ivan Exp $ +$Id: cust_main.pm,v 1.54 2002-01-09 13:29:33 ivan Exp $ =head1 BUGS |