PAY IR56B Control Listing

Description
Categories: BI Publisher
Columns: X Hk Employer Tfn, X Hk Employer Name, X Hk Reporting Year, X Hk Reporting Year L, Name, Lname, Oname, X Hk Hkid, X Hk Sheet No, X Hk Contact ...
Application: Payroll
Source: IR56B Control Listing Report (XML)
Short Name: PAYHKCTL_XML
DB package: PAY_PAYHKCTL_XMLP_PKG
select phia.x_hk_employer_tfn,
          phia.x_hk_employer_name,
          phia.x_hk_reporting_year,
          to_number(phia.x_hk_reporting_year)-1 x_hk_reporting_year_l,
          phia.x_hk_last_name||' '||phia.x_hk_other_names Name,
          phia.x_hk_last_name Lname,
          phia.x_hk_other_names Oname,
          phia.x_hk_hkid  x_hk_hkid,
          to_char(phia.x_hk_sheet_no, '099999') x_hk_sheet_no,
          phia.x_hk_contact,
          phia.x_hk_designation,
          phia.x_hk_archive_message,
          decode(phia.x_hk_archive_message,NULL,0,1) Flag,
          decode(phia.x_hk_archive_message,NULL,0,1) GroupFlag,
          decode(phia.x_hk_archive_message,NULL,1,0) Ctr,
          NVL(phia.X_HK_IR56_A_ASG_LE_YTD,0)  X_HK_IR56_A_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_B_ASG_LE_YTD,0)  X_HK_IR56_B_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_C_ASG_LE_YTD,0)   X_HK_IR56_C_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_D_ASG_LE_YTD,0)  X_HK_IR56_D_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_E_ASG_LE_YTD,0)  X_HK_IR56_E_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_F_ASG_LE_YTD,0)  X_HK_IR56_F_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_G_ASG_LE_YTD,0)  X_HK_IR56_G_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_H_ASG_LE_YTD,0)  X_HK_IR56_H_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_I_ASG_LE_YTD,0)  X_HK_IR56_I_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_J_ASG_LE_YTD,0)  X_HK_IR56_J_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_K1_ASG_LE_YTD,0)  X_HK_IR56_K1_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_K2_ASG_LE_YTD,0)  X_HK_IR56_K2_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_K3_ASG_LE_YTD,0)  X_HK_IR56_K3_ASG_LE_YTD,
          NVL(phia.X_HK_IR56_L_ASG_LE_YTD,0)  X_HK_IR56_L_ASG_LE_YTD,
	PAY_PAYHKCTL_XMLP_PKG.cf_balance_calculationformula(decode ( phia.x_hk_archive_message , NULL , 1 , 0 ), NVL ( phia.X_HK_IR56_A_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_B_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_C_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_D_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_E_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_F_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_G_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_H_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_I_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_J_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_K1_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_K2_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_K3_ASG_LE_YTD , 0 ), NVL ( phia.X_HK_IR56_L_ASG_LE_YTD , 0 )) CF_Balance_Calculation
from
pay_hk_ir56_archives_v phia
where
--phia.archive_action_id = :P_ARCHIVE_ACTION_ID
phia.archive_action_id = :LP_ARCHIVE_ACTION_ID
and phia.x_hk_last_name is not null
order by  flag , groupflag, Lname,Oname