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
3889d68e
Commit
3889d68e
authored
Oct 13, 2023
by
lizhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database中回租本金都改成0
parent
bd5ba7e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
28 deletions
+82
-28
con_je_vat_database_query.lwm
.../WEB-INF/classes/rpt/RPT555/con_je_vat_database_query.lwm
+82
-28
No files found.
src/main/webapp/WEB-INF/classes/rpt/RPT555/con_je_vat_database_query.lwm
View file @
3889d68e
...
...
@@ -878,35 +878,89 @@ SELECT h.period_year,
#WHERE_CLAUSE#
)
select
*
from
(
select
'合计'
tax_month,
sum(sale_amount)
sale_amount,
1
order_seq,
null
period_year,
null
period_num,
null
internal_period_num,
null
journal_date,
null
journal_num,
null
reference2,
null
line_description,
null
journal_number,
null
contract_number,
null
bp_code,
null
bp_name,
null
journal_header_id,
null
invoice_date,
sum(amount_tax)
amount_tax,
null
times,
null
due_date,
sum(due_amount)
due_amount,
sum(principal)
principal,
sum(interest)
interest,
sum(vat_due_amount)
vat_due_amount,
null
vat_rate,
null
je_transaction_code,
null
cashflow_id,
null
fixed_data_flag
from
temp
select
'合计'
tax_month,
sum(sale_amount)
sale_amount,
1
order_seq,
null
period_year,
null
period_num,
null
internal_period_num,
null
journal_date,
null
journal_num,
null
reference2,
null
line_description,
null
journal_number,
null
contract_number,
null
bp_code,
null
bp_name,
null
journal_header_id,
null
invoice_date,
sum(amount_tax)
amount_tax,
null
times,
null
due_date,
sum(decode((select
cc.business_type
from
con_contract_cashflow
ca,
con_contract
cc
where
ca.cashflow_id =
t.cashflow_id
and
ca.contract_id =
cc.contract_id),
'LEASEBACK',
due_amount
-nvl(t.principal,0),
t.due_amount))
due_amount,
sum(decode((select
cc.business_type
from
con_contract_cashflow
ca,
con_contract
cc
where
ca.cashflow_id =
t.cashflow_id
and
ca.contract_id =
cc.contract_id),
'LEASEBACK',
0,
t.principal))
principal,
sum(interest)
interest,
sum(vat_due_amount)
vat_due_amount,
null
vat_rate,
null
je_transaction_code,
null
cashflow_id,
null
fixed_data_flag
from
temp
t
union
select
*
from
temp)
data
order
by
data.order_seq
select
tax_month,
sale_amount,
order_seq,
period_year,
period_num,
internal_period_num,
journal_date,
journal_num,
reference2,
line_description,
journal_number,
contract_number,
bp_code,
bp_name,
journal_header_id,
invoice_date,
amount_tax,
times,
due_date,
decode((select
cc.business_type
from
con_contract_cashflow
ca,
con_contract
cc
where
ca.cashflow_id =
t.cashflow_id
and
ca.contract_id =
cc.contract_id),
'LEASEBACK',
due_amount
-nvl(t.principal,0),
t.due_amount)
due_amount,
decode((select
cc.business_type
from
con_contract_cashflow
ca,
con_contract
cc
where
ca.cashflow_id =
t.cashflow_id
and
ca.contract_id =
cc.contract_id),
'LEASEBACK',
0,
t.principal)
principal,
interest,
vat_due_amount,
vat_rate,
je_transaction_code,
cashflow_id,
fixed_data_flag
from
temp
t
)
data
order
by
data.order_seq
]]
></bm:query-sql>
</bm:operation>
</bm:operations>
...
...
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