taxonomy().concept(ferc:RespondentLegalName).label("http://ferc.gov/form/2020-01-01/roles/label/F6Header").text Name of Respondent:

first(list([@ferc:RespondentLegalName @period=$currentDuration])) Duke Energy Kentucky, Inc.
taxonomy().concept(ferc:SubmissionType).label("http://ferc.gov/form/2020-01-01/roles/label/F6Header").text This report is:

(1) if missing({covered @concept=ferc:SubmissionType}) ☐ An Original']]> else if [@concept=ferc:SubmissionType @period=$currentDuration] == "O" ☑ An Original']]> else ☐ An Original']]> An Original

(2) if missing([covered @concept=ferc:SubmissionType @period=$currentDuration]) ☐ A Resubmission']]> else if [@concept=ferc:SubmissionType @period=$currentDuration] == "R" ☑ A Resubmission']]> else ☐ A Resubmission']]> A Resubmission
taxonomy().concept(ferc:ReportDate).label("http://ferc.gov/form/2020-01-01/roles/label/F6Header").text Date of Report:

first(list([@ferc:ReportDate @period=$currentDuration])) 04/26/2019
taxonomy().concept(ferc:ReportYearPeriod).label("http://ferc.gov/form/2020-01-01/roles/label/F6Header").text Year/Period of Report:

End of: first(list([@ferc:ReportYear @period=$currentDuration])) 2018 / first(list([@ferc:ReportPeriod @period=$currentDuration])) Q4
// adding a comment $data2 = list(for $i in range(48) list($i,none,none,none) ); $data = if count(list({covered @ferc:PayablesToAffiliatedCompaniesAxis=*})) > 0 list({covered @ferc:PayablesToAffiliatedCompaniesAxis=* {list( if list({@ferc:OrderNumber @unit=* @period=$currentDuration}).length > 0 first(list({@ferc:OrderNumber @unit=* @period=$currentDuration})) else 0, if exists({@ferc:NameOfCreditor @unit@period=$currentDuration}) first(list({@ferc:NameOfCreditor @unit @period=$currentDuration})) else none, if exists({@ferc:DescriptionOfTransaction @unit @period=$currentDuration}) first(list({@ferc:DescriptionOfTransaction @unit @period=$currentDuration})) else none, if exists({@ferc:PayablesToAffiliatedCompanies @unit @period=$currentInstant}) first(list({@ferc:PayablesToAffiliatedCompanies @unit @period=$currentInstant})) else none )}}) else $data2; $uniqueData = list(for $x in $data if $x == list(0,none,none,none) skip else $x ); for $row in $uniqueData.sort
taxonomy().concept(ferc:SchedulePayablesToAffiliatedCompaniesAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F6ScheduleTitle").text Payables to Affiliated Companies
taxonomy().concept(ferc:SchedulePayablesToAffiliatedCompaniesAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F6Instructions").text
  1. Give particulars (details) on the various affiliated company creditors and provide a description of the transactions involved in the current liability Account No. 51, Payable to Affiliated Companies.
  2. In column (a), list every item amounting to $500,000 or more. For creditors whose balances were less than $500,000, a single entry may be made under a caption "Minor accounts, less than $500,000."
Line No. $headings = filter (taxonomy().concept(ferc:SchedulePayablesToAffiliatedCompaniesAbstract).references("http://ferc.gov/form/2020-01-01/roles/reference/columnDetails")) where ($item.part-by-name(ferc-part:Schedule).part-value == "225 - Schedule - Payables to Affiliated Companies") $heading = list(for $ref in $headings list($ref.part-by-name(ferc-part:Column).part-value, $ref.part-by-name(ferc-part:ColumnName).part-value, $ref.part-by-name(ferc-part:ElementName).part-value)) $heading_dict = dict(for $row in $heading list("("+$row[1]+")",list($row[2],taxonomy().concept(to-qname($row[3])))) ); for $row in $heading_dict.keys.sort
$heading_dict[$row][2].name.local-name
$heading_dict[$row][1] Nature of Payment
$row (a)
1 $row[2] ABC Creditor $row[3] Accounts Payable $row[4] $1,231,456
49 taxonomy().concept(ferc:PayablesToAffiliatedCompanies).label("http://ferc.gov/form/2020-01-01/roles/label/F6Total").text
Total
first(list([covered @concept=ferc:PayablesToAffiliatedCompanies @period = $currentInstant])) $85,531,884