Commit 05d9f8f2 authored by stone's avatar stone

Merge branch 'feature/payment_feature' into develop

parents e0469d5c 6ceb9f8e
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool CON_CONTRACT.log
PROMPT
PROMPT CREATING TABLE TRAIN_CONFIG
PROMPT ============================
PROMPT
WHENEVER SQLERROR CONTINUE
DROP TABLE CON_CONTRACT;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK
BEGIN
alter table csh_payment_req_ln add (amount_vender number);
alter table csh_payment_req_ln add (amount_agent number);
alter table csh_payment_req_ln add (down_payment_rushoff number);
comment on column csh_payment_req_ln.amount_vender is '应付厂商金额';
comment on column csh_payment_req_ln.amount_agent is '应付代理店金额';
comment on column csh_payment_req_ln.down_payment_rushoff is '首付款抵冲金额';
end;
SPOOL OFF
EXIT
\ No newline at end of file
......@@ -11,6 +11,11 @@
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT v.contract_id,
v.vender_name,
v.vender_bank_account_id,
v.vender_bank_account_number,
v.other_payment2,
'NEW' approval_status,
v.invoice_uploaded_flag,
v.invoice_uploaded_flag_n,
v.times,
......@@ -35,7 +40,8 @@
v.bp_name,
v.bp_code,
v.applied_pay_amount,
v.residual_amount AS amount,
--v.residual_amount AS amount,
0.00 AS amount,
--v.due_amount- NVL(v.applied_pay_amount,0) AS amount,
v.bp_category_desc,
v.search_term_1,
......@@ -192,11 +198,9 @@
WHERE gc.currency_code = t.currency) currency_name,
TO_CHAR(f.due_date, 'yyyy-mm-dd') due_date,
NVL(f.due_amount, 0) - NVL(f.received_amount, 0) residual_amount,
DECODE(f.cf_item,
'62',
NULL,
NVL(${@payment_bp_id},
csh_payment_req_pkg.get_bp_id(t.contract_id))) bp_id,
(select c.bp_id_tenant
from con_contract c
where c.contract_id=t.contract_id ) bp_id,
DECODE(f.cf_item,
'62',
NULL,
......@@ -266,6 +270,46 @@
-- )price
i.price,
i.factory_price,
--获得厂商的相关信息
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id))) vender_name,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id))) vender_bank_account_id,
(select hbba.bank_account_num
from hls_bp_master_bank_account hbba
where hbba.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id)))vender_bank_account_number,
--首付款抵充金
(select nvl(hd.other_payment2,0)
from hls_fin_calculator_hd hd
where hd.calc_session_id =
(select PQ.CALC_SESSION_ID
from prj_quotation pq
where pq.document_id = (select cc.project_id
from con_contract cc
where cc.contract_id =f.contract_id)
and pq.document_category = 'PROJECT')) other_payment2,
DECODE(t.division, '10', 'CNYA', '00', 'CNYA', '01', 'CNYB') sap_bvtyp,
(SELECT v.code_value_name
FROM sys_code_values_v v
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-5-24 下午03:50:31
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1"
baseTable="CSH_PAYMENT_REQ_LN" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select c.contract_number,
c.contract_name,
hbm.bp_name,
(select times
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) times,
(select ccc.due_amount
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) due_amount,
(select description
from hls_cashflow_item hci, con_contract_cashflow ccc
where hci.cf_item = ccc.cf_item
and hci.cf_type = ccc.cf_type
and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_ID_AGENT_N,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_ID,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_NUM,
--应付我司金额
cpr.amount_agent,
cpr.amount_vender,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) vender_name,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) VENDER_BANK_ACCOUNT_ID,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) VENDER_BANK_ACCOUNT_number,
cpr.amount,
--首付款抵充金额
(select nvl(hd.other_payment2, 0)
from hls_fin_calculator_hd hd
where hd.calc_session_id =
(select PQ.CALC_SESSION_ID
from prj_quotation pq
where pq.document_id =
(select cc.project_id
from con_contract cc
where cc.contract_id = c.contract_id)
and pq.document_category = 'PROJECT')) other_payment2,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = cpr.currency_code) currency_name,
cpr.payment_req_ln_id,
cpr.payment_req_id,
cpr.payment_req_ln_type,
cpr.ref_doc_id,
cpr.ref_doc_line_id,
cpr.ref_doc_category
from csh_payment_req_ln cpr, con_contract c, hls_bp_master hbm
where cpr.ref_doc_category = 'CONTRACT'
and c.contract_id = cpr.ref_doc_id
and hbm.bp_id = c.bp_id_tenant )v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-5-24 上午11:25:41
$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
distinct vender_name
from hls_lease_item
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="vender_name" databaseType="varchar" datatype="java.lang.String" physicalName="vender_name" forDisplay="true" forQuery="true" prompt="厂商名称"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="vender_name" queryOperator="like"/>
</bm:query-fields>
</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