Move Entity lookup until after ticket is found.
This commit is contained in:
parent
cb49fb5c3e
commit
cebb1d813b
1 changed files with 8 additions and 7 deletions
|
@ -169,12 +169,6 @@ while (my $file = readdir $dh) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find the ticket number for this intern.
|
|
||||||
my $entity = LedgerTagFromTicket($ticket, 'Entity');
|
|
||||||
if (not defined $entity) {
|
|
||||||
print STDERR "\"$file\": \"$ticket\": Skipping: cannot determine Entity from ticket." ;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my(@nameComponents) = split(/\s*-\s*/, $name);
|
my(@nameComponents) = split(/\s*-\s*/, $name);
|
||||||
my(@searchTerms);
|
my(@searchTerms);
|
||||||
foreach my $name (@nameComponents) {
|
foreach my $name (@nameComponents) {
|
||||||
|
@ -196,7 +190,14 @@ while (my $file = readdir $dh) {
|
||||||
die "interactive mode not yet supported";
|
die "interactive mode not yet supported";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($PAYMENT_NUMBER == 1) {
|
# Find the ticket number for this intern.
|
||||||
|
my $entity = LedgerTagFromTicket($ticket, 'Entity');
|
||||||
|
if (not defined $entity) {
|
||||||
|
print STDERR "\"$file\": \"$ticket\": Skipping: cannot determine Entity from ticket." ;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($PAYMENT_NUMBER <= 1) {
|
||||||
print STDERR "Sorry, script does not yet support first payment\n";
|
print STDERR "Sorry, script does not yet support first payment\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue