Improve payment output prep.
This commit is contained in:
parent
9145aec8c5
commit
b301b2a86e
1 changed files with 12 additions and 1 deletions
|
@ -311,10 +311,21 @@ while (my $file = readdir $dh) {
|
|||
$leftA = '$-2,750.00'; $rightA = '$2,750.00';
|
||||
}
|
||||
my(@tags) = AllFormattedLedgerTagFromTicket($ticket);
|
||||
|
||||
my $contractName = 'FIXME';
|
||||
$contractName = $paymentVals{'CONTRACTED NAME'} if defined $paymentVals{'CONTRACTED NAME'};
|
||||
$contractName =~ s/^\s*//; $contractName =~ s/\s*$//;
|
||||
|
||||
open(my $paymentValsFH, ">", File::Spec->catfile($PAYMENT_DIR, "payment-values.txt"));
|
||||
foreach my $key (keys %paymentVals) {
|
||||
print $paymentValsFH "$key:$paymentVals{$key}\n";
|
||||
}
|
||||
close $paymentValsFH;
|
||||
|
||||
open(my $ledgerEntryFH, ">>", File::Spec->catfile($PAYMENT_DIR, "entry.ledger"));
|
||||
print $ledgerEntryFH <<LEDGER_ENTRY
|
||||
|
||||
$LEDGER_ENTRY_DATE FIXME - Outreachy Internship - Round 2018-05 - Payment $PAYMENT_NUMBER
|
||||
$LEDGER_ENTRY_DATE $contractName - Outreachy Internship - Round 2018-05 - Payment $PAYMENT_NUMBER
|
||||
@tags ;Invoice: $INVOICE_LINE
|
||||
$approvalTag
|
||||
Accrued:Accounts Payable:Outreachy $leftA
|
||||
|
|
Loading…
Reference in a new issue