DBA Data[Home] [Help]

APPS.PN_REC_CALC_PKG dependencies on PN_DISTRIBUTIONS

Line 4015: l_distribution_id pn_distributions.distribution_id%TYPE;

4011: ,p_error_code IN OUT NOCOPY NUMBER
4012: ) IS
4013:
4014: l_lease_class_code pn_leases.lease_class_code%TYPE;
4015: l_distribution_id pn_distributions.distribution_id%TYPE;
4016: l_payment_term_id pn_payment_terms.payment_term_id%TYPE;
4017: l_lease_change_id pn_lease_details.lease_change_id%TYPE;
4018: l_rowid ROWID;
4019: l_distribution_count NUMBER := 0;

Line 4039: FROM pn_distributions_all pd

4035:
4036: CURSOR csr_temp_dist(p_term_template_id IN NUMBER)
4037: IS
4038: SELECT pd.*
4039: FROM pn_distributions_all pd
4040: WHERE pd.term_template_id = p_term_template_id;
4041:
4042: CURSOR csr_term_dist(p_term_id IN NUMBER)
4043: IS

Line 4045: FROM pn_distributions_all pd

4041:
4042: CURSOR csr_term_dist(p_term_id IN NUMBER)
4043: IS
4044: SELECT pd.*
4045: FROM pn_distributions_all pd
4046: WHERE pd.payment_term_id = p_term_id;
4047:
4048: CURSOR csr_template (p_rec_agreement_id IN NUMBER)
4049: IS

Line 4080: rec_distributions pn_distributions%ROWTYPE;

4076: AND rownum = 1;
4077:
4078: rec_lease_term pn_payment_terms_all%ROWTYPE;
4079: l_term_details VARCHAR2(1) := 'N';
4080: rec_distributions pn_distributions%ROWTYPE;
4081: l_rec_agr_line_id number;
4082: l_area pn_payment_terms.area%TYPE;
4083: l_area_type_code pn_payment_terms.area_type_code%TYPE;
4084:

Line 4469: /* Create a record in pn_distributions */

4465: ,x_area_type_code => l_area_type_code
4466: );
4467:
4468:
4469: /* Create a record in pn_distributions */
4470:
4471:
4472: l_context := 'Creating Account Distributions ';
4473:

Line 4503: pn_distributions_pkg.insert_row (

4499: pnp_debug_pkg.log(' account_id '||rec_distributions.account_id);
4500: pnp_debug_pkg.log(' account_class '||rec_distributions.account_id);
4501:
4502: l_context := 'Inserting Account Distributions ';
4503: pn_distributions_pkg.insert_row (
4504: x_rowid => l_rowid
4505: ,x_distribution_id => l_distribution_id
4506: ,x_account_id => rec_distributions.account_id
4507: ,x_payment_term_id => l_payment_term_id

Line 4579: | 05-SEP-2003 Daniel Thota o Added code to delete from pn_distributions_all,

4575: |
4576: | 19-MAY-2003 Daniel Thota o Created
4577: | 04-SEP-2003 Daniel Thota o Removed DECODE and used IF..THEN..ELSE instead
4578: | Fix for bugs 3123730,3122264
4579: | 05-SEP-2003 Daniel Thota o Added code to delete from pn_distributions_all,
4580: | before deleting from pn_payment_terms_all
4581: | 17-SEP-2003 Daniel Thota o Put in cursors get_distributions_exist_nocons
4582: | and cursors get_distributions_exist_cons
4583: | Fix for bug # 3142328

Line 4602: FROM pn_distributions_all dist

4598: CURSOR get_distributions_exist_nocons IS
4599: SELECT 'Y'
4600: FROM dual
4601: WHERE EXISTS (SELECT 1
4602: FROM pn_distributions_all dist
4603: ,pn_payment_terms_all term
4604: WHERE term.payment_term_id = dist.payment_term_id
4605: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4606: AND term.rec_agr_line_id = p_rec_agr_line_id

Line 4614: FROM pn_distributions_all dist

4610: CURSOR get_distributions_exist_cons IS
4611: SELECT 'Y'
4612: FROM dual
4613: WHERE EXISTS (SELECT 1
4614: FROM pn_distributions_all dist
4615: ,pn_payment_terms_all term
4616: WHERE term.payment_term_id = dist.payment_term_id
4617: AND term.period_billrec_id = l_period_bill_record.period_billrec_id
4618: AND term.status = 'DRAFT')

Line 4690: DELETE pn_distributions_all

4686:
4687: pnp_debug_pkg.log('now deleting terms l_distributions_exist: '||l_distributions_exist);
4688: IF l_distributions_exist = 'Y' THEN
4689:
4690: DELETE pn_distributions_all
4691: WHERE payment_term_id in (SELECT payment_term_id
4692: FROM pn_payment_terms_all
4693: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4694: AND rec_agr_line_id = p_rec_agr_line_id

Line 4715: DELETE pn_distributions_all

4711: CLOSE get_distributions_exist_cons;
4712:
4713: IF l_distributions_exist = 'Y' THEN
4714:
4715: DELETE pn_distributions_all
4716: WHERE payment_term_id in (SELECT payment_term_id
4717: FROM pn_payment_terms_all
4718: WHERE period_billrec_id = l_period_bill_record.period_billrec_id
4719: AND status = 'DRAFT')