1: PACKAGE BODY PN_MASS_APPR_PKG AS
2: -- $Header: PNMASAPB.pls 120.3 2006/12/08 07:08:50 acprakas ship $
3:
4: /* ========================== NOTE TO PROGRAMMER ==========================
5: 1. Use the functions in pnp_debug_pkg for logging as follows:
37: -- not have as many validations. Exception handling is done
38: -- differently too
39: --
40: -- PURPOSE : To update the accounted amount in the items in a schedule.
41: -- INVOKED FROM : pn_mass_appr_pkg.update_accounted_amount
42: -- ARGUMENTS :
43: -- p_schedule_id - IN - schedule ID the items in which need update
44: -- p_functional_curr - IN - functional curreny
45: -- p_conversion_type - IN - currency conversion type
101: AND pi1.payment_item_id = p_item_id ;
102:
103: BEGIN
104:
105: PNP_DEBUG_PKG.debug('pn_mass_appr_pkg.update_accounted_amount (+)');
106:
107: FOR payment_item_rec IN payment_cursor LOOP
108:
109: /* initialize */
218: END IF;
219:
220: END LOOP;
221:
222: PNP_DEBUG_PKG.debug('pn_mass_appr_pkg.update_accounted_amount (-)');
223:
224: EXCEPTION
225: WHEN OTHERS THEN
226: RAISE;
231: -- NAME : approve
232: -- DESCRIPTION : Approves the DRAFT schedules that meet the give filter
233: -- criteria.
234: -- PURPOSE : Approves the draft schedules
235: -- INVOKED FROM : pn_mass_appr_pkg.pn_mass_app
236: -- ARGUMENTS : Same as that of appr_pkg.pn_mass_app() sans the dummy params
237: -- REFERENCE : PN_COMMON.debug()
238: -- HISTORY :
239: --
458: l_applicable_period GL_PERIOD_STATUSES.period_name%TYPE;
459:
460: BEGIN
461:
462: PNP_DEBUG_PKG.debug ('PN_MASS_APPR_PKG.approve (+)');
463:
464: /* init the counters */
465: l_sch_app := 0;
466: l_sch_rej := 0;
821: ('+==============================================================================+');
822:
823: END IF;
824:
825: PNP_DEBUG_PKG.debug ('PN_MASS_APPR_PKG.approve (-)');
826:
827: EXCEPTION
828: WHEN others THEN
829: retcode := '2';
837: -- NAME : unapprove
838: -- DESCRIPTION : Un-approves the APPROVED schedules that meet the filter
839: -- criteria.
840: -- PURPOSE : Un-Approves the APPROVED schedules
841: -- INVOKED FROM : pn_mass_appr_pkg.pn_mass_app
842: -- ARGUMENTS : same as pn_mass_appr_pkg.approve() sans the period related
843: -- params
844: -- REFERENCE : PN_COMMON.debug()
845: -- HISTORY :
838: -- DESCRIPTION : Un-approves the APPROVED schedules that meet the filter
839: -- criteria.
840: -- PURPOSE : Un-Approves the APPROVED schedules
841: -- INVOKED FROM : pn_mass_appr_pkg.pn_mass_app
842: -- ARGUMENTS : same as pn_mass_appr_pkg.approve() sans the period related
843: -- params
844: -- REFERENCE : PN_COMMON.debug()
845: -- HISTORY :
846: --
939: l_lease_id PN_LEASES_ALL.lease_id%TYPE;
940:
941: BEGIN
942:
943: PNP_DEBUG_PKG.debug ('PN_MASS_APPR_PKG.unapprove (+)');
944:
945: /* init */
946: l_sch_unapp := 0;
947:
1021: pnp_debug_pkg.put_log_msg(fnd_message.get);
1022: pnp_debug_pkg.put_log_msg
1023: ('+==============================================================================+');
1024:
1025: PNP_DEBUG_PKG.debug ('PN_MASS_APPR_PKG.unapprove (-)');
1026:
1027: EXCEPTION
1028: WHEN others THEN
1029: retcode := '2';
1072: l_trx_to_dt DATE := fnd_date.canonical_to_date(p_trx_to_date);
1073:
1074: BEGIN
1075:
1076: PNP_DEBUG_PKG.debug('pn_mass_appr_pkg.pn_mass_app (+)');
1077:
1078: /* --- MESSAGE NEEDED --- */
1079: /* need to print the i/p params */
1080: fnd_message.set_name('PN','PN_MASAPB_PARAMS');
1170: );
1171:
1172: END IF;
1173:
1174: PNP_DEBUG_PKG.debug('pn_mass_appr_pkg.pn_mass_app (-)');
1175:
1176: EXCEPTION
1177: WHEN INPUT_DATE_MISSING THEN
1178: fnd_message.set_name('PN','PN_MASAPB_NO_DATE');
1188: RAISE;
1189:
1190: END pn_mass_app;
1191:
1192: END pn_mass_appr_pkg;