and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
...
...
@@ -121,7 +122,7 @@ SELECT h.period_year,
GROUP BY l.reference1,
reference3,
reference4,
h.journal_num,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
...
...
@@ -136,12 +137,12 @@ SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.journal_num,
h.sbo_num journal_num,
reference3 contract_number,
reference4 bp_code,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference4
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
...
...
@@ -168,7 +169,7 @@ SELECT h.period_year,
AND ROWNUM = 1)
due_amount,
(SELECT principal
(SELECT due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
...
...
@@ -204,6 +205,7 @@ SELECT h.period_year,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
...
...
@@ -121,7 +122,7 @@ SELECT h.period_year,
GROUP BY l.reference1,
reference3,
reference4,
h.journal_num,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
...
...
@@ -136,12 +137,12 @@ SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.journal_num,
h.sbo_num journal_num,
reference3 contract_number,
reference4 bp_code,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference4
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
...
...
@@ -168,7 +169,7 @@ SELECT h.period_year,
AND ROWNUM = 1)
due_amount,
(SELECT principal
(SELECT due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
...
...
@@ -204,6 +205,7 @@ SELECT h.period_year,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))