1895:
1896: -- do not insert rows which are null or zero percent
1897: IF (icx_percentage(i) IS NOT NULL AND icx_percentage(i) > 0) THEN
1898: -- Insert into distribution table
1899: icx_req_acct2.update_account( v_cart_line_id => v_cart_line_id,
1900: v_oo_id => v_org_id,
1901: v_cart_id => v_cart_id,
1902: v_segments => v_segment_value,
1903: v_allocation_type => v_allocation_type,
1911: -- loop through every line returned to get the account segments
1912: FOR i in 1.. v_total_rows_returned LOOP
1913: IF (icx_percentage(i) IS NOT NULL AND icx_percentage(i) > 0) THEN
1914: -- Insert into distribution table
1915: icx_req_acct2.update_account_num( v_cart_line_id => v_cart_line_id,
1916: v_oo_id => v_org_id,
1917: v_cart_id => v_cart_id,
1918: v_account_num => icx_charge_account_num(i),
1919: v_allocation_type => v_allocation_type,
2097:
2098: END IF; /* IF results_table.COUNT > 0 */
2099:
2100: -- Get the default segment for the current line
2101: icx_req_acct2.get_default_segs (v_cart_id => v_cart_id,
2102: v_cart_line_id => req_line.cart_line_id,
2103: v_emp_id => v_employee_id,
2104: v_oo_id => v_org_id,
2105: v_segments => v_line_segments);
2133: debug_plsql.write_time('v_line_segments(6) = ' || v_line_segments(6));
2134: debug_plsql.write_time('Allocation value = ' || v_allocation_value);
2135: */
2136:
2137: icx_req_acct2.update_account( v_cart_line_id => req_line.cart_line_id,
2138: v_oo_id => v_org_id,
2139: v_cart_id => v_cart_id,
2140: v_segments => v_line_segments,
2141: v_allocation_type => v_allocation_type,
2154:
2155: l := l + 1;
2156: END LOOP; /* FOR v_ak_segments */
2157: /** Insert the distribution **/
2158: icx_req_acct2.update_account( v_cart_line_id => req_line.cart_line_id,
2159: v_oo_id => v_org_id,
2160: v_cart_id => v_cart_id,
2161: v_segments => v_line_segments,
2162: v_allocation_type => v_allocation_type,
2173: FOR req_line IN get_req_lines LOOP
2174: FOR prec IN get_distributions_account_num LOOP
2175: -- Insert into distribution table
2176:
2177: icx_req_acct2.update_account_num(v_cart_line_id => req_line.cart_line_id,
2178: v_oo_id => v_org_id,
2179: v_cart_id => v_cart_id,
2180: v_account_num => prec.charge_account_num,
2181: v_allocation_type => prec.allocation_type,