Commit 51bf8ca7 authored by 王炜's avatar 王炜

增值税台账-日立返还金调整

parent 49238652
...@@ -39,18 +39,20 @@ ...@@ -39,18 +39,20 @@
t.created_by, t.created_by,
t.creation_date, t.creation_date,
t.last_updated_by, t.last_updated_by,
t.last_update_date t.last_update_date,
t.tax_type_rate
FROM vat_account_tmp t FROM vat_account_tmp t
WHERE t.session_id=${/session/@session_id} WHERE t.session_id=${/session/@session_id}
) t1 ) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by invoice_hd_id,due_date ASC,invoice_number asc --order by invoice_hd_id,due_date ASC,invoice_line_id asc
order by invoice_hd_id, invoice_number asc, due_date ASC
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
BEGIN BEGIN
acr_invoice_pkg.vat_account_data_process(p_base_period => ${@base_period}, hl_cm_vat_report_pkg.vat_account_data_process(p_base_period => ${@base_period},
p_session_id => ${/session/@session_id}, p_session_id => ${/session/@session_id},
p_user_id => ${/session/@user_id} ); p_user_id => ${/session/@user_id} );
END; END;
...@@ -58,14 +60,14 @@ ...@@ -58,14 +60,14 @@
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters> <bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="to_char(t1.invoice_date,'yyyymm') = ${@base_period}"/>--> <!-- <bm:data-filter enforceOperations="query" expression="to_char(t1.invoice_date,'yyyymm') = ${@base_period}"/>-->
</bm:data-filters> </bm:data-filters>
<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="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/> <bm:query-field name="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/>
<!-- <bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>--> <!-- <bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>-->
<bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/> <bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/> <bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="vat_6_flag" queryExpression="((${@vat_6_flag}='Y' and t1.tax_type_rate=0.06) or(${@vat_6_flag}!='Y' and t1.tax_type_rate!=0.06))"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
var override_queryfields = [
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.journal_date,'yyyymm') < ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: "t1.journal_date <= add_months(last_day(to_date(${@base_period},'yyyymm')),-1) and (t1.invoice_date is null or t1.invoice_date >= TRUNC(to_date(${@base_period},'yyyymm'),'dd'))"
}];
override();
add_datafilter();
\ No newline at end of file
var override_queryfields = [
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.journal_date,'yyyymm') = ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: " to_char(t1.journal_date,'yyyymm') = ${@base_period} and (t1.invoice_date is null or to_char(t1.invoice_date,'yyyymm') < ${@base_period})"
}];
override();
add_datafilter();
\ No newline at end of file
var override_queryfields = [
{
name: 'invoice_kind',
queryexpression: "t1.invoice_kind = ${@invoice_kind}"
},
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.je_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'invoice_date',
queryexpression: "to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.je_date,'yyyymm') <= ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: "to_char(t1.invoice_date,'yyyymm') = ${@base_period}"
}];
override();
add_datafilter();
\ No newline at end of file
...@@ -15,19 +15,33 @@ ...@@ -15,19 +15,33 @@
//查询数据 //查询数据
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds'; var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
//var grid_ds_id_before = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT', 'con_contract');
// var grid_ds_id_current = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT', 'con_contract');
var grid_ds_id_total = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SUM_RESULT', 'con_contract');
var grid_vat_6_ds_id_total = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SUM_RESULT_6', 'con_contract');
var grid_ds_id_before = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT', 'con_contract'); var grid_ds_id_before = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT', 'con_contract');
var grid_ds_id_before_6 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT_6', 'con_contract');
var grid_ds_id_current = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT', 'con_contract'); var grid_ds_id_current = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT', 'con_contract');
var grid_ds_id_total = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SUM_RESULT', 'con_contract'); var grid_ds_id_current_6 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT_6', 'con_contract');
$(grid_ds_id_before).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_query/query');
$(grid_ds_id_current).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_current_query/query'); $(grid_ds_id_before).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_query/query?vat_6_flag=N');
$(grid_ds_id_before_6).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_query/query?vat_6_flag=Y');
$(grid_ds_id_current).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_current_query/query?vat_6_flag=N');
$(grid_ds_id_current_6).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_current_query/query?vat_6_flag=Y');
//先进行数据的处理 //先进行数据的处理
$(grid_ds_id_total).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_total_query/query'); $(grid_ds_id_total).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_total_query/query?vat_6_flag=N');
$(grid_vat_6_ds_id_total).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_total_query/query?vat_6_flag=Y');
var detail_mask = Ext.getBody(); var detail_mask = Ext.getBody();
$(grid_ds_id_before).setQueryDataSet($(form_ds_id)); // $(grid_ds_id_before).setQueryDataSet($(form_ds_id));
$(grid_ds_id_current).setQueryDataSet($(form_ds_id)); // $(grid_ds_id_current).setQueryDataSet($(form_ds_id));
$(grid_ds_id_total).setQueryDataSet($(form_ds_id)); $(grid_ds_id_total).setQueryDataSet($(form_ds_id));
$(grid_ds_id_total).setQueryParameter('vat_6_flag','N');
$(grid_vat_6_ds_id_total).setQueryDataSet($(form_ds_id));
$(grid_vat_6_ds_id_total).setQueryParameter('vat_6_flag','Y');
$(grid_ds_id_before).query(); $(grid_ds_id_before).query();
$(grid_ds_id_before_6).query();
$(grid_ds_id_current).query(); $(grid_ds_id_current).query();
$(grid_ds_id_current_6).query();
Leaf.Masker.mask(detail_mask, '正在保存中。。。'); Leaf.Masker.mask(detail_mask, '正在保存中。。。');
Leaf.request({ Leaf.request({
url: $('process_vat_account_data_link').getUrl(), url: $('process_vat_account_data_link').getUrl(),
...@@ -36,8 +50,9 @@ ...@@ -36,8 +50,9 @@
tmp_date: new Date() tmp_date: new Date()
}, },
success: function () { success: function () {
Leaf.Masker.unmask(detail_mask);
$(grid_ds_id_total).query(); $(grid_ds_id_total).query();
$(grid_vat_6_ds_id_total).query();
Leaf.Masker.unmask(detail_mask);
}, },
failure: function () { failure: function () {
Leaf.Masker.unmask(detail_mask); Leaf.Masker.unmask(detail_mask);
......
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