From 421c91d5a134748fd1f6962011264e4c4bf3bfd9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 17 Oct 2014 11:05:30 -0400 Subject: [PATCH] fix db marks --- cdr-exporter.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cdr-exporter.pl b/cdr-exporter.pl index 5c418f3..305695d 100755 --- a/cdr-exporter.pl +++ b/cdr-exporter.pl @@ -265,11 +265,13 @@ sub write_wrap { ($force == 0 && $rec_idx < $max) and return; ($force == 1 && $rec_idx == 0) and return; my $reseller_contract_id = ""; + my $mark_query = undef; unless($reseller eq "system") { $reseller_contract_id = "-".$reseller_ids->{$reseller}; + $mark_query = [ $reseller_ids->{$reseller} ]; } if (!defined($mark{"lastseq".$reseller_contract_id})) { - my $tmpmark = NGCP::CDR::Export::get_mark($dbh, $collid, [ $reseller ]); + my $tmpmark = NGCP::CDR::Export::get_mark($dbh, $collid, $mark_query); %mark = ( %mark, %$tmpmark ); $mark{"lastseq".$reseller_contract_id} //= 0; }