181: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
182: --
183: IF l_debug_on IS NULL
184: THEN
185: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
186: END IF;
187: --
188: --
189: -- Debug Statements
189: -- Debug Statements
190: --
191: IF l_debug_on THEN
192: fnd_profile.get('WSH_DEBUG_LOG_DIRECTORY',l_debugfile);
193: l_debugfile := l_debugfile||'/'||WSH_DEBUG_SV.g_file;
194:
195: WSH_DEBUG_SV.push(l_module_name);
196: WSH_DEBUG_SV.log(l_module_name,'Begin of the process ',l_debugfile);
197:
191: IF l_debug_on THEN
192: fnd_profile.get('WSH_DEBUG_LOG_DIRECTORY',l_debugfile);
193: l_debugfile := l_debugfile||'/'||WSH_DEBUG_SV.g_file;
194:
195: WSH_DEBUG_SV.push(l_module_name);
196: WSH_DEBUG_SV.log(l_module_name,'Begin of the process ',l_debugfile);
197:
198: END IF;
199: --
192: fnd_profile.get('WSH_DEBUG_LOG_DIRECTORY',l_debugfile);
193: l_debugfile := l_debugfile||'/'||WSH_DEBUG_SV.g_file;
194:
195: WSH_DEBUG_SV.push(l_module_name);
196: WSH_DEBUG_SV.log(l_module_name,'Begin of the process ',l_debugfile);
197:
198: END IF;
199: --
200: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
377: fetch c_get_vehicle_name into l_vehicle_type;
378: close c_get_vehicle_name;
379: end if;
380: IF l_debug_on THEN
381: WSH_DEBUG_SV.log(l_module_name,'Vehicle Name ',l_vehicle_type);
382: END IF;
383: --dbms_output.put_line('Vehicle name :'||l_vehicle_type);
384: -- Building multiple records in the table based on the no of modes passed.
385: LOOP
427: raise e_no_data_found;
428: end if;
429: l_count := l_source_header_rates_tab.FIRST;
430: IF l_debug_on THEN
431: WSH_DEBUG_SV.log(l_module_name,'No of records header : ',l_source_header_rates_tab.count);
432: WSH_DEBUG_SV.log(l_module_name,'No of records lines : ',l_source_line_rates_tab.count);
433: END IF;
434:
435: LOOP
428: end if;
429: l_count := l_source_header_rates_tab.FIRST;
430: IF l_debug_on THEN
431: WSH_DEBUG_SV.log(l_module_name,'No of records header : ',l_source_header_rates_tab.count);
432: WSH_DEBUG_SV.log(l_module_name,'No of records lines : ',l_source_line_rates_tab.count);
433: END IF;
434:
435: LOOP
436: --dbms_output.put_line('you are here - carrier id '||l_source_header_rates_tab(l_count).carrier_id);
508: MIN_ACCT_UNIT=>l_min_acct_unit);
509: -- For each Line ( BASE Price and Acc Charge)
510: l_line_count := l_source_header_rates_tab(l_count).first_line_index;
511: IF l_debug_on THEN
512: WSH_DEBUG_SV.log(l_module_name,'Mode at header level : ',l_mode_of_transport_meaning);
513: WSH_DEBUG_SV.log(l_module_name,'Carrier at header level : ',l_carrier);
514: WSH_DEBUG_SV.log(l_module_name,'Vehicle at header level : ',l_vehicle_type);
515: WSH_DEBUG_SV.log(l_module_name,'Service at header level : ',l_service_level);
516: END IF;
509: -- For each Line ( BASE Price and Acc Charge)
510: l_line_count := l_source_header_rates_tab(l_count).first_line_index;
511: IF l_debug_on THEN
512: WSH_DEBUG_SV.log(l_module_name,'Mode at header level : ',l_mode_of_transport_meaning);
513: WSH_DEBUG_SV.log(l_module_name,'Carrier at header level : ',l_carrier);
514: WSH_DEBUG_SV.log(l_module_name,'Vehicle at header level : ',l_vehicle_type);
515: WSH_DEBUG_SV.log(l_module_name,'Service at header level : ',l_service_level);
516: END IF;
517: -- initialized the variable for each header
510: l_line_count := l_source_header_rates_tab(l_count).first_line_index;
511: IF l_debug_on THEN
512: WSH_DEBUG_SV.log(l_module_name,'Mode at header level : ',l_mode_of_transport_meaning);
513: WSH_DEBUG_SV.log(l_module_name,'Carrier at header level : ',l_carrier);
514: WSH_DEBUG_SV.log(l_module_name,'Vehicle at header level : ',l_vehicle_type);
515: WSH_DEBUG_SV.log(l_module_name,'Service at header level : ',l_service_level);
516: END IF;
517: -- initialized the variable for each header
518: l_base_price := 0;
511: IF l_debug_on THEN
512: WSH_DEBUG_SV.log(l_module_name,'Mode at header level : ',l_mode_of_transport_meaning);
513: WSH_DEBUG_SV.log(l_module_name,'Carrier at header level : ',l_carrier);
514: WSH_DEBUG_SV.log(l_module_name,'Vehicle at header level : ',l_vehicle_type);
515: WSH_DEBUG_SV.log(l_module_name,'Service at header level : ',l_service_level);
516: END IF;
517: -- initialized the variable for each header
518: l_base_price := 0;
519: l_accessorial_charges := 0;
541: nvl(l_source_line_rates_tab(l_line_count).service_level,'XX'))) then
542: EXIT;
543: end if;
544: IF l_debug_on THEN
545: WSH_DEBUG_SV.log(l_module_name,'Lane ID at line level : ',l_source_line_rates_tab(l_line_count).lane_id);
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
542: EXIT;
543: end if;
544: IF l_debug_on THEN
545: WSH_DEBUG_SV.log(l_module_name,'Lane ID at line level : ',l_source_line_rates_tab(l_line_count).lane_id);
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
543: end if;
544: IF l_debug_on THEN
545: WSH_DEBUG_SV.log(l_module_name,'Lane ID at line level : ',l_source_line_rates_tab(l_line_count).lane_id);
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
551: WSH_DEBUG_SV.log(l_module_name,'Adjusted Price at line level : ',l_source_line_rates_tab(l_line_count).adjusted_price);
544: IF l_debug_on THEN
545: WSH_DEBUG_SV.log(l_module_name,'Lane ID at line level : ',l_source_line_rates_tab(l_line_count).lane_id);
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
551: WSH_DEBUG_SV.log(l_module_name,'Adjusted Price at line level : ',l_source_line_rates_tab(l_line_count).adjusted_price);
552: END IF;
545: WSH_DEBUG_SV.log(l_module_name,'Lane ID at line level : ',l_source_line_rates_tab(l_line_count).lane_id);
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
551: WSH_DEBUG_SV.log(l_module_name,'Adjusted Price at line level : ',l_source_line_rates_tab(l_line_count).adjusted_price);
552: END IF;
553:
546: WSH_DEBUG_SV.log(l_module_name,'Consol ID at line level : ',l_source_line_rates_tab(l_line_count).consolidation_id);
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
551: WSH_DEBUG_SV.log(l_module_name,'Adjusted Price at line level : ',l_source_line_rates_tab(l_line_count).adjusted_price);
552: END IF;
553:
554: --dbms_output.put_line('you are here - 10');
547: WSH_DEBUG_SV.log(l_module_name,'Carrier at line level : ',l_source_line_rates_tab(l_line_count).carrier_id);
548: WSH_DEBUG_SV.log(l_module_name,'Service at line level : ',l_source_line_rates_tab(l_line_count).service_level);
549: WSH_DEBUG_SV.log(l_module_name,'Vehicle at line level : ',l_source_line_rates_tab(l_line_count).vehicle_type_id);
550: WSH_DEBUG_SV.log(l_module_name,'Cost Type at line level : ',l_source_line_rates_tab(l_line_count).cost_type);
551: WSH_DEBUG_SV.log(l_module_name,'Adjusted Price at line level : ',l_source_line_rates_tab(l_line_count).adjusted_price);
552: END IF;
553:
554: --dbms_output.put_line('you are here - 10');
555: /* rounding to 4 decimal */
588: end if;
589: l_estimated_rate := round(l_estimated_rate,l_precision);
590:
591: IF l_debug_on THEN
592: WSH_DEBUG_SV.log(l_module_name,'Base Price : ',l_base_price);
593: WSH_DEBUG_SV.log(l_module_name,'Acc.Charge : ',l_accessorial_charges);
594: WSH_DEBUG_SV.log(l_module_name,'Markup-Discount : ',l_markup_discount_value);
595: WSH_DEBUG_SV.log(l_module_name,'Estimated Rate : ',l_estimated_rate);
596: WSH_DEBUG_SV.logmsg(l_module_name,'inserting the row into temp table ');
589: l_estimated_rate := round(l_estimated_rate,l_precision);
590:
591: IF l_debug_on THEN
592: WSH_DEBUG_SV.log(l_module_name,'Base Price : ',l_base_price);
593: WSH_DEBUG_SV.log(l_module_name,'Acc.Charge : ',l_accessorial_charges);
594: WSH_DEBUG_SV.log(l_module_name,'Markup-Discount : ',l_markup_discount_value);
595: WSH_DEBUG_SV.log(l_module_name,'Estimated Rate : ',l_estimated_rate);
596: WSH_DEBUG_SV.logmsg(l_module_name,'inserting the row into temp table ');
597: END IF;
590:
591: IF l_debug_on THEN
592: WSH_DEBUG_SV.log(l_module_name,'Base Price : ',l_base_price);
593: WSH_DEBUG_SV.log(l_module_name,'Acc.Charge : ',l_accessorial_charges);
594: WSH_DEBUG_SV.log(l_module_name,'Markup-Discount : ',l_markup_discount_value);
595: WSH_DEBUG_SV.log(l_module_name,'Estimated Rate : ',l_estimated_rate);
596: WSH_DEBUG_SV.logmsg(l_module_name,'inserting the row into temp table ');
597: END IF;
598: -- Padding currency with amount columns to display in the UI
591: IF l_debug_on THEN
592: WSH_DEBUG_SV.log(l_module_name,'Base Price : ',l_base_price);
593: WSH_DEBUG_SV.log(l_module_name,'Acc.Charge : ',l_accessorial_charges);
594: WSH_DEBUG_SV.log(l_module_name,'Markup-Discount : ',l_markup_discount_value);
595: WSH_DEBUG_SV.log(l_module_name,'Estimated Rate : ',l_estimated_rate);
596: WSH_DEBUG_SV.logmsg(l_module_name,'inserting the row into temp table ');
597: END IF;
598: -- Padding currency with amount columns to display in the UI
599: -- There is no currency conversion since there will be same currency for Charges and Base price
592: WSH_DEBUG_SV.log(l_module_name,'Base Price : ',l_base_price);
593: WSH_DEBUG_SV.log(l_module_name,'Acc.Charge : ',l_accessorial_charges);
594: WSH_DEBUG_SV.log(l_module_name,'Markup-Discount : ',l_markup_discount_value);
595: WSH_DEBUG_SV.log(l_module_name,'Estimated Rate : ',l_estimated_rate);
596: WSH_DEBUG_SV.logmsg(l_module_name,'inserting the row into temp table ');
597: END IF;
598: -- Padding currency with amount columns to display in the UI
599: -- There is no currency conversion since there will be same currency for Charges and Base price
600: /* not required since it is taking care of at UI level