Commit 0bcdddf7 authored by gzj34291's avatar gzj34291

发票创建新增收据类型

parent cff95230
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<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"/> <bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/> <bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
</bm:fields> </bm:fields>
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
con.project_id, con.project_id,
con.project_number, con.project_number,
con.project_name, con.project_name,
con.business_type,
t.invoice_kind, t.invoice_kind,
(SELECT v.code_value_name (SELECT v.code_value_name
FROM sys_code_values_v v FROM sys_code_values_v v
...@@ -97,7 +99,6 @@ ...@@ -97,7 +99,6 @@
and v.code_value = t.invoice_kind_type) invoice_kind_type_n, and v.code_value = t.invoice_kind_type) invoice_kind_type_n,
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
FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1 FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1
WHERE t.session_id = ${/session/@session_id} WHERE t.session_id = ${/session/@session_id}
AND t.contract_id = con.contract_id AND t.contract_id = con.contract_id
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
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');
...@@ -73,11 +74,11 @@ ...@@ -73,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')){ if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
Leaf.showMessage("提示","售后回租只能开普通发票!"); Leaf.showMessage("提示","售后回租只能开普通发票!");
return; return;
} }
if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){ if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
message_flag =true; message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!"); // Leaf.showMessage("提示","回租建议选择增值税电子普票!");
} }
...@@ -149,6 +150,11 @@ ...@@ -149,6 +150,11 @@
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);
}
} }
} }
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
{ {
var win = $('acr_invoice_create_invoice'); var win = $('acr_invoice_create_invoice');
var ds=$('headDs'); var ds=$('headDs');
var message_flag =false;
debugger
if(!ds.validate(true)) if(!ds.validate(true))
{ {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
...@@ -67,13 +69,30 @@ ...@@ -67,13 +69,30 @@
$L.showErrorMessage("提示","开票金额填写有误!"); $L.showErrorMessage("提示","开票金额填写有误!");
return; return;
} }
//add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_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')){
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
} }
var datas = ds.getJsonData(); var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认开票?',function() var message_info;
if(message_flag==false){
message_info= '是否确认开票?';
}else {
message_info= "回租建议选择增值税电子普票!是否确认开票?";
}
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{ {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
......
...@@ -115,9 +115,9 @@ ...@@ -115,9 +115,9 @@
$('acr512_invoice_query_ds').reset(); $('acr512_invoice_query_ds').reset();
} }
function acr512_grid_update(record_id, invoice_hd_id) { function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE'; var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(record_id); var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data; var param = currency_reocrd.data;
param['function_code'] = 'ACR512'; param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win'; param['winid'] = 'confirm_invoice_win';
...@@ -139,9 +139,9 @@ ...@@ -139,9 +139,9 @@
function acr512_document_number_render(value, record, name) { function acr512_document_number_render(value, record, name) {
if (name == 'document_number') { if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') { if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>'; return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else { } else {
return '<a href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>'; return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} }
} }
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
var invoice_kind = records[0].get('invoice_kind'); var invoice_kind = records[0].get('invoice_kind');
var invoice_type = records[0].get('invoice_type'); var invoice_type = records[0].get('invoice_type');
var full_elec_invoice_flag = records[0].get('full_elec_invoice_flag'); var full_elec_invoice_flag = records[0].get('full_elec_invoice_flag');
debugger
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status'); var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') { if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
...@@ -261,9 +262,15 @@ ...@@ -261,9 +262,15 @@
return; return;
} }
if(invoice_kind != records[i].get('invoice_kind')){ if(invoice_kind != records[i].get('invoice_kind')){
if(invoice_kind=='RECEIPT' || records[i].get('invoice_kind')=='RECEIPT'){
$L.showErrorMessage("提示", '收据和其它发票不能同时勾选!');
return;
}else{
$L.showErrorMessage("提示", '普票和专票不能同时勾选!'); $L.showErrorMessage("提示", '普票和专票不能同时勾选!');
return; return;
} }
}
if(invoice_type != records[i].get('invoice_type')){ if(invoice_type != records[i].get('invoice_type')){
$L.showErrorMessage("提示", '纸质发票与电子发票不能同时勾选!'); $L.showErrorMessage("提示", '纸质发票与电子发票不能同时勾选!');
return; return;
...@@ -272,7 +279,6 @@ ...@@ -272,7 +279,6 @@
$L.showErrorMessage("提示", '全电发票与非全电发票不能同时勾选!'); $L.showErrorMessage("提示", '全电发票与非全电发票不能同时勾选!');
return; return;
} }
if (invoice_hd_ids == '') { if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id'); invoice_hd_ids = records[i].get('invoice_hd_id');
} else { } else {
...@@ -517,6 +523,7 @@ ...@@ -517,6 +523,7 @@
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> --> <!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> --> <!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
<a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" width="200"/> <a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" width="200"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
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