Commit af0bf72c authored by 38823's avatar 38823

销项发票(经租)初版开发

parent 62927ff5
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
hbm.REF_V07 description, hbm.REF_V07 description,
nvl(hbm.invoice_title, hbm.bp_name) invoice_title, nvl(hbm.invoice_title, hbm.bp_name) invoice_title,
(hbm.invoice_bp_address || '' || hbm.invoice_bp_phone_num) invoice_bp_address_phone_num, (hbm.invoice_bp_address || '' || hbm.invoice_bp_phone_num) invoice_bp_address_phone_num,
(hbm.invoice_bp_bank || ' ' || hbm.invoice_bp_bank_account) invoice_bp_bank_account, (hbm.invoice_bp_bank || '' || hbm.invoice_bp_bank_account) invoice_bp_bank_account,
hbm.tax_registry_num tax_registry_num, hbm.tax_registry_num tax_registry_num,
cc.document_type, cc.document_type,
t2.cashflow_id, t2.cashflow_id,
...@@ -141,15 +141,12 @@ ...@@ -141,15 +141,12 @@
and hbm.bp_id = t2.bill_object_bp_id and hbm.bp_id = t2.bill_object_bp_id
and nvl(t2.billing_status, 'NOT') != 'FULL' and nvl(t2.billing_status, 'NOT') != 'FULL'
--合同状态为结束中(不论是否做过提前结清或解约回购)、提前结清中、提前结清完成、正常结清的合同 --合同状态为结束中(不论是否做过提前结清或解约回购)、提前结清中、提前结清完成、正常结清的合同
and and ((t2.cf_item = 2 and cc.division !='95' and cc.payment_deduction in ('TRI_AGREEMENT','TRADE_IN')
((t2.cf_item = 2 and cc.payment_deduction in ('TRI_AGREEMENT','TRADE_IN')
and ((cc.contract_status in ('TERMINATING', 'ETING','ET','INCEPT', 'TERMINATE','REPURING','REPUR') and hbm.invoice_method = 'BILLING') and ((cc.contract_status in ('TERMINATING', 'ETING','ET','INCEPT', 'TERMINATE','REPURING','REPUR') and hbm.invoice_method = 'BILLING')
or (cc.contract_status in ('TERMINATING', 'ETING', 'ETING', 'TERMINATE') and hbm.invoice_method = 'NO_BILLING')) or (cc.contract_status in ('TERMINATING', 'ETING', 'ETING', 'TERMINATE') and hbm.invoice_method = 'NO_BILLING'))
) )
or (cc.division !='95' and cc.contract_status in
or ('TERMINATING', 'ETING', 'ETING', 'TERMINATE')
(cc.contract_status in
('TERMINATING', 'ET', 'ETING', 'TERMINATE')
--合同状态为起租做过承租人变更的合同 --合同状态为起租做过承租人变更的合同
or or
(cc.contract_status = 'INCEPT' and t2.document_type = 'LEASE_CHAG' and (cc.contract_status = 'INCEPT' and t2.document_type = 'LEASE_CHAG' and
...@@ -199,12 +196,12 @@ ...@@ -199,12 +196,12 @@
(cc.contract_status = 'INCEPT' and (cc.contract_status = 'INCEPT' and
trunc(t2.due_date) >= trunc(nvl(cc.CCR_LEASE_DATE, t2.due_date)) and trunc(t2.due_date) >= trunc(nvl(cc.CCR_LEASE_DATE, t2.due_date)) and
hbm.taxpayer_type = 'SMALL_SCALE_TAXPAYER' and hbm.taxpayer_type = 'SMALL_SCALE_TAXPAYER' and
hbm.invoice_method = 'BILLING' hbm.invoice_method = 'BILLING' and
and trunc(t2.due_date) <= trunc(sysdate))
nvl(t2.write_off_flag, 'NOT') = 'FULL' --产品线为经营性租赁,并且全部核销
/* and or
trunc(t2.due_date) <= trunc(sysdate)*/ (cc.division = '95' and nvl(t2.write_off_flag,'NOT') = 'FULL')
))) ))
--合同状态为起租→开票对象:一般纳税人(法人),小规模纳税人(法人)和深圳美鹏HCS小规模纳税人(自然人)→暂不开票→暂不展示 --合同状态为起租→开票对象:一般纳税人(法人),小规模纳税人(法人)和深圳美鹏HCS小规模纳税人(自然人)→暂不开票→暂不展示
and not exists and not exists
(select 1 (select 1
...@@ -355,6 +352,8 @@ ...@@ -355,6 +352,8 @@
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/> <bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/> <bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="vv.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/> <bm:query-field name="full_elec_invoice_flag" queryExpression="vv.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="search_term_1" queryExpression="vv.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="pur_number" queryExpression="vv.pur_number = ${@pur_number}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/> <bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/> <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
<bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="HLS.PROJECT_NUMBER"/> <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="HLS.PROJECT_NUMBER"/>
<bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="HLS.PROJECT_NAME"/> <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="HLS.PROJECT_NAME"/>
<bm:field name="product_name_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRODUCT_NAME_DESC" forInsert="false" forUpdate="false"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/> <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HLS.CONTRACT_NUMBER"/> <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HLS.CONTRACT_NUMBER"/>
<bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="HLS.CONTRACT_NAME"/> <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="HLS.CONTRACT_NAME"/>
...@@ -100,7 +101,8 @@ ...@@ -100,7 +101,8 @@
(select i.description (select i.description
from hls_cashflow_item i from hls_cashflow_item i
where i.cf_item = t.cf_item) as cf_item_desc, where i.cf_item = t.cf_item) as cf_item_desc,
decode(con.contract_number,'HLL23120001','租赁费',decode(t.cf_item,250,'设备款','融资租赁费')) as product_name, decode(con.division,95,'*经营租赁*',decode(t.cf_item,250,'融资租赁挖掘机','融资租赁费')) as product_name,
decode(con.division,95,'*经营租赁*',decode(t.cf_item,250,'融资租赁挖掘机','融资租赁费')) as product_name_desc,
con.contract_status contract_status, con.contract_status contract_status,
cf.cf_status cf_status, cf.cf_status cf_status,
t.invoice_kind_type, t.invoice_kind_type,
...@@ -124,6 +126,7 @@ ...@@ -124,6 +126,7 @@
decode(con.division,95,'高空作业平台','') as pur_model, decode(con.division,95,'高空作业平台','') as pur_model,
decode(con.division,95,'台','') as pur_unit, decode(con.division,95,'台','') as pur_unit,
con.business_type, con.business_type,
(select v.code_value_name from sys_code_values_v v where v.code = 'BUSINESS_TYPE' and v.code_value = con.business_type) business_type_desc,
t.full_elec_invoice_flag, t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n (select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT * SELECT *
FROM (SELECT t1.invoice_hd_id, FROM (SELECT t1.invoice_hd_id,
t1.description,
t1.document_number, t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date, TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category, t1.document_category,
......
...@@ -118,6 +118,8 @@ ...@@ -118,6 +118,8 @@
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/> <bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/> <bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/> <bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/> <bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="acr515_invoice_hd_v" defaultOrderBy=""> <bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="acr515_invoice_hd_op_v" defaultOrderBy="">
<bm:fields> <bm:fields>
<bm:field name="invoice_hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_HD_ID"/> <bm:field name="invoice_hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_HD_ID"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/> <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
......
...@@ -118,6 +118,10 @@ ...@@ -118,6 +118,10 @@
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/> <bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/>
<bm:field name="full_elec_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" /> <bm:field name="full_elec_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/> <bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="business_type_n_desc" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="pur_number" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/> <bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
...@@ -146,7 +150,7 @@ ...@@ -146,7 +150,7 @@
<bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/> <bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/> <bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/> <bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="invoice_apply_num" queryExpression="(exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/> <bm:query-field name="invoice_apply_num" queryExpression="( exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/> <bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/> <bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/> <bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
al.cashflow_id, al.cashflow_id,
al.cf_item, al.cf_item,
ah.document_number, ah.document_number,
(Select c.contract_number (Select c.contract_number
From con_contract c From con_contract c
Where c.contract_id = ah.contract_id) contract_number, Where c.contract_id = ah.contract_id) contract_number,
...@@ -56,13 +57,12 @@ ...@@ -56,13 +57,12 @@
From con_contract_cashflow t From con_contract_cashflow t
Where t.cashflow_id = al.cashflow_id)) times, Where t.cashflow_id = al.cashflow_id)) times,
nvl((Select to_char(h.journal_date, 'yyyy-mm') (Select to_char(h.journal_date, 'yyyy-mm')
From hls_journal_header h, hls_journal_detail l From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9)) and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1),(select to_char(t.invoice_date, 'yyyymm') And rownum = 1) journal_month,
from acr_invoice_hd t where t.invoice_hd_id=ah.invoice_hd_id)) journal_month,
(Select h.sbo_num (Select h.sbo_num
From hls_journal_header h, hls_journal_detail l From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id Where h.journal_header_id = l.journal_header_id
...@@ -122,15 +122,32 @@ ...@@ -122,15 +122,32 @@
and ctr.paid_byother_flag='T' and ctr.paid_byother_flag='T'
and cw.cf_item<>2 and cw.cf_item<>2
and nvl(ctr.guarantor_name_duty,'N')='N')paid_byother_sum_flag, and nvl(ctr.guarantor_name_duty,'N')='N')paid_byother_sum_flag,
(select aw.product_name from acr_invoice_batch_ln_wfl aw
where ah.invoice_hd_wfl_id = aw.invoice_hd_wfl_id
and rownum =1) product_name_n,
(select v.code_value_id from sys_code_values_v v
where
v.code = 'ACR510_PRODUCT_NAME'
And v.code_value = (select aw.product_name from acr_invoice_batch_ln_wfl aw
where ah.invoice_hd_wfl_id = aw.invoice_hd_wfl_id
and rownum =1)
and v.code_enabled_flag = 'Y'
and v.code_value_enabled_flag = 'Y') product_name_order,
null attachment null attachment
From acr_invoice_apply aa, From acr_invoice_apply aa,
acr_invoice_hd_wfl ah, acr_invoice_hd_wfl ah,
acr_invoice_ln_wfl al, acr_invoice_ln_wfl al,
con_contract_cashflow cwo con_contract_cashflow cwo,
sys_code_values_v v
Where aa.invoice_apply_id = ah.invoice_apply_id Where aa.invoice_apply_id = ah.invoice_apply_id
And ah.invoice_hd_wfl_id = al.invoice_hd_wfl_id And ah.invoice_hd_wfl_id = al.invoice_hd_wfl_id
And al.cashflow_id = cwo.cashflow_id(+) And al.cashflow_id = cwo.cashflow_id(+)
order by cwo.contract_id desc, cwo.times asc) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE# and v.code = 'ACR510_PRODUCT_NAME'
And v.code_value = al.product_name
and v.code_enabled_flag = 'Y'
and v.code_value_enabled_flag = 'Y'
order by product_name_order asc,cwo.contract_id desc,cwo.times asc) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
...@@ -146,9 +163,11 @@ ...@@ -146,9 +163,11 @@
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/> <bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="pur_contract_number" queryExpression="t1.pur_contract_number = ${@pur_contract_number}"/>
<bm:query-field name="bp_code" queryExpression="t1.bp_code = ${@bp_code}"/> <bm:query-field name="bp_code" queryExpression="t1.bp_code = ${@bp_code}"/>
<bm:query-field name="journal_month" queryExpression="t1.journal_month = ${@journal_month}"/> <bm:query-field name="journal_month" queryExpression="t1.journal_month = ${@journal_month}"/>
<bm:query-field name="paid_byother_flag_n" queryExpression="t1.paid_byother_flag = ${@paid_byother_flag}"/> <bm:query-field name="paid_byother_flag_n" queryExpression="t1.paid_byother_flag = ${@paid_byother_flag}"/>
<bm:query-field name="product_name_n" queryExpression="t1.product_name_n = ${@product_name_n}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_apply_id = ${@invoice_apply_id}"/> <bm:data-filter enforceOperations="query" expression="t1.invoice_apply_id = ${@invoice_apply_id}"/>
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
function createScreen_create() function createScreen_create()
{ {
debugger;
var message_flag =false; var message_flag =false;
var win = $('acr_invoice_create_invoice'); var win = $('acr_invoice_create_invoice');
var ds=$('headDs'); var ds=$('headDs');
...@@ -55,6 +54,7 @@ ...@@ -55,6 +54,7 @@
//判断本次开票金额是否为租金,本金,和利息之中某一个 //判断本次开票金额是否为租金,本金,和利息之中某一个
var selectedDs=$('selectedDs').getAll(); var selectedDs=$('selectedDs').getAll();
for(var i=0;i<selectedDs.length;i++){ for(var i=0;i<selectedDs.length;i++){
debugger;
var billing_amount=selectedDs[i].get('billing_amount'); var billing_amount=selectedDs[i].get('billing_amount');
var due_amount=selectedDs[i].get('due_amount'); var due_amount=selectedDs[i].get('due_amount');
var principal=selectedDs[i].get('principal'); var principal=selectedDs[i].get('principal');
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
//add by gzj 售后回租只能开普票 //add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_type'); var business_type= selectedDs[i].get('business_type');
var kind_type=selectedDs[i].get('invoice_kind_type'); var kind_type=selectedDs[i].get('invoice_kind_type');
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){ if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL')){
Leaf.showMessage("提示","售后回租只能开普通发票!"); Leaf.showMessage("提示","售后回租只能开普通发票!");
return; return;
} }
if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){ if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){
message_flag =true; message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!"); // Leaf.showMessage("提示","回租建议选择增值税电子普票!");
} }
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!"); $L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return; return;
} }
//全电发票只能选择电子增值税普通发票和电子增值税专用发票 //全电发票只能选择电子增值税普通发票和电子增值税专用发票
var full_elec_invoice_flag= selectedDs[i].get('full_elec_invoice_flag'); var full_elec_invoice_flag= selectedDs[i].get('full_elec_invoice_flag');
if(full_elec_invoice_flag=='Y'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='ELECTRONIC_SPECIAL')){ if(full_elec_invoice_flag=='Y'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='ELECTRONIC_SPECIAL')){
...@@ -95,8 +94,6 @@ ...@@ -95,8 +94,6 @@
return; return;
} }
} }
var datas = ds.getJsonData(); var datas = ds.getJsonData();
...@@ -108,7 +105,7 @@ ...@@ -108,7 +105,7 @@
} }
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function() Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{ {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
Leaf.request({ Leaf.request({
url: $('svcLink_create_invoice').getUrl(), url: $('svcLink_create_invoice').getUrl(),
para: datas, para: datas,
...@@ -117,7 +114,7 @@ ...@@ -117,7 +114,7 @@
createScreen_close(); createScreen_close();
contractDs_grid_query(); contractDs_grid_query();
}, },
failure: function() { failure: function(){
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
...@@ -125,7 +122,8 @@ ...@@ -125,7 +122,8 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this,
sync: true
}); });
},function (){ },function (){
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
...@@ -134,6 +132,8 @@ ...@@ -134,6 +132,8 @@
} }
function unSelect_selectedDs(ds,record){ function unSelect_selectedDs(ds,record){
record.dirty = false; record.dirty = false;
} }
...@@ -150,11 +150,6 @@ ...@@ -150,11 +150,6 @@
if (records[i].get('invoice_kind') && records[i].get('invoice_kind')=='RECEIPT' && records[i].get('cf_item') && records[i].get('cf_item')=='51') { if (records[i].get('invoice_kind') && records[i].get('invoice_kind')=='RECEIPT' && records[i].get('cf_item') && records[i].get('cf_item')=='51') {
records[i].set('product_name','保证金'); records[i].set('product_name','保证金');
} }
if(records[i].get('invoice_kind_type')=='RECEIPT'){
records[i].getField('invoice_kind_type').setReadOnly(true);
records[i].getField('invoice_kind_type_n').setReadOnly(true);
}
} }
} }
...@@ -172,6 +167,7 @@ ...@@ -172,6 +167,7 @@
}; };
function onUpdate_selectedDs(ds,record,name,value,oldvalue){ function onUpdate_selectedDs(ds,record,name,value,oldvalue){
if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){ if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){
Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() { Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() {
...@@ -190,6 +186,7 @@ ...@@ -190,6 +186,7 @@
<a:dataSet id="invoiceKindDs"> <a:dataSet id="invoiceKindDs">
<a:datas dataSource="/model/acr512_invoice_kind_type"/> <a:datas dataSource="/model/acr512_invoice_kind_type"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="product_name_ds" lookupCode="ACR510_PRODUCT_NAME"/>
<a:dataSet id="headDs" autoCreate="true"> <a:dataSet id="headDs" autoCreate="true">
<a:fields> <a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/> <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
...@@ -202,7 +199,9 @@ ...@@ -202,7 +199,9 @@
<a:dataSet id="selectedDs" autoQuery="true" bindName="line_info" bindTarget="headDs" fetchAll="true" model="acr.ACR510.acr_invoice_create" selectable="true"> <a:dataSet id="selectedDs" autoQuery="true" bindName="line_info" bindTarget="headDs" fetchAll="true" model="acr.ACR510.acr_invoice_create" selectable="true">
<a:fields> <a:fields>
<a:field name="billing_amount" required="true"/> <a:field name="billing_amount" required="true"/>
<a:field name="product_name" required="true"/> <!-- <a:field name="product_name" required="true"/>-->
<a:field name="product_name" displayField="code_value_name" options="product_name_ds" returnField="p_name" valueField="code_value"/>
<!--<a:field name="invoice_kind"/> <!--<a:field name="invoice_kind"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="invoiceKindDs" required="true" returnField="invoice_kind" valueField="code_value"/>--> <a:field name="invoice_kind_desc" displayField="code_value_name" options="invoiceKindDs" required="true" returnField="invoice_kind" valueField="code_value"/>-->
<a:field name="invoice_kind_type"/> <a:field name="invoice_kind_type"/>
...@@ -239,10 +238,13 @@ ...@@ -239,10 +238,13 @@
<a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/> <a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/>
<a:column name="times" align="right" width="40"/> <a:column name="times" align="right" width="40"/>
<a:column name="cf_item_desc"/> <a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/> <a:column name="product_name" editor="selectedDs_grid_editor_tf_box" width="150"/>
<a:column name="pur_model" prompt="规格型号" editor="selectedDs_grid_model_tf" width="130"/>
<a:column name="pur_unit" prompt="单位" editor="selectedDs_grid_unit_tf" width="40"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>--> <!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/> <a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/>
<a:column name="billing_object_name" width="150"/> <a:column name="billing_object_name" width="150"/>
<a:column name="currency_desc" align="center"/> <a:column name="currency_desc" align="center"/>
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="principal" align="right" renderer="Leaf.formatMoney"/> <a:column name="principal" align="right" renderer="Leaf.formatMoney"/>
...@@ -259,6 +261,9 @@ ...@@ -259,6 +261,9 @@
</a:events> </a:events>
</a:comboBox> </a:comboBox>
<a:textField id="selectedDs_grid_editor_tf"/> <a:textField id="selectedDs_grid_editor_tf"/>
<a:textField id="selectedDs_grid_model_tf"/>
<a:textField id="selectedDs_grid_unit_tf"/>
<a:comboBox id="selectedDs_grid_editor_tf_box"/>
<a:numberField id="selectedDs_grid_editor_nf"/> <a:numberField id="selectedDs_grid_editor_nf"/>
</a:editors> </a:editors>
</a:grid> </a:grid>
...@@ -271,7 +276,7 @@ ...@@ -271,7 +276,7 @@
<a:column name="cf_item_desc"/> <a:column name="cf_item_desc"/>
<a:column name="contract_name" width="200"/> <a:column name="contract_name" width="200"/>
<a:column name="project_number" width="150" prompt="报单编号"/> <a:column name="project_number" width="150" prompt="报单编号"/>
<!-- <a:column name="project_name" width="200" prompt="报单名称"/>--> <!-- <a:column name="project_name" width="200" prompt="报单名称"/>-->
<a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/> <a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="exchange_rate" align="right"/> <!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>--> <a:column name="exchange_rate_type_desc"/>-->
......
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
} }
function contractDs_grid_add() { function contractDs_grid_add() {
$('contractDs_grid').showEditorByRecord($('ar510n_cashflow_ds').create()); $('contractDs_grid').showEditorByRecord($('ar510n_cashflow_ds')
.create());
} }
function invoiceHd_close() { function invoiceHd_close() {
...@@ -118,6 +119,7 @@ ...@@ -118,6 +119,7 @@
function invoiceHd_confirm() { function invoiceHd_confirm() {
debugger;
Leaf.Masker.mask(Ext.getBody()); Leaf.Masker.mask(Ext.getBody());
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag'); var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag'); var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
...@@ -285,7 +287,7 @@ ...@@ -285,7 +287,7 @@
<a:dataSet id="acr510n_invoice_type_ds"> <a:dataSet id="acr510n_invoice_type_ds">
<a:datas> <a:datas>
<a:record code_value="ECT" code_value_name="电子发票"/> <a:record code_value="ECT" code_value_name="电子发票"/>
<a:record code_value="PAPER" code_value_name="数电纸质发票"/> <a:record code_value="PAPER" code_value_name="纸质发票"/>
</a:datas> </a:datas>
</a:dataSet> </a:dataSet>
<a:dataSet id="acr510n_division_ds"> <a:dataSet id="acr510n_division_ds">
...@@ -295,14 +297,10 @@ ...@@ -295,14 +297,10 @@
<a:record code_value="30" code_value_name="高空作业车"/> <a:record code_value="30" code_value_name="高空作业车"/>
<a:record code_value="40" code_value_name="其它"/> <a:record code_value="40" code_value_name="其它"/>
<a:record code_value="50" code_value_name="星邦高空作业车"/> <a:record code_value="50" code_value_name="星邦高空作业车"/>
<!--<a:record code_value="90" code_value_name="租赁二手机"/>--> <a:record code_value="90" code_value_name="租赁二手机"/>
<a:record code_value="90" code_value_name="租赁二手机(日立)"/>
<a:record code_value="91" code_value_name="神钢建机"/> <a:record code_value="91" code_value_name="神钢建机"/>
<a:record code_value="92" code_value_name="北京心诚"/> <a:record code_value="92" code_value_name="北京心诚"/>
<a:record code_value="99" code_value_name="工程机械"/> <a:record code_value="95" code_value_name="经租设备"/>
<a:record code_value="80" code_value_name="叉车"/>
<!--<a:record code_value="70" code_value_name="铁甲业务"/>-->
<a:record code_value="70" code_value_name="二手机业务"/>
</a:datas> </a:datas>
</a:dataSet> </a:dataSet>
<a:dataSet id="acr510n_invoice_method_ds"> <a:dataSet id="acr510n_invoice_method_ds">
...@@ -533,6 +531,7 @@ ...@@ -533,6 +531,7 @@
<a:hBox> <a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/> <a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
<a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/> <a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/>
</a:hBox> </a:hBox>
<!-- <a:formBody column="4" labelWidth="400"> <!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/> <a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
...@@ -614,7 +613,8 @@ ...@@ -614,7 +613,8 @@
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>--> <!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/> <a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="contract_status_desc" prompt="合同状态" align="center" width="80"/> <a:column name="contract_status_desc" prompt="合同状态" align="center" width="80"/>
<a:column name="billing_method_desc" prompt="开票规则" width="155"/> <a:column name="billing_method_desc" prompt="开票规则"
width="155"/>
<a:column name="billing_object_name" autoAdjust="false" <a:column name="billing_object_name" autoAdjust="false"
editor="contractDs_grid_editor_lov" prompt="开票对象名称" editor="contractDs_grid_editor_lov" prompt="开票对象名称"
renderer="render_contractDs_grid" showTitle="true" width="200"/> renderer="render_contractDs_grid" showTitle="true" width="200"/>
......
...@@ -204,7 +204,6 @@ ...@@ -204,7 +204,6 @@
} }
//融租开票
function acr515_invoice_post() { function acr515_invoice_post() {
...@@ -233,11 +232,11 @@ ...@@ -233,11 +232,11 @@
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}'); Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
return; return;
} }
// if ('TRANSFERED' == records[i].get('vat_interface_status')) { if ('TRANSFERED' == records[i].get('vat_interface_status')) {
// $L.showInfoMessage("提示", '所选择的单据中存在已传金税状态,请检查后重试!'); $L.showInfoMessage("提示", '所选择的单据中存在已传金税状态,请检查后重试!');
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}'); Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
// return; return;
//} }
//不同批次的发票不能同时勾选 //不同批次的发票不能同时勾选
if (invoice_apply_num0 != records[i].get('invoice_apply_num')) { if (invoice_apply_num0 != records[i].get('invoice_apply_num')) {
$L.showInfoMessage("提示", '不同批次的发票不能同时勾选!'); $L.showInfoMessage("提示", '不同批次的发票不能同时勾选!');
...@@ -528,17 +527,64 @@ ...@@ -528,17 +527,64 @@
<a:textField name="invoice_apply_num" bindTarget="acr515_invoiceVatParaDs" prompt="申请编号" <a:textField name="invoice_apply_num" bindTarget="acr515_invoiceVatParaDs" prompt="申请编号"
width="120"/> width="120"/>
<a:comboBox name="full_elec_invoice_flag_n" bindTarget="acr515_invoiceVatParaDs" width="150" prompt="是否全电发票"/> <a:comboBox name="full_elec_invoice_flag_n" bindTarget="acr515_invoiceVatParaDs" width="150" prompt="是否全电发票"/>
</a:hBox> </a:hBox>
</a:form> </a:form>
<a:tabPanel id="acr515_invoice_vat_id" marginHeight="160" marginWidth="10">
<a:tabs>
<a:tab prompt="融资租赁" width="150">
<a:grid id="acr515_invoiceVatDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="30" navBar="true" <a:grid id="acr515_invoiceVatDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="30" navBar="true"
marginHeight="200"> marginHeight="200">
<a:columns> <a:columns>
<a:column name="document_number" lock="true" width="120" renderer="acr512_document_number_render"/> <a:column name="document_number" lock="true" width="120" renderer="acr512_document_number_render"/>
<a:column name="invoice_apply_num" width="120" prompt="申请编号" lock="true"/> <a:column name="invoice_apply_num" width="120" prompt="申请编号" lock="true"/>
<a:column name="contract_number" width="120"/> <a:column name="contract_number" width="120"/>
<a:column name="business_type_n_desc" prompt="业务类型" width="150"/>
<!-- <a:column name="business_type_desc" width="80"/>-->
<!-- <a:column name="billing_way_desc" width="80" prompt="开票方式"/>-->
<!-- <a:column name="invoice_kind_desc" width="100"/>-->
<a:column name="invoice_kind_type_n" width="200" prompt="发票种类"/>
<a:column name="invoice_number" width="120"/>
<a:column name="vat_invoice_code" width="120"/>
<a:column name="invoice_date" renderer="Leaf.formatDate" width="100"/>
<a:column name="invoice_bp_code" width="100"/>
<a:column name="invoice_bp_name" autoAdjust="false" showTitle="true" width="150"/>
<a:column name="invoice_title" autoAdjust="false" footerRenderer="summaryRenderer" showTitle="true"
width="150"/>
<a:column name="total_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="return_tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="dif_tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="net_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="currency" width="80"/>
<a:column name="created_by_name" autoAdjust="false" showTitle="true" width="150" prompt="创建人"/>
<a:column name="confirmed_by_name" autoAdjust="false" showTitle="true" width="150" prompt="确认人"/>
<a:column name="invoice_status_desc" width="100"/>
<a:column name="vat_interface_status_desc" width="100"/>
<a:column name="accounting_date" renderer="Leaf.formatDate" width="100"/>
<!-- <a:column name="create_je_flag" width="60"/> -->
<a:column name="full_elec_invoice_flag_n" width="200" prompt="是否全电发票"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="经营租赁" width="150">
<a:grid id="acr515_invoiceVatOpDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="30" navBar="true"
marginHeight="200">
<a:columns>
<a:column name="document_number" lock="true" width="120" renderer="acr512_document_number_render"/>
<a:column name="invoice_apply_num" width="120" prompt="申请编号" lock="true"/>
<a:column name="contract_number" width="120"/>
<a:column name="business_type_n_desc" prompt="业务类型" width="120"/>
<a:column name="search_term_1" prompt="厂商合同编号" width="150"/>
<a:column name="pur_number" prompt="采购单编号" width="150"/>
<!-- <a:column name="business_type_desc" width="80"/>--> <!-- <a:column name="business_type_desc" width="80"/>-->
<!-- <a:column name="billing_way_desc" width="80" prompt="开票方式"/>--> <!-- <a:column name="billing_way_desc" width="80" prompt="开票方式"/>-->
<!-- <a:column name="invoice_kind_desc" width="100"/>--> <!-- <a:column name="invoice_kind_desc" width="100"/>-->
<a:column name="invoice_kind_type_n" width="200" prompt="发票种类"/> <a:column name="invoice_kind_type_n" width="200" prompt="发票种类"/>
<a:column name="invoice_number" width="120"/> <a:column name="invoice_number" width="120"/>
<a:column name="vat_invoice_code" width="120"/> <a:column name="vat_invoice_code" width="120"/>
...@@ -567,6 +613,9 @@ ...@@ -567,6 +613,9 @@
<a:column name="full_elec_invoice_flag_n" width="200" prompt="是否全电发票"/> <a:column name="full_elec_invoice_flag_n" width="200" prompt="是否全电发票"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody> </a:screenBody>
</a:view> </a:view>
</a:screen> </a:screen>
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