Move PaymentDateByTicket to helper file.
This commit is contained in:
parent
cc60ef0326
commit
7e52b5922b
2 changed files with 15 additions and 15 deletions
|
@ -37,6 +37,21 @@ sub Outreachy_FindMainTicketsInRound($) {
|
||||||
return @ticketSpecs;
|
return @ticketSpecs;
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
sub PaymentDateByTicket($$) {
|
||||||
|
my($ticketSpec, $paymentNumber) = @_;
|
||||||
|
open(my $rtPayFH, "-|", "$RT_CMD", "show", "-f", 'CF.{payment-' . $paymentNumber . '-sent}', $ticketSpec);
|
||||||
|
my $date;
|
||||||
|
while (my $payLine = <$rtPayFH>) {
|
||||||
|
chomp $payLine;
|
||||||
|
if ($payLine =~ /^\s*CF\s*.\s*{payment-$paymentNumber-sent}\s*:\s*[\d\-]+\s*$/) {
|
||||||
|
$date = $payLine;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close $rtPayFH;
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
###############################################################################
|
||||||
sub GetStatusFromTicket($) {
|
sub GetStatusFromTicket($) {
|
||||||
my($ticketSpec) = @_;
|
my($ticketSpec) = @_;
|
||||||
my $status;
|
my $status;
|
||||||
|
|
|
@ -16,21 +16,6 @@ require 'rt-helper.pl';
|
||||||
my($PAYMENT_DIR, $VERBOSE, $INTERACTIVE, $PAYMENT_NUMBER, $RT_CMD, $INVOICE_LINE, $INTERN_SUCCESS_FILE,
|
my($PAYMENT_DIR, $VERBOSE, $INTERACTIVE, $PAYMENT_NUMBER, $RT_CMD, $INVOICE_LINE, $INTERN_SUCCESS_FILE,
|
||||||
$INTERN_FAIL_FILE, $LEDGER_ENTRY_DATE, $SVN_CMD, $ROUND, $TRAVEL_NOTICE_TICKET);
|
$INTERN_FAIL_FILE, $LEDGER_ENTRY_DATE, $SVN_CMD, $ROUND, $TRAVEL_NOTICE_TICKET);
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
sub PaymentDateByTicket($$) {
|
|
||||||
my($ticketSpec, $paymentNumber) = @_;
|
|
||||||
open(my $rtPayFH, "-|", "$RT_CMD", "show", "-f", 'CF.{payment-' . $paymentNumber . '-sent}', $ticketSpec);
|
|
||||||
my $date;
|
|
||||||
while (my $payLine = <$rtPayFH>) {
|
|
||||||
chomp $payLine;
|
|
||||||
if ($payLine =~ /^\s*CF\s*.\s*{payment-$paymentNumber-sent}\s*:\s*[\d\-]+\s*$/) {
|
|
||||||
$date = $payLine;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close $rtPayFH;
|
|
||||||
return $date;
|
|
||||||
}
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub LedgerTagFromTicket($$) {
|
sub LedgerTagFromTicket($$) {
|
||||||
my($ticketSpec, $tag) = @_;
|
my($ticketSpec, $tag) = @_;
|
||||||
|
|
Loading…
Reference in a new issue