Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
99b1b7d6
Commit
99b1b7d6
authored
Aug 15, 2023
by
lizhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database修改
parent
d05524c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
14 deletions
+46
-14
con_je_vat_database_query.lwm
.../WEB-INF/classes/rpt/RPT555/con_je_vat_database_query.lwm
+46
-14
No files found.
src/main/webapp/WEB-INF/classes/rpt/RPT555/con_je_vat_database_query.lwm
View file @
99b1b7d6
...
...
@@ -214,7 +214,7 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
and exists (select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('6041001000'))
and g.account_code in ('6041001000'
,'6041001100'
))
and rownum = 1)
when ghd.je_template_code in ('HL_REPURCHASE_VAT') then
(select -1 * round(cc.ccr_due_amount -
...
...
@@ -257,7 +257,7 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
and exists (select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('6041001000'))
and g.account_code in ('6041001000'
,'6041001100'
))
and rownum = 1)
when ghd.je_template_code in ('HL_REPURCHASE_VAT') then
(select -1 * round(cc.ccr_due_amount -
...
...
@@ -596,12 +596,22 @@ SELECT h.period_year,
-- 'HL_CON_CHANGE_REPURCHASE_VAT',
-- to_number(l.reference7),
-- l.amount_cr) due_amount,
to_number(l.reference7) due_amount,
to_number(l.reference7)-
(select nvl(sum(cw.write_off_due_amount), 0)
from csh_write_off cw, con_contract cc
where cw.cashflow_id = l.cashflow_id
and cw.contract_id = cc.contract_id
and cw.write_off_date
< cc.repurchase_date
)
due_amount,
--
decode(hd.je_template_code,
--
'HL_CON_CHANGE_REPURCHASE_VAT',
--
to_number(l.reference7),
--
l.amount_cr)
principal,
to_number(l.reference7) principal,
to_number(l.reference7)-
(select
nvl(sum(cw.write_off_due_amount),
0)
from
csh_write_off
cw,
con_contract
cc
where
cw.cashflow_id =
l.cashflow_id
and
cw.contract_id =
cc.contract_id
and
cw.write_off_date
<
cc.repurchase_date)
principal,
0
interest,
l.amount_cr
vat_due_amount,
case
...
...
@@ -770,7 +780,15 @@ SELECT h.period_year,
nvl(ccc.interest,
0)
when
ccc.cf_item =
1
and
cc.business_type
!=
'LEASEBACK'
then
decode(hd.je_template_code,'HL_REPURCHASE_VAT_REVERSE',
ccc.due_amount
-
(select
nvl(sum(cw.write_off_due_amount),
0)
from
csh_write_off
cw,
con_contract
cc
where
cw.cashflow_id =
l.cashflow_id
and
cw.contract_id =
cc.contract_id
and
cw.write_off_date
<
cc.repurchase_date),
ccc.due_amount
)
else
ccc.due_amount
end
...
...
@@ -783,7 +801,15 @@ SELECT h.period_year,
0
when
ccc.cf_item =
1
and
cc.business_type
!=
'LEASEBACK'
then
decode(hd.je_template_code,'HL_REPURCHASE_VAT_REVERSE',
nvl(ccc.principal,
0)
-
(select
nvl(sum(cw.write_off_principal),
0)
from
csh_write_off
cw,
con_contract
cc
where
cw.cashflow_id =
l.cashflow_id
and
cw.contract_id =
cc.contract_id
and
cw.write_off_date
<
cc.repurchase_date),
nvl(ccc.principal,
0)
)
else
ccc.principal
...
...
@@ -793,8 +819,16 @@ SELECT h.period_year,
and
ccc.contract_id =
cc.contract_id)
principal,
-1
*
(select
case
when
ccc.cf_item =
1
then
nvl(ccc.interest, 0)
decode(hd.je_template_code,'HL_REPURCHASE_VAT_REVERSE',
nvl(ccc.interest,
0)
-
(select
nvl(sum(cw.write_off_interest),
0)
from
csh_write_off
cw,
con_contract
cc
where
cw.cashflow_id =
l.cashflow_id
and
cw.contract_id =
cc.contract_id
and
cw.write_off_date
<
cc.repurchase_date),
nvl(ccc.interest,
0)
)
else
ccc.due_amount
end
...
...
@@ -826,7 +860,7 @@ SELECT h.period_year,
h.je_transaction_code,
l.cashflow_id,
'Y'
fixed_data_flag
FROM hls_journal_header h, hls_journal_detail l, gld_accounts ga
FROM
hls_journal_header
h,
hls_journal_detail
l,
gld_accounts
ga
,gld_je_template_hds
hd
WHERE
h.journal_header_id =
l.journal_header_id
and
h.sbo_num
is
not
null
and
h.total_amount_dr
!=
0
...
...
@@ -834,15 +868,13 @@ SELECT h.period_year,
and
ga.account_code
in
('2221001020',
'2221001023',
'2221001024')
and
h.reversed_flag =
'N'
and
h.post_gl_status =
'Y'
and
h.internal_period_num
<=
to_number(${@base_period})
and exists (select 1
from gld_je_template_hds hd
where hd.je_template_hd_id = h.je_template_hd_id
and
hd.je_template_hd_id =
h.je_template_hd_id
and
hd.je_template_code
in
('HL_CON_VAT_REVERSE_REPURCHASE',
'HL_VAT_REVERSE_REPURCHASE_LB',
'HL_CON_VAT_REVERSE_ET',
'HL_CON_VAT_REVERSE_ET_LB',
'HL_REPURCHASE_VAT_REVERSE'))
)
t1
'HL_REPURCHASE_VAT_REVERSE'))
t1
#WHERE_CLAUSE#
)
select
*
from
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment