Commit 0df1fd10 authored by taoruidan18083's avatar taoruidan18083

I-21712【建机】增值税销售额与会计收入之间的差异明细报表开发

parent 4e3605a9
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select cc.contract_number
from con_contract cc
where cc.contract_id = t.contract_id) contract_number,
(select hbm.bp_name
from hls_bp_master hbm,con_contract cc
where hbm.bp_id = cc.bp_id_tenant
and cc.contract_id=t.contract_id) bp_name_tenant,
(select cc.business_type
from con_contract cc
where cc.contract_id = t.contract_id) business_type,
(Select bt.description
From hls_business_type bt, con_contract ct
Where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) As business_type_n,
t.unearned_finance_income,
t.vat_due_amount,
t.diff_unfinance_income,
t.ad_unfinance_income,
t.deposit_value,
t.et_fund,
t.discrepancy
from tax_sales_contract_database t
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number"/>
<bm:field name="bp_name_tenant"/>
<bm:field name="business_type"/>
<bm:field name="business_type_n"/>
<bm:field name="unearned_finance_income"/>
<bm:field name="vat_due_amount"/>
<bm:field name="diff_unfinance_income"/>
<bm:field name="ad_unfinance_income"/>
<bm:field name="deposit_value"/>
<bm:field name="et_fund"/>
<bm:field name="discrepancy"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select cc.contract_number
from con_contract cc
where cc.contract_id = t.contract_id) contract_number,
(select hbm.bp_name
from hls_bp_master hbm, con_contract cc
where hbm.bp_id = cc.bp_id_tenant
and cc.contract_id = t.contract_id) bp_name_tenant,
(select cc.business_type
from con_contract cc
where cc.contract_id = t.contract_id) business_type,
(Select bt.description
From hls_business_type bt, con_contract ct
Where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) As business_type_n,
t.times,
t.ad_unfinance_income,
to_char(t.due_date, 'yyyy/mm/dd') due_date,
to_char(t.last_received_date, 'yyyy/mm/dd') last_received_date,
to_char(t.last_write_off_date, 'yyyy/mm/dd') last_write_off_date,
to_char(t.calc_start_date, 'yyyy/mm/dd') calc_start_date,
to_char(t.calc_end_date, 'yyyy/mm/dd') calc_end_date
from tax_sales_income_temp t
where t.data_source = 'ADVANCE_INCOME'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number"/>
<bm:field name="bp_name_tenant"/>
<bm:field name="business_type"/>
<bm:field name="business_type_n"/>
<bm:field name="times"/>
<bm:field name="ad_unfinance_income"/>
<bm:field name="due_date"/>
<bm:field name="last_received_date"/>
<bm:field name="last_write_off_date"/>
<bm:field name="calc_start_date"/>
<bm:field name="calc_end_date"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select cc.contract_number
from con_contract cc
where cc.contract_id = t.contract_id) contract_number,
(select hbm.bp_name
from hls_bp_master hbm, con_contract cc
where hbm.bp_id = cc.bp_id_tenant
and cc.contract_id = t.contract_id) bp_name_tenant,
t.business_type,
(select bt.description
from hls_business_type bt, con_contract ct
where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) as business_type_n,
t.sbo_num,
t.journal_num,
to_char(t.journal_date, 'yyyy/mm/dd') journal_date,
(select ga.account_code
from gld_accounts ga
where ga.account_id = t.account_id) account_code,
(select b.description_text
from fnd_descriptions b, gld_accounts ga
where b.description_id = ga.description_id
and ga.account_id = t.account_id
and b.ref_table = 'GLD_ACCOUNTS'
and b.ref_field = 'DESCRIPTION_ID'
and b.language = userenv('LANG')) as description,
t.deposit_value,
t.bp_code_tenant
from tax_sales_income_temp t
where t.data_source = 'DATABASE_DEPOSIT'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number"/>
<bm:field name="bp_name_tenant"/>
<bm:field name="business_type"/>
<bm:field name="business_type_n"/>
<bm:field name="sbo_num"/>
<bm:field name="journal_date"/>
<bm:field name="journal_num"/>
<bm:field name="account_code"/>
<bm:field name="description"/>
<bm:field name="deposit_value"/>
<bm:field name="bp_code_tenant"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select cc.contract_number
from con_contract cc
where cc.contract_id = t.contract_id) contract_number,
(select hbm.bp_name
from hls_bp_master hbm, con_contract cc
where hbm.bp_id = cc.bp_id_tenant
and cc.contract_id = t.contract_id) bp_name_tenant,
(select cc.business_type
from con_contract cc
where cc.contract_id = t.contract_id) business_type,
(select bt.description
from hls_business_type bt, con_contract ct
where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) as business_type_n,
t.sbo_num,
t.journal_num,
to_char(t.journal_date, 'yyyy/mm/dd') journal_date,
(select ga.account_code
from gld_accounts ga
where ga.account_id = t.account_id) account_code,
(select b.description_text
from fnd_descriptions b, gld_accounts ga
where b.description_id = ga.description_id
and ga.account_id = t.account_id
and b.ref_table = 'GLD_ACCOUNTS'
and b.ref_field = 'DESCRIPTION_ID'
and b.language = userenv('LANG')) as description,
t.et_fund,
t.bp_code_tenant
from tax_sales_income_temp t
where t.data_source = 'ET_FUND'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number"/>
<bm:field name="bp_name_tenant"/>
<bm:field name="business_type"/>
<bm:field name="business_type_n"/>
<bm:field name="sbo_num"/>
<bm:field name="et_fund"/>
<bm:field name="journal_date"/>
<bm:field name="journal_num"/>
<bm:field name="account_code"/>
<bm:field name="description"/>
<bm:field name="bp_code_tenant"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select cc.contract_number
from con_contract cc
where cc.contract_id = t.contract_id) contract_number,
(select hbm.bp_name
from hls_bp_master hbm,con_contract cc
where hbm.bp_id = cc.bp_id_tenant
and cc.contract_id=t.contract_id) bp_name_tenant,
(select cc.business_type
from con_contract cc
where cc.contract_id = t.contract_id) business_type,
(Select bt.description
From hls_business_type bt, con_contract ct
Where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) As business_type_n,
t.times,
t.diff_unfinance_income,
to_char(t.due_date, 'yyyy/mm/dd') due_date,
to_char(t.last_received_date, 'yyyy/mm/dd') last_received_date,
to_char(t.last_write_off_date, 'yyyy/mm/dd') last_write_off_date,
to_char(t.calc_start_date, 'yyyy/mm/dd') calc_start_date,
to_char(t.calc_end_date, 'yyyy/mm/dd') calc_end_date
from tax_sales_income_temp t
where t.data_source = 'DATABASE_INCOME'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number"/>
<bm:field name="bp_name_tenant"/>
<bm:field name="business_type"/>
<bm:field name="business_type_n"/>
<bm:field name="times"/>
<bm:field name="diff_unfinance_income"/>
<bm:field name="due_date"/>
<bm:field name="last_received_date"/>
<bm:field name="last_write_off_date"/>
<bm:field name="calc_start_date"/>
<bm:field name="calc_end_date"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-15 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
tax_sales_income_pkg.insert_tax_sale_income_job(
p_period_name_from =>${@period_name_from},
p_period_name_to =>${@period_name_to},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2025-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
tax_sales_income_pkg.query_tax_sale_income_job(p_user_id =>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment