1046:
1047: if l_count = 1 then
1048:
1049: -- Reset the Generation Number to 0
1050: update hr_organization_information
1051: set org_information11 = '0'
1052: where organization_id = to_number(p_bg_id)
1053: and org_information_context = 'ZA_TAX_FILE_ENTITY';
1054:
1059: -- Subtract one from the number, since it will be added again in the Header
1060: l_count := l_count - 1;
1061:
1062: -- Update the Generation Number
1063: update hr_organization_information
1064: set org_information11 = to_char(l_count)
1065: where organization_id = to_number(p_bg_id)
1066: and org_information_context = 'ZA_TAX_FILE_ENTITY';
1067:
1077:
1078: -- Get the Generation Number
1079: select nvl(to_number(org_information11), 0)
1080: into l_count
1081: from hr_organization_information
1082: where organization_id = to_number(p_bg_id)
1083: and org_information_context = 'ZA_TAX_FILE_ENTITY';
1084:
1085: -- Check Test Flag
1095:
1096: end if;
1097:
1098: -- Set the Generation Number
1099: update hr_organization_information
1100: set org_information11 = to_char(l_count)
1101: where organization_id = to_number(p_bg_id)
1102: and org_information_context = 'ZA_TAX_FILE_ENTITY';
1103: