The following lines contain the word 'select', 'insert', 'update' or 'delete':
Set the block and attribute update process flags
Based on the data sent and in the db
*/
hxc_block_attribute_update.set_process_flags
(p_blocks => p_blocks
,p_attributes => p_attributes
);
Removed any deleted attributes
*/
hxc_timecard_attribute_utils.remove_deleted_attributes
(p_attributes => p_attributes);
l_timecard_blocks.delete;
l_day_blocks.delete;
l_detail_blocks.delete;
hxc_timecard_validation.recipients_update_validation
(p_blocks => p_blocks
,p_attributes => p_attributes
,p_messages => p_messages
,p_props => p_timecard_props
,p_deposit_mode => hxc_timecard.c_save
,p_resubmit => p_resubmit
);
l_resubmit := c_delete;
p_messages.delete;
hxc_block_attribute_update.denormalize_time
(p_blocks => l_blocks
,p_mode => 'ADD'
);
p_messages.delete;
Set the block and attribute update process flags
Based on the data sent and in the db
*/
hxc_block_attribute_update.set_process_flags
(p_blocks => l_blocks
,p_attributes => l_attributes
);
Removed any effectively deleted attributes
*/
if p_cla_save = 'NO' then ------------- CLA change
hxc_timecard_attribute_utils.remove_deleted_attributes
(p_attributes => l_attributes);
hxc_block_attribute_update.denormalize_time
(p_blocks => l_blocks
,p_mode => 'REMOVE'
);
p_messages.delete;
hxc_block_attribute_update.replace_ids
(p_blocks => g_deposit_blocks
,p_attributes => g_deposit_attributes
, p_duplicate_template => FALSE
);
hxc_timecard_summary_pkg.update_summary_row
(p_timecard_id => p_timecard_id
,p_approval_item_type => p_item_type
,p_approval_process_name => p_approval_prc
,p_approval_item_key => l_item_key
);
delete_null_entries(p_timecard_id => p_timecard_id
,p_timecard_ovn => p_timecard_ovn);
g_deposit_blocks.delete;
g_deposit_attributes.delete;
g_audit_messages.delete;
g_deposit_blocks.delete;
g_deposit_attributes.delete;
g_audit_messages.delete;
transaction reference has been updated, but the user has clicked
the back button. No code should be updated in the validate phase
in OTL
*/
if(p_validate=hxc_timecard.c_yes) then
rollback;
,p_load_mode in varchar2 default c_nondelete
) return hxc_block_table_type is
cursor c_blocks
(p_tc_id in hxc_time_building_blocks.time_building_block_id%type
) is
select tbb.time_building_block_id
,tbb.object_version_number
from hxc_time_building_blocks tbb
where tbb.date_to = hr_general.end_of_time
start with (tbb.time_building_block_id = p_tc_id)
connect by prior tbb.time_building_block_id = tbb.parent_building_block_id
and prior tbb.object_version_number = tbb.parent_building_block_ovn;
if(p_load_mode = c_delete) then
--
-- Date effectively end date the block
--
l_blocks(l_block_count).date_to := fnd_date.date_to_canonical(sysdate);
select ta.time_attribute_id
,ta.attribute_category
,ta.attribute1
,ta.attribute2
,ta.attribute3
,ta.attribute4
,ta.attribute5
,ta.attribute6
,ta.attribute7
,ta.attribute8
,ta.attribute9
,ta.attribute10
,ta.attribute11
,ta.attribute12
,ta.attribute13
,ta.attribute14
,ta.attribute15
,ta.attribute16
,ta.attribute17
,ta.attribute18
,ta.attribute19
,ta.attribute20
,ta.attribute21
,ta.attribute22
,ta.attribute23
,ta.attribute24
,ta.attribute25
,ta.attribute26
,ta.attribute27
,ta.attribute28
,ta.attribute29
,ta.attribute30
,ta.bld_blk_info_type_id
,ta.object_version_number
,bbit.bld_blk_info_type
from hxc_time_attribute_usages tau, hxc_time_attributes ta, hxc_bld_blk_info_types bbit
where tau.time_building_block_id = p_building_block_id
and tau.time_building_block_ovn = p_building_block_ovn
and ta.time_attribute_id = tau.time_attribute_id
and ta.bld_blk_info_type_id = bbit.bld_blk_info_type_id;
Procedure delete_timecard
(p_mode in varchar2
,p_template in varchar2
,p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
,p_timecard_ok in out nocopy varchar2
) is
cursor c_timecard_ovn
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type) is
select tbb.object_version_number, tbb.resource_id, tbb.start_time, tbb.stop_time
from hxc_time_building_blocks tbb
where tbb.time_building_block_id = p_timecard_id
and tbb.date_to = hr_general.end_of_time;
l_delete_allowed varchar2(5) := 'FALSE';
l_blocks := load_blocks(p_timecard_id, l_timecard_ovn, c_delete);
l_messages.delete;
hxc_block_attribute_update.set_process_flags
(p_blocks => l_blocks
,p_attributes => l_attributes
);
,p_resubmit => c_delete
,p_can_deposit => l_dummy
);
hxc_deposit_checks.can_delete_template
(l_blocks(l_timecard_index).time_building_block_id
,l_messages
);
Removed following call. This is done inside delete_timecard on the
summary api.
hxc_find_notify_aprs_pkg.cancel_previous_notifications(p_timecard_id);
hxc_template_summary_api.DELETE_TEMPLATE(l_blocks(l_timecard_index).time_building_block_id);
hxc_timecard_summary_api.delete_timecard
(p_blocks => l_blocks
,p_timecard_id => p_timecard_id
);
End delete_timecard;
Procedure delete_null_entries
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
,p_timecard_ovn in hxc_time_building_blocks.object_version_number%type
)is
cursor c_null_blocks
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
) is
SELECT det.time_building_block_id ,
det.object_version_number
FROM hxc_time_building_blocks DET,
HXC_TIME_BUILDING_BLOCKS DAY
WHERE day.parent_building_block_id = p_timecard_id
AND det.parent_building_block_ovn = day.object_version_number
AND det.parent_building_block_id = day.time_building_block_id
AND det.scope = 'DETAIL'
AND det.measure IS NULL
AND det.start_time IS NULL
AND det.stop_time IS NULL;
DELETE
FROM hxc_time_building_blocks
WHERE time_building_block_id = bb_id_tab(i)
AND object_version_number = bb_ovn_tab(i);
End delete_null_entries;