[Home] [Help]
2072: IS
2073: CURSOR get_batch_rec
2074: IS
2075: SELECT *
2076: FROM hxt_batch_values_v
2077: WHERE (date_worked ,assignment_id) in
2078: ( SELECT date_earned,
2079: paf.assignment_id
2080: FROM hxc_bee_pref_adj_lines hoa,
2082: WHERE hoa.resource_id = paf.person_id
2083: AND hoa.date_earned BETWEEN paf.effective_start_date
2084: AND paf.effective_end_date
2085: AND paf.primary_flag = 'Y');
2086: p_batch_rec hxt_batch_values_v%ROWTYPE;
2087: l_sum_retcode NUMBER := 0;
2088: l_batch_sequence NUMBER;
2089:
2090: BEGIN
2113: -- In case the timecard is still with HXT, no need to create reversal batches.
2114: -- But see that they are deleted from the system, so that they can never be
2115: -- transferred. Delete the non transferred hours first.
2116: -- Create a batch header, and then create the batch lines taking values from
2117: -- HXT_BATCH_VALUES_V. There could have been a timecard edit in HXT, and the changed
2118: -- hours could have gone to BEE. The reversal batch lines has to reverse these, rather
2119: -- than the hours you pulled out from HXC. HXT_BATCH_VALUES_V is a view on hxt detail hours
2120: -- and pay batch lines, so what you get from there would be the transferred values.
2121: -- So after you pull out the batch records, turn around the hours with a negative sign
2115: -- transferred. Delete the non transferred hours first.
2116: -- Create a batch header, and then create the batch lines taking values from
2117: -- HXT_BATCH_VALUES_V. There could have been a timecard edit in HXT, and the changed
2118: -- hours could have gone to BEE. The reversal batch lines has to reverse these, rather
2119: -- than the hours you pulled out from HXC. HXT_BATCH_VALUES_V is a view on hxt detail hours
2120: -- and pay batch lines, so what you get from there would be the transferred values.
2121: -- So after you pull out the batch records, turn around the hours with a negative sign
2122: -- and create the lines.
2123: delete_non_transferred_hours;