[Home] [Help]
114: FROM mtl_material_transactions_temp mmtt
115: WHERE mmtt.move_order_line_id = mol_id
116: AND NOT EXISTS(
117: SELECT wdt.transaction_temp_id
118: FROM wms_dispatched_tasks wdt
119: WHERE wdt.transaction_temp_id = mmtt.transaction_temp_id
120: AND wdt.transaction_temp_id IS NOT NULL
121: AND wdt.transaction_temp_id <> p_temp_id);
122:
166: x_ret_value := 0;
167:
168: SELECT COUNT(transaction_temp_id)
169: INTO cnt
170: FROM wms_dispatched_tasks
171: WHERE transaction_temp_id = p_temp_id;
172:
173: IF (cnt IN(0, -1)) THEN
174: x_ret_value := 0;
296: IF (l_debug = 1) THEN
297: mydebug('updated mol:' || mol_id);
298: END IF;
299:
300: DELETE wms_dispatched_tasks
301: WHERE transaction_temp_id = p_temp_id;
302:
303: IF (l_debug = 1) THEN
304: mydebug('deleted from wms_dispatched_tasks ');
300: DELETE wms_dispatched_tasks
301: WHERE transaction_temp_id = p_temp_id;
302:
303: IF (l_debug = 1) THEN
304: mydebug('deleted from wms_dispatched_tasks ');
305: END IF;
306:
307: SELECT COUNT(transaction_temp_id)
308: INTO cnt
492: , content_lpn_id = NULL
493: , transfer_lpn_id = NULL
494: WHERE transaction_temp_id = p_temp_id;
495:
496: DELETE wms_dispatched_tasks
497: WHERE transaction_temp_id = p_temp_id;
498:
499: IF (l_debug = 1) THEN
500: mydebug('deleted WDT with temp_id ' || p_temp_id);
2270: l_deleted_quantity NUMBER := 0;
2271:
2272: CURSOR c_wdt_dispatched IS
2273: SELECT transaction_temp_id, device_request_id
2274: FROM wms_dispatched_tasks
2275: WHERE person_id = p_emp_id
2276: AND(status <= 3 OR status = 9)
2277: AND device_request_id IS NOT NULL;
2278:
2291: AND NOT EXISTS(SELECT 1
2292: FROM mtl_material_transactions_temp t1
2293: WHERE t1.parent_line_id = mmtt.transaction_temp_id)
2294: AND NOT EXISTS(SELECT 1
2295: FROM wms_dispatched_tasks wdt
2296: WHERE wdt.transaction_temp_id = mmtt.transaction_temp_id);
2297:
2298: CURSOR c_get_mmtt_count IS
2299: SELECT count(*)
2339: ROLLBACK; --bug#2458131
2340:
2341: -- Making all dispatched and active (Patchset I) tasks to pending tasks assigned to this user
2342: -- bug 3602199 keep queued tasks as queued and dont delete wdt
2343: -- DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9);
2344: if(p_previous_task_status = 2/*queued*/) then
2345: DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9) and transaction_temp_id <> p_temp_id;
2346: update wms_dispatched_tasks set status = 2 where transaction_temp_id = p_temp_id and person_id = p_emp_id;
2347: /* mydebug('Rows update in wdt 3602199' || SQL%ROWCOUNT);*/
2341: -- Making all dispatched and active (Patchset I) tasks to pending tasks assigned to this user
2342: -- bug 3602199 keep queued tasks as queued and dont delete wdt
2343: -- DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9);
2344: if(p_previous_task_status = 2/*queued*/) then
2345: DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9) and transaction_temp_id <> p_temp_id;
2346: update wms_dispatched_tasks set status = 2 where transaction_temp_id = p_temp_id and person_id = p_emp_id;
2347: /* mydebug('Rows update in wdt 3602199' || SQL%ROWCOUNT);*/
2348: else/*old code*/
2349: DELETE FROM wms_dispatched_tasks where person_id = p_emp_id and status in (3,9);
2342: -- bug 3602199 keep queued tasks as queued and dont delete wdt
2343: -- DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9);
2344: if(p_previous_task_status = 2/*queued*/) then
2345: DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9) and transaction_temp_id <> p_temp_id;
2346: update wms_dispatched_tasks set status = 2 where transaction_temp_id = p_temp_id and person_id = p_emp_id;
2347: /* mydebug('Rows update in wdt 3602199' || SQL%ROWCOUNT);*/
2348: else/*old code*/
2349: DELETE FROM wms_dispatched_tasks where person_id = p_emp_id and status in (3,9);
2350: /* mydebug('All rows deleted from wdt' || SQL%ROWCOUNT);*/
2345: DELETE FROM wms_dispatched_tasks WHERE person_id = p_emp_id AND status IN(3, 9) and transaction_temp_id <> p_temp_id;
2346: update wms_dispatched_tasks set status = 2 where transaction_temp_id = p_temp_id and person_id = p_emp_id;
2347: /* mydebug('Rows update in wdt 3602199' || SQL%ROWCOUNT);*/
2348: else/*old code*/
2349: DELETE FROM wms_dispatched_tasks where person_id = p_emp_id and status in (3,9);
2350: /* mydebug('All rows deleted from wdt' || SQL%ROWCOUNT);*/
2351: end if;
2352:
2353: OPEN c_mo_line_id;