DBA Data[Home] [Help]

APPS.ARP_CALCULATE_DISCOUNT dependencies on ARP_CALCULATE_DISCOUNT

Line 1: PACKAGE BODY ARP_CALCULATE_DISCOUNT AS

1: PACKAGE BODY ARP_CALCULATE_DISCOUNT AS
2: /* $Header: ARRUDISB.pls 120.24.12010000.6 2009/03/06 11:29:45 mpsingh ship $ */
3: --
4: error_code NUMBER;
5:

Line 165: arp_standard.debug( 'arp_calculate_discount.calculate_discounts() +' );

161: --
162: BEGIN
163: --
164: IF PG_DEBUG in ('Y', 'C') THEN
165: arp_standard.debug( 'arp_calculate_discount.calculate_discounts() +' );
166: END IF;
167: -- ARTA Changes, calles TA version of calculate discount for TA
168: -- installation
169: IF nvl(arp_global.sysparam.ta_installed_flag,'N') = 'Y' THEN

Line 496: arp_standard.debug( 'arp_calculate_discount.calculate_discounts() -' );

492: arp_standard.debug( 'p_error_code := '||p_error_code );
493: END IF;
494: END IF;
495: IF PG_DEBUG in ('Y', 'C') THEN
496: arp_standard.debug( 'arp_calculate_discount.calculate_discounts() -' );
497: END IF;
498: --
499: EXCEPTION
500: WHEN OTHERS THEN

Line 502: arp_standard.debug( 'Exception: arp_calculate_discount.calculate_discounts()' );

498: --
499: EXCEPTION
500: WHEN OTHERS THEN
501: IF PG_DEBUG in ('Y', 'C') THEN
502: arp_standard.debug( 'Exception: arp_calculate_discount.calculate_discounts()' );
503: END IF;
504: --IF (error_code IS NOT NULL) THEN
505: --p_error_code := error_code;
506: --RETURN;

Line 543: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,

539: | out NOCOPY look. Removed obsolete parameter
540: | P_SELECT_FLAG.
541: +===========================================================================*/
542: PROCEDURE get_discount_percentages(
543: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,
544: p_ps_rec IN OUT NOCOPY ar_payment_schedules%ROWTYPE
545: ) IS
546: BEGIN
547: IF PG_DEBUG in ('Y', 'C') THEN

Line 548: arp_standard.debug( 'arp_calculate_discount.'||

544: p_ps_rec IN OUT NOCOPY ar_payment_schedules%ROWTYPE
545: ) IS
546: BEGIN
547: IF PG_DEBUG in ('Y', 'C') THEN
548: arp_standard.debug( 'arp_calculate_discount.'||
549: 'get_discount_percentages()+' );
550: END IF;
551:
552: -- ----------------------------------------------------------------

Line 569: arp_standard.debug( 'arp_calculate_discount.get_discount_percentages()-');

565: get_current_discount_percent (p_disc_rec, p_ps_rec);
566: END IF;
567:
568: IF PG_DEBUG in ('Y', 'C') THEN
569: arp_standard.debug( 'arp_calculate_discount.get_discount_percentages()-');
570: END IF;
571: EXCEPTION
572: WHEN OTHERS THEN
573: IF PG_DEBUG in ('Y', 'C') THEN

Line 574: arp_standard.debug( 'Exception: arp_calculate_discount.'||

570: END IF;
571: EXCEPTION
572: WHEN OTHERS THEN
573: IF PG_DEBUG in ('Y', 'C') THEN
574: arp_standard.debug( 'Exception: arp_calculate_discount.'||
575: 'get_discount_percentages()' );
576: END IF;
577: RAISE;
578: END get_discount_percentages;

Line 611: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,

607: | MODIFICATION HISTORY - Created by Shiv Ragunat - 05/24/95 |
608: | |
609: +===========================================================================*/
610: PROCEDURE get_payment_schedule_info(
611: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,
612: p_ps_rec IN OUT NOCOPY ar_payment_schedules%ROWTYPE
613: ) IS
614: l_payment_schedule_id NUMBER;
615: BEGIN

Line 617: arp_standard.debug( 'arp_calculate_discount.get_payment_schedule_info() +' );

613: ) IS
614: l_payment_schedule_id NUMBER;
615: BEGIN
616: IF PG_DEBUG in ('Y', 'C') THEN
617: arp_standard.debug( 'arp_calculate_discount.get_payment_schedule_info() +' );
618: END IF;
619: --
620: -- Select Payment Schedule info and populate ps record type and two disc record
621: -- values (calc_disc_on_lines and disc_partial_pmt_flag)

Line 663: 'EXCEPTION: arp_calculate_discount.get_payment_schedule_info' );

659: RAISE ar_m_no_rec;
660: WHEN OTHERS THEN
661: IF PG_DEBUG in ('Y', 'C') THEN
662: arp_standard.debug('get_payment_schedule_info: ' ||
663: 'EXCEPTION: arp_calculate_discount.get_payment_schedule_info' );
664: END IF;
665: RAISE;
666: END;
667:

Line 677: arp_standard.debug( 'arp_calculate_discount.get_payment_schedule_info()-');

673: p_ps_rec.terms_sequence_number := AR_NO_TERM;
674: END IF;
675:
676: IF PG_DEBUG in ('Y', 'C') THEN
677: arp_standard.debug( 'arp_calculate_discount.get_payment_schedule_info()-');
678: END IF;
679:
680: EXCEPTION
681: WHEN OTHERS THEN

Line 683: arp_standard.debug('get_payment_schedule_info: ' || 'Exception: arp_calculate_discount.'||

679:
680: EXCEPTION
681: WHEN OTHERS THEN
682: IF PG_DEBUG in ('Y', 'C') THEN
683: arp_standard.debug('get_payment_schedule_info: ' || 'Exception: arp_calculate_discount.'||
684: 'get_payment_schedule_info()' );
685: END IF;
686: RAISE;
687: END get_payment_schedule_info;

Line 724: arp_standard.debug( 'arp_calculate_discount.'||

720: p_ps_rec IN ar_payment_schedules%ROWTYPE
721: ) IS
722: BEGIN
723: IF PG_DEBUG in ('Y', 'C') THEN
724: arp_standard.debug( 'arp_calculate_discount.'||
725: 'get_best_discount_percentage()+' );
726: END IF;
727: --
728: -- Get best discount percentage

Line 741: arp_standard.debug( 'arp_calculate_discount.'||

737:
738: IF PG_DEBUG in ('Y', 'C') THEN
739: arp_standard.debug( '-- best_discount_percentage:'||
740: TO_CHAR( p_disc_rec.best_disc_pct ) );
741: arp_standard.debug( 'arp_calculate_discount.'||
742: 'get_best_discount_percentage()-' );
743: END IF;
744:
745: EXCEPTION

Line 748: arp_standard.debug( 'Exception: arp_calculate_discount.'||

744:
745: EXCEPTION
746: WHEN OTHERS THEN
747: IF PG_DEBUG in ('Y', 'C') THEN
748: arp_standard.debug( 'Exception: arp_calculate_discount.'||
749: 'get_best_discount_percentage()' );
750: END IF;
751: RAISE;
752: END get_best_discount_percentage;

Line 817: 'arp_calculate_discount.get_current_discount_percent()+' );

813:
814: BEGIN
815: IF PG_DEBUG in ('Y', 'C') THEN
816: arp_standard.debug(
817: 'arp_calculate_discount.get_current_discount_percent()+' );
818: END IF;
819: --
820: -- Get current discount percentage
821: --

Line 846: arp_standard.debug( 'arp_calculate_discount.'||

842:
843: IF PG_DEBUG in ('Y', 'C') THEN
844: arp_standard.debug( '--p_disc_rec.earned_disc_pct:'||
845: TO_CHAR(p_disc_rec.earned_disc_pct));
846: arp_standard.debug( 'arp_calculate_discount.'||
847: 'get_current_discount_percent()-' );
848: END IF;
849:
850: EXCEPTION

Line 853: arp_standard.debug( 'EXCEPTION: arp_calculate_discount.'||

849:
850: EXCEPTION
851: WHEN OTHERS THEN
852: IF PG_DEBUG in ('Y', 'C') THEN
853: arp_standard.debug( 'EXCEPTION: arp_calculate_discount.'||
854: 'get_current_discount_percent()' );
855: END IF;
856: RAISE;
857:

Line 897: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,

893: | V Ahluwalia 05/18/98 Bug #592696, if amount due original is 0 then|
894: | discount percent is 0, prevent division by 0 |
895: +===========================================================================*/
896: PROCEDURE correct_lines_only_discounts(
897: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,
898: p_ps_rec IN ar_payment_schedules%ROWTYPE ) IS
899: l_line_adjusted NUMBER;
900: l_line_applied NUMBER;
901: l_amount_adjusted NUMBER;

Line 922: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts() +' );

918:
919: --
920: BEGIN
921: IF PG_DEBUG in ('Y', 'C') THEN
922: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts() +' );
923: END IF;
924: --
925: --Correct discount percentages for LINEs only discounts.
926: --

Line 942: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts : No adjustments for payment schedule' );

938: END;
939: --
940: IF ( l_amount_adjusted IS NULL ) THEN
941: IF PG_DEBUG in ('Y', 'C') THEN
942: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts : No adjustments for payment schedule' );
943: END IF;
944: l_adjustments := FALSE;
945: l_tax_adjustments := FALSE;
946: END IF;

Line 961: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts : No credit memos for payment schedule' );

957: END;
958: --
959: IF ( l_amount_applied IS NULL ) THEN
960: IF PG_DEBUG in ('Y', 'C') THEN
961: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts : No credit memos for payment schedule' );
962: END IF;
963: l_credit_memos := FALSE;
964: l_tax_credit_memos := FALSE;
965: END IF;

Line 1114: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts() -' );

1110: IF PG_DEBUG in ('Y', 'C') THEN
1111: arp_standard.debug( ' p_disc_rec.adjusted_ado:'||TO_CHAR(p_disc_rec.adjusted_ado));
1112: arp_standard.debug( ' p_disc_rec.earned_disc_pct:'||TO_CHAR(p_disc_rec.earned_disc_pct));
1113: arp_standard.debug( ' p_disc_rec.best_disc_pct:'||TO_CHAR(p_disc_rec.best_disc_pct));
1114: arp_standard.debug( 'arp_calculate_discount.correct_lines_only_discounts() -' );
1115: END IF;
1116: --
1117: EXCEPTION
1118: WHEN OTHERS THEN

Line 1120: arp_standard.debug( 'Exception: arp_calculate_discount.correct_lines_only_discounts()' );

1116: --
1117: EXCEPTION
1118: WHEN OTHERS THEN
1119: IF PG_DEBUG in ('Y', 'C') THEN
1120: arp_standard.debug( 'Exception: arp_calculate_discount.correct_lines_only_discounts()' );
1121: END IF;
1122: RAISE;
1123: END correct_lines_only_discounts;
1124: --

Line 1164: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_adr() +' );

1160: l_amt NUMBER;
1161: l_new_amt_due_remaining NUMBER;
1162: BEGIN
1163: IF PG_DEBUG in ('Y', 'C') THEN
1164: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_adr() +' );
1165: END IF;
1166: --
1167: l_amt_due_remaining := p_ps_rec.amount_due_remaining;
1168: l_amt := p_disc_rec.input_amt;

Line 1201: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_adr() +' );

1197: RETURN;
1198: END IF;
1199: --
1200: IF PG_DEBUG in ('Y', 'C') THEN
1201: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_adr() +' );
1202: END IF;
1203: --
1204: EXCEPTION
1205: WHEN OTHERS THEN

Line 1207: arp_standard.debug( 'Exception: arp_calculate_discount.decrease_discounts_to_adr()');

1203: --
1204: EXCEPTION
1205: WHEN OTHERS THEN
1206: IF PG_DEBUG in ('Y', 'C') THEN
1207: arp_standard.debug( 'Exception: arp_calculate_discount.decrease_discounts_to_adr()');
1208: END IF;
1209: RAISE;
1210: END decrease_discounts_to_adr;
1211: --

Line 1241: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,

1237: | |
1238: +===========================================================================*/
1239: PROCEDURE determine_max_allowed_disc(
1240: p_mode IN NUMBER,
1241: p_disc_rec IN OUT NOCOPY arp_calculate_discount.discount_record_type,
1242: p_ps_rec IN ar_payment_schedules%ROWTYPE ) IS
1243: l_amount_adjusted NUMBER;
1244: l_amount_applied NUMBER;
1245: l_adjustments BOOLEAN;

Line 1251: arp_standard.debug( 'arp_calculate_discount.determine_max_allowed_disc() +' );

1247: l_max_allowed_discount NUMBER;
1248: l_amt_due_original NUMBER;
1249: BEGIN
1250: IF PG_DEBUG in ('Y', 'C') THEN
1251: arp_standard.debug( 'arp_calculate_discount.determine_max_allowed_disc() +' );
1252: END IF;
1253: --
1254: l_adjustments := TRUE;
1255: l_credit_memos := TRUE;

Line 1372: arp_standard.debug( 'arp_calculate_discount.determine_max_allowed_disc() -' );

1368: -- Populate max allowable discount and exit.
1369: --
1370: p_disc_rec.max_disc := l_max_allowed_discount;
1371: IF PG_DEBUG in ('Y', 'C') THEN
1372: arp_standard.debug( 'arp_calculate_discount.determine_max_allowed_disc() -' );
1373: END IF;
1374: --
1375: EXCEPTION
1376: WHEN OTHERS THEN

Line 1378: arp_standard.debug( 'Exception: arp_calculate_discount.determine_max_allowed_disc()');

1374: --
1375: EXCEPTION
1376: WHEN OTHERS THEN
1377: IF PG_DEBUG in ('Y', 'C') THEN
1378: arp_standard.debug( 'Exception: arp_calculate_discount.determine_max_allowed_disc()');
1379: END IF;
1380: RAISE;
1381: END determine_max_allowed_disc;
1382: --

Line 1450: arp_standard.debug( 'arp_calculate_discount.calculate_direct_discount() +' );

1446: l_ps_disc_partial_pay_flag VARCHAR2(1) := 'N' ;
1447:
1448: BEGIN
1449: IF PG_DEBUG in ('Y', 'C') THEN
1450: arp_standard.debug( 'arp_calculate_discount.calculate_direct_discount() +' );
1451: END IF;
1452: --
1453: l_ado := p_disc_rec.adjusted_ado;
1454: l_earned_disc_pct := p_disc_rec.earned_disc_pct;

Line 1742: arp_standard.debug( 'arp_calculate_discount.calculate_direct_discount()-');

1738: IF PG_DEBUG in ('Y', 'C') THEN
1739: arp_standard.debug( '-- p_earned_disc: '||TO_CHAR(p_earned_disc));
1740: arp_standard.debug( '-- max_disc:' ||TO_CHAR(p_disc_rec.max_disc));
1741: arp_standard.debug( '-- p_unearned_disc:'||TO_CHAR(p_unearned_disc));
1742: arp_standard.debug( 'arp_calculate_discount.calculate_direct_discount()-');
1743: END IF;
1744:
1745: EXCEPTION
1746: WHEN OTHERS THEN

Line 1748: arp_standard.debug( 'Exception: arp_calculate_discount.'||

1744:
1745: EXCEPTION
1746: WHEN OTHERS THEN
1747: IF PG_DEBUG in ('Y', 'C') THEN
1748: arp_standard.debug( 'Exception: arp_calculate_discount.'||
1749: 'calculate_direct_discount()');
1750: END IF;
1751: RAISE;
1752: END calculate_direct_discount;

Line 1803: arp_standard.debug( 'arp_calculate_discount.calculate_default_discount() +' );

1799: l_disc_to_take NUMBER;
1800: l_OIR_AR BOOLEAN;
1801: BEGIN
1802: IF PG_DEBUG in ('Y', 'C') THEN
1803: arp_standard.debug( 'arp_calculate_discount.calculate_default_discount() +' );
1804: END IF;
1805: --
1806: /*FP bug 5335376 for Bug 5223829 Leftover changes of bug for case of system option partial discount unchecked
1807: Set variable based on parameter p_called_from*/

Line 2008: arp_standard.debug( 'arp_calculate_discount.calculate_default_discount() -' );

2004: --else
2005: --set discount to 0.
2006: --
2007: IF PG_DEBUG in ('Y', 'C') THEN
2008: arp_standard.debug( 'arp_calculate_discount.calculate_default_discount() -' );
2009: END IF;
2010: --
2011: EXCEPTION
2012: WHEN OTHERS THEN

Line 2014: arp_standard.debug( 'Exception: arp_calculate_discount.calculate_default_discount()');

2010: --
2011: EXCEPTION
2012: WHEN OTHERS THEN
2013: IF PG_DEBUG in ('Y', 'C') THEN
2014: arp_standard.debug( 'Exception: arp_calculate_discount.calculate_default_discount()');
2015: END IF;
2016: RAISE;
2017: END calculate_default_discount;
2018: --

Line 2055: arp_standard.debug( 'arp_calculate_discount.check_input() +' );

2051: p_select_flag IN BOOLEAN,
2052: p_ps_rec IN OUT NOCOPY ar_payment_schedules%ROWTYPE ) IS
2053: BEGIN
2054: IF PG_DEBUG in ('Y', 'C') THEN
2055: arp_standard.debug( 'arp_calculate_discount.check_input() +' );
2056: END IF;
2057: --
2058: -- If Input Amount equals NULL
2059: -- exit with error

Line 2063: arp_standard.debug( 'arp_calculate_discount.check_input : Input amount is NULL. Must have a value.' );

2059: -- exit with error
2060: IF p_disc_rec.input_amt IS NULL
2061: THEN
2062: IF PG_DEBUG in ('Y', 'C') THEN
2063: arp_standard.debug( 'arp_calculate_discount.check_input : Input amount is NULL. Must have a value.' );
2064: END IF;
2065: --error_code := AR_M_FAILURE ;
2066: IF PG_DEBUG in ('Y', 'C') THEN
2067: arp_standard.debug( 'Check input Failed' );

Line 2077: arp_standard.debug( 'arp_calculate_discount.check_input : Apply date is NULL. Must have a value.' );

2073: -- exit with error
2074: IF p_disc_rec.apply_date IS NULL
2075: THEN
2076: IF PG_DEBUG in ('Y', 'C') THEN
2077: arp_standard.debug( 'arp_calculate_discount.check_input : Apply date is NULL. Must have a value.' );
2078: END IF;
2079: --error_code := AR_M_FAILURE ;
2080: IF PG_DEBUG in ('Y', 'C') THEN
2081: arp_standard.debug( 'Check input Failed' );

Line 2098: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.disc_partial_pmt_flag' );

2094: IF p_disc_rec.disc_partial_pmt_flag <> 'Y' AND
2095: p_disc_rec.disc_partial_pmt_flag <> 'N'
2096: THEN
2097: IF PG_DEBUG in ('Y', 'C') THEN
2098: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.disc_partial_pmt_flag' );
2099: END IF;
2100: RAISE ar_m_fail;
2101: END IF;
2102: -- If calc_disc_on_lines not in ('Y', 'N', 'I', 'L', 'T', 'F')

Line 2112: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.calc_disc_on_lines' );

2108: p_disc_rec.calc_disc_on_lines <> 'T' AND
2109: p_disc_rec.calc_disc_on_lines <> 'F'
2110: THEN
2111: IF PG_DEBUG in ('Y', 'C') THEN
2112: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.calc_disc_on_lines' );
2113: END IF;
2114: RAISE ar_m_fail;
2115: END IF;
2116: END IF;

Line 2123: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.earned_both_flag' );

2119: -- exit with error
2120: IF ( p_disc_rec.earned_both_flag <> AR_EARNED_INDICATOR AND
2121: p_disc_rec.earned_both_flag <> AR_BOTH_INDICATOR ) THEN
2122: IF PG_DEBUG in ('Y', 'C') THEN
2123: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_disc_rec.earned_both_flag' );
2124: END IF;
2125: RAISE ar_m_fail;
2126: END IF;
2127: -- If Select_flag <> TRUE AND <> FALSE

Line 2131: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_select_flag. Must be TRUE or FALSE.' );

2127: -- If Select_flag <> TRUE AND <> FALSE
2128: -- exit with error
2129: IF ( p_select_flag <> TRUE AND p_select_flag <> FALSE ) THEN
2130: IF PG_DEBUG in ('Y', 'C') THEN
2131: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_select_flag. Must be TRUE or FALSE.' );
2132: END IF;
2133: RAISE ar_m_fail;
2134: END IF;
2135: -- If payment_schedule_id <= 0

Line 2139: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for

2135: -- If payment_schedule_id <= 0
2136: -- exit with error
2137: IF ( p_ps_rec.payment_schedule_id <= 0 ) THEN
2138: IF PG_DEBUG in ('Y', 'C') THEN
2139: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for
2140: p_ps_rec.payment_schedule_id. Must be greater than zero.' );
2141: END IF;
2142: RAISE ar_m_fail;
2143: END IF;

Line 2152: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_ps_rec.term_id. Must be greater than zero. ' );

2148: p_ps_rec.term_id := AR_NO_TERM;
2149: ELSIF p_ps_rec.term_id < 0
2150: THEN
2151: IF PG_DEBUG in ('Y', 'C') THEN
2152: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for p_ps_rec.term_id. Must be greater than zero. ' );
2153: END IF;
2154: RAISE ar_m_fail;
2155: END IF;
2156: IF p_ps_rec.terms_sequence_number IS NULL

Line 2162: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for

2158: p_ps_rec.terms_sequence_number := AR_NO_TERM;
2159: ELSIF ( p_ps_rec.terms_sequence_number < 0 )
2160: THEN
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: arp_standard.debug( 'arp_calculate_discount.check_input : Invalid value for
2163: p_ps_rec.terms_sequence_number. Must be greater than zero. ' );
2164: END IF;
2165: RAISE ar_m_fail;
2166: END IF;

Line 2169: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.trx_date is NULL. Must have a value. ');

2165: RAISE ar_m_fail;
2166: END IF;
2167: IF ( p_ps_rec.trx_date IS NULL ) THEN
2168: IF PG_DEBUG in ('Y', 'C') THEN
2169: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.trx_date is NULL. Must have a value. ');
2170: END IF;
2171: RAISE ar_m_fail;
2172: END IF;
2173: IF ( p_ps_rec.amount_due_original IS NULL )

Line 2176: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.amount_due_original is NULL . Must have a value. ');

2172: END IF;
2173: IF ( p_ps_rec.amount_due_original IS NULL )
2174: THEN
2175: IF PG_DEBUG in ('Y', 'C') THEN
2176: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.amount_due_original is NULL . Must have a value. ');
2177: END IF;
2178: RAISE ar_m_fail;
2179: END IF;
2180: IF ( p_ps_rec.invoice_currency_code IS NULL ) THEN

Line 2182: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.invoice_currency_code is NULL . Must have a value. ');

2178: RAISE ar_m_fail;
2179: END IF;
2180: IF ( p_ps_rec.invoice_currency_code IS NULL ) THEN
2181: IF PG_DEBUG in ('Y', 'C') THEN
2182: arp_standard.debug( 'arp_calculate_discount.check_input : p_ps_rec.invoice_currency_code is NULL . Must have a value. ');
2183: END IF;
2184: RAISE ar_m_fail;
2185: END IF;
2186: IF ( p_ps_rec.discount_taken_earned IS NULL ) THEN

Line 2227: arp_standard.debug( 'arp_calculate_discount.check_input() -' );

2223: -- If lines_original = NULL
2224: -- Set lines_original = 0
2225: --
2226: IF PG_DEBUG in ('Y', 'C') THEN
2227: arp_standard.debug( 'arp_calculate_discount.check_input() -' );
2228: END IF;
2229: --
2230: EXCEPTION
2231: WHEN OTHERS THEN

Line 2233: arp_standard.debug( 'Exception: arp_calculate_discount.check_input()' );

2229: --
2230: EXCEPTION
2231: WHEN OTHERS THEN
2232: IF PG_DEBUG in ('Y', 'C') THEN
2233: arp_standard.debug( 'Exception: arp_calculate_discount.check_input()' );
2234: END IF;
2235: RAISE;
2236: END check_input;
2237: --

Line 2278: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_maxd() +' );

2274: p_unearned_disc IN OUT NOCOPY NUMBER) IS
2275: l_max_disc NUMBER;
2276: BEGIN
2277: IF PG_DEBUG in ('Y', 'C') THEN
2278: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_maxd() +' );
2279: END IF;
2280: --
2281: IF ( ABS(p_disc_rec.max_disc) < ABS(p_earned_disc) ) THEN
2282: p_earned_disc := p_disc_rec.max_disc;

Line 2297: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_maxd() -' );

2293: -- If max-earned < full unearned discount
2294: -- set unearned discount = max-earned
2295: --
2296: IF PG_DEBUG in ('Y', 'C') THEN
2297: arp_standard.debug( 'arp_calculate_discount.decrease_discounts_to_maxd() -' );
2298: END IF;
2299: --
2300: EXCEPTION
2301: WHEN OTHERS THEN

Line 2303: arp_standard.debug( 'Exception: arp_calculate_discount.decrease_discounts_to_maxd()');

2299: --
2300: EXCEPTION
2301: WHEN OTHERS THEN
2302: IF PG_DEBUG in ('Y', 'C') THEN
2303: arp_standard.debug( 'Exception: arp_calculate_discount.decrease_discounts_to_maxd()');
2304: END IF;
2305: RAISE;
2306: END decrease_discounts_to_maxd;
2307: --

Line 2320: | ARP_CALCULATE_DISCOUNT.calculate_discounts |

2316: | |
2317: | SCOPE - PUBLIC |
2318: | |
2319: | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
2320: | ARP_CALCULATE_DISCOUNT.calculate_discounts |
2321: | |
2322: | ARGUMENTS : IN: |
2323: | OUT: |
2324: | |

Line 2382: arp_standard.debug( 'arp_calculate_discount.discounts_cover()+' );

2378: l_close_invoice_flag VARCHAR2(10);
2379: --
2380: BEGIN
2381: IF PG_DEBUG in ('Y', 'C') THEN
2382: arp_standard.debug( 'arp_calculate_discount.discounts_cover()+' );
2383: END IF;
2384: -- ARTA changes calls TA discount cover for TA installation
2385: IF nvl(arp_global.sysparam.ta_installed_flag,'N') = 'Y' THEN
2386: NULL; -- Do Nothing;

Line 2491: arp_standard.debug('discounts_cover: ' || 'arp_calculate_discount.calc_discount()-' );

2487: l_earned_both_flag := 'B';
2488: END IF;
2489: --
2490: IF PG_DEBUG in ('Y', 'C') THEN
2491: arp_standard.debug('discounts_cover: ' || 'arp_calculate_discount.calc_discount()-' );
2492: END IF;
2493: --
2494: arp_calculate_discount.calculate_discounts( p_input_amount,
2495: p_grace_days,

Line 2494: arp_calculate_discount.calculate_discounts( p_input_amount,

2490: IF PG_DEBUG in ('Y', 'C') THEN
2491: arp_standard.debug('discounts_cover: ' || 'arp_calculate_discount.calc_discount()-' );
2492: END IF;
2493: --
2494: arp_calculate_discount.calculate_discounts( p_input_amount,
2495: p_grace_days,
2496: p_apply_date,
2497: p_partial_discount_flag,
2498: p_calc_discount_on_lines_flag,

Line 2557: arp_standard.debug( 'arp_calculate_discount.discounts_cover()-' );

2553: END IF; /* discount on partial payments not allowed */
2554: --
2555: END IF;
2556: IF PG_DEBUG in ('Y', 'C') THEN
2557: arp_standard.debug( 'arp_calculate_discount.discounts_cover()-' );
2558: END IF;
2559: --
2560: EXCEPTION
2561: WHEN OTHERS THEN

Line 2563: arp_standard.debug( 'EXCEPTION: arp_calculate_discount.discounts_cover'

2559: --
2560: EXCEPTION
2561: WHEN OTHERS THEN
2562: IF PG_DEBUG in ('Y', 'C') THEN
2563: arp_standard.debug( 'EXCEPTION: arp_calculate_discount.discounts_cover'
2564: );
2565: END IF;
2566: RAISE;
2567: END discounts_cover;

Line 2619: ARP_CALCULATE_DISCOUNT.discounts_cover( p_mode,

2615: IF nvl(arp_global.sysparam.ta_installed_flag,'N') = 'Y' THEN
2616: NULL; -- Do Nothing
2617: -- Removed ARTA logic for Bug 4936298
2618: ELSE
2619: ARP_CALCULATE_DISCOUNT.discounts_cover( p_mode,
2620: p_invoice_currency_code,
2621: p_ps_id,
2622: p_term_id,
2623: p_terms_sequence_number,

Line 2689: arp_standard.debug( 'arp_calculate_discount.validate_args_discounts_cover()+' );

2685: p_trx_date IN ar_payment_schedules.trx_date%TYPE,
2686: p_apply_date IN ar_cash_receipts.receipt_date%TYPE ) IS
2687: BEGIN
2688: IF PG_DEBUG in ('Y', 'C') THEN
2689: arp_standard.debug( 'arp_calculate_discount.validate_args_discounts_cover()+' );
2690: END IF;
2691: --
2692: IF ( p_mode is NULL OR p_invoice_currency_code IS NULL OR
2693: p_ps_id IS NULL OR p_trx_date IS NULL OR

Line 2700: arp_standard.debug( 'arp_calculate_discount.validate_args_discounts_cover()-' );

2696: APP_EXCEPTION.raise_exception;
2697: END IF;
2698: --
2699: IF PG_DEBUG in ('Y', 'C') THEN
2700: arp_standard.debug( 'arp_calculate_discount.validate_args_discounts_cover()-' );
2701: END IF;
2702: --
2703: EXCEPTION
2704: WHEN OTHERS THEN

Line 2707: 'EXCEPTION: arp_calculate_discount.validate_args_calc_discoun

2703: EXCEPTION
2704: WHEN OTHERS THEN
2705: IF PG_DEBUG in ('Y', 'C') THEN
2706: arp_standard.debug('validate_args_discounts_cover: ' ||
2707: 'EXCEPTION: arp_calculate_discount.validate_args_calc_discoun
2708: ts' );
2709: END IF;
2710: RAISE;
2711: END validate_args_discounts_cover;

Line 2718: arp_calculate_discount.g_called_from := 'MANUAL' ;

2714: PROCEDURE set_g_called_from (p_called_from IN varchar2) IS
2715:
2716: BEGIN
2717: IF ( p_called_from = 'MANUAL') THEN
2718: arp_calculate_discount.g_called_from := 'MANUAL' ;
2719: END IF ;
2720:
2721: EXCEPTION
2722: WHEN OTHERS THEN

Line 2727: END arp_calculate_discount;

2723: NULL ;
2724: END SET_G_CALLED_FROM ;
2725: --
2726: --
2727: END arp_calculate_discount;