More processing work.
This commit is contained in:
parent
cebb1d813b
commit
cdf9526b3d
1 changed files with 38 additions and 8 deletions
|
@ -210,16 +210,46 @@ while (my $file = readdir $dh) {
|
||||||
} else {
|
} else {
|
||||||
print STDERR "... BIG PROBLEM: the intern actually failed but got this payment.\n";
|
print STDERR "... BIG PROBLEM: the intern actually failed but got this payment.\n";
|
||||||
}
|
}
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
# Check to see if previous payment was sent payment
|
# Check to see if previous payment was sent payment
|
||||||
my $prevPay = $PAYMENT_NUMBER - 1;
|
my $prevPayNum = $PAYMENT_NUMBER - 1;
|
||||||
|
|
||||||
my $lastPayDate = PaymentDateByTicket($ticket, $prevPay);
|
my $lastPayDate = PaymentDateByTicket($ticket, $prevPayNum);
|
||||||
if (not defined $lastPayDate) {
|
if (not defined $lastPayDate) {
|
||||||
print STDERR "\"$file\": \"$ticket\": Skipped: payment $prevPay was not made yet.\n";
|
print STDERR "\"$file\": \"$ticket\": Skipped: payment $prevPayNum was not made yet";
|
||||||
|
if ($pass) {
|
||||||
|
print STDERR ".\n";
|
||||||
|
} else {
|
||||||
|
print STDERR "... NOTE: previous payment was not sent; should it be sent now?\n";
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
my $completedInternshipField = GetCustomFieldForTicket($ticket, "completed-internship");
|
||||||
|
my $expectVal = 'payment-' . $prevPayNum . "-approved";
|
||||||
|
if ($completedInternshipField ne $expectVal) {
|
||||||
|
print STDERR "\"$file\": \"$ticket\": Skipped: completed-internship field was ",
|
||||||
|
"\"$completedInternshipField\" instead of \"$expectVal\".\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my(@links) = GetLinksForTicket($ticket);
|
||||||
|
my $taxTicket = FindTaxTicketFromList(@links);
|
||||||
|
if (not defined $taxTicket) {
|
||||||
|
print STDERR "\"$file\": \"$ticket\": Skipped: no tax ticket found.\n";
|
||||||
|
}
|
||||||
|
my $taxTicketStatus = GetStatusFromTicket($taxTicket);
|
||||||
|
if ($taxTicketStatus ne "resolved") {
|
||||||
|
print STDERR "\"$file\": \"$ticket\": Tax Ticket: \"$taxTicket\": Skipped: ",
|
||||||
|
"tax ticket is in status \"$taxTicketStatus\" instead of \"resolved\"\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
my $mainTicketStatus = GetStatusFromTicket($ticket);
|
||||||
|
if ($mainTicketStatus ne "needs-project-ok") {
|
||||||
|
print STDERR "\"$file\": \"$ticket\": Skipped: ",
|
||||||
|
"ticket is in status \"$mainTicketStatus\" instead of \"needs-project-ok\"\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue