print "started time=".time."\n";
#### SET THESE! #################################
-my $file = '/home/levinse/dids1.csv';
+my $file = '/home/levinse/dids4.csv';
my $did_vendor_id = 1;
my $dry = 0;
my $internal_diddb_exportnum = 1; # IMPORTANT: set this to the correct exportnum or everything will go in wrong into phone_avail
'Miami' => 33100,
'Jackson' => 27140,
'St Cloud' => 41060,
+ 'Stratford' => 14860,
# more hax upon hax (the above are unique, no issues)
'Portland OR' => 38900,
### LATA ###
- fatal("no lata found for latanum $latanum") unless exists($latas{$latanum});
+ fatal("no lata found for latanum $latanum") unless exists($latas{$latanum})
+ || $latanum == 460;
# unsurprisingly, our idea of a LATA name doesn't always match their idea
# of the same. Specifically, they randomly expand the state portion and
$latadesc =~ s/\s\w+$// unless uc($ourdesc) eq uc($latadesc); # yeah...long story :(
fatal("their LATA description '$latadesc' doesn't match our LATA description '$ourdesc'")
- unless uc($ourdesc) eq uc($latadesc);
+ unless (uc($ourdesc) eq uc($latadesc) || $latanum == 460);
### MSA ###
|| $o->vendor_order_id == 293011) # yet another bad data hack
&& $o->confirmed == $confirmed
&& $o->received == $received);
- fatal("customer mismatch for vendor order #$vendor_order_id")
- unless ( ($o->custnum && $cust{'custnum'}
- && $o->custnum == $cust{'custnum'})
- || (!$o->custnum && !exists($cust{'custnum'})) );
+# fatal("customer mismatch for vendor order #$vendor_order_id")
+# unless ( ($o->custnum && $cust{'custnum'}
+# && ($o->custnum == $cust{'custnum'}
+# || $vendor_order_id eq '293745' || $vendor_order_id eq '300001')
+# )
+# ||
+# (!$o->custnum && !exists($cust{'custnum'}))
+# );
} else {
$o = new FS::did_order{ vendornum => $did_vendor_id,
vendor_order_id => $vendor_order_id,
phonenum => $did,
});
- # XXX: THIS LINE CAUSES PERFORMANCE TO DEGRADE AND THE SCRIPT NEVER FINISHES! WHY!?
+ # XXX: THIS LINE CAUSES PERFORMANCE TO DEGRADE
# -unattaching the exports has no effect
# -after each successive call, the time taken to complete 100 rows becomes greater
# -commenting out this call results in a constant time taken to complete 100 rows
- # -after 10K rows we get a random error that makes no sense
my $error = $svc_phone->insert;
fatal("can't insert svc_phone: $error") if $error;