|
|

楼主 |
发表于 2013/6/3 17:29:36
|
显示全部楼层
function CF_STATE_TAXFormula return Number is
begin
if (:p_legal_employer is not null) then
null;
if (:p_tax_state is not null) then
if (:p_tax_state = 'ACT') then
return(pay_au_paytax_pkg.get_tax(:no_of_states,
:cs_dge_state,
:cs_dge_group_name,
:state_code,
:cs_state_taxable_income,
:le_taxable_income,
:cp_message,
:cp_ot_message,
:p_start_date,
:p_end_date,
nvl(:P_NSW,-9999)
)
);
end if;
if (:p_tax_state = 'NSW') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_NSW,-9999)));
end if;
if (:p_tax_state = 'VIC') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_VIC,-9999)));
end if;
if (:p_tax_state = 'QLD') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:p_QLD,-9999)));
end if;
if (:p_tax_state = 'SA') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state, :cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_SA,-9999)));
end if;
if (:p_tax_state = 'WA') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income ,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_WA,-9999)));
end if;
if (:p_tax_state = 'TAS') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_TAS,-9999)));
end if;
if (:p_tax_state = 'NT') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_NT,-9999)));
end if;
else /* when the state is not chosen */
if (:state_code = 'ACT') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_ACT,-9999)));
end if;
if (:state_code = 'NSW') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_NSW,-9999)));
end if;
if (:state_code = 'VIC') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_VIC,-9999)));
end if;
if (:state_code = 'QLD') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:p_QLD,-9999)));
end if;
if (:state_code = 'SA') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_SA,-9999)));
end if;
if (:state_code = 'WA') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_WA,-9999)));
end if;
if (:state_code = 'TAS') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_TAS,-9999)));
end if;
if (:state_code = 'NT') then
return (pay_au_paytax_pkg.get_tax(:no_of_states,:cs_dge_state,:cs_dge_group_name,
:state_code,:cs_state_taxable_income,:le_taxable_income,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, nvl(:P_NT,-9999)));
end if;
end if;
else /* when the legal employer is not chosen */
srw.message(888,'legal em no chosen ' );
return (pay_au_paytax_pkg.get_tax(:cs_no_of_states, :cs_dge_state, :cs_dge_group_name,
:state_code,:cs_state_taxable_income,:cs_total_taxable_income_le,
:cp_message,:cp_ot_message,:p_start_date, :p_end_date, -9999));
end if;
end;
|
|