Commit 9c65c675 authored by lizhe's avatar lizhe

增值税台账database

parent 1a79c299
......@@ -462,15 +462,18 @@ SELECT h.period_year,
and ah.invoice_kind in ('0', '2')
AND to_char(ah.invoice_date,'yyyymm') <= ${@base_period}
and ah.invoice_status = 'CONFIRM'),0) vat_due_amount,
(select
case when nvl(ccc.interest,0)!=0 then
round(ccc.vat_interest/ccc.interest,2)
when nvl(ccc.due_amount-ccc.vat_due_amount,0)!=0 then
round(ccc.vat_due_amount/(ccc.due_amount-ccc.vat_due_amount),2)
else
null
end
from con_contract_cashflow ccc where ccc.cashflow_id=l.cashflow_id) vat_rate,
(select case
when nvl(ccc.interest, 0) != 0 and (ccc.interest -ccc.vat_interest) != 0 then
round(ccc.vat_interest / (ccc.interest -ccc.vat_interest), 2)
when nvl(ccc.due_amount - ccc.vat_due_amount, 0) != 0 then
round(ccc.vat_due_amount /
(ccc.due_amount - ccc.vat_due_amount),
2)
else
null
end
from con_contract_cashflow ccc
where ccc.cashflow_id = l.cashflow_id) vat_rate,
h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l,gld_accounts ga
......
......@@ -496,15 +496,18 @@ SELECT h.period_year,
and ah.invoice_kind in ('0', '2')
AND to_char(ah.invoice_date,'yyyymm') <= ${@base_period}
and ah.invoice_status = 'CONFIRM'),0) vat_due_amount,
(select
case when nvl(ccc.interest,0)!=0 then
round(ccc.vat_interest/ccc.interest,2)
when nvl(ccc.due_amount-ccc.vat_due_amount,0)!=0 then
round(ccc.vat_due_amount/(ccc.due_amount-ccc.vat_due_amount),2)
else
null
end
from con_contract_cashflow ccc where ccc.cashflow_id=l.cashflow_id) vat_rate,
(select case
when nvl(ccc.interest, 0) != 0 and (ccc.interest -ccc.vat_interest) != 0 then
round(ccc.vat_interest / (ccc.interest -ccc.vat_interest), 2)
when nvl(ccc.due_amount - ccc.vat_due_amount, 0) != 0 then
round(ccc.vat_due_amount /
(ccc.due_amount - ccc.vat_due_amount),
2)
else
null
end
from con_contract_cashflow ccc
where ccc.cashflow_id = l.cashflow_id) vat_rate,
h.je_transaction_code,
l.cashflow_id,
'N' fixed_data_flag
......
......@@ -69,5 +69,7 @@
<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="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-field name="journal_date_f" queryExpression="to_char(t1.je_date,'yyyy-mm-dd') &gt;= ${@journal_date_f}"/>
<bm:query-field name="journal_date_t" queryExpression="to_char(t1.je_date,'yyyy-mm-dd') &lt;= ${@journal_date_t}"/>
</bm:query-fields>
</bm:model>
......@@ -42,6 +42,12 @@
$(grid_ds_id_before_6).query();
$(grid_ds_id_current).query();
$(grid_ds_id_current_6).query();*/
//新增database tab页
var grid_ds_id_database = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_DATABASE_RESULT', 'con_contract');
$(grid_ds_id_database).setQueryDataSet($(form_ds_id));
$(grid_ds_id_database).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_database_query/query');
Leaf.Masker.mask(detail_mask, '正在保存中。。。');
Leaf.request({
url: $('process_vat_account_data_link').getUrl(),
......@@ -56,6 +62,7 @@
$(grid_ds_id_before_6).query();
$(grid_ds_id_current).query();
$(grid_ds_id_current_6).query();
$(grid_ds_id_database).query();
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
......
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